Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit fe19e0e

Browse filesBrowse files
committed
Use Apple Silicon build artifact name required by electron-updater
The Arduino IDE update check uses a "channel update info file" on Arduino's download server. This file specifies the latest version of Arduino IDE available from the Arduino download server as well as the download URLs for the release archives. There is a separate channel file for each host operating system: - Windows - Linux - macOS Two macOS host architectures are now supported: - x86 (AKA "Intel") - ARM64 (AKA "Apple Silicon") These each have their own release archive files. The macOS channel file contains data on both. So the updater must be able to identify the appropriate archive to use for the update based on the host architecture. This is based on the archive filename. Arduino IDE's auto-update feature is built on the electron-updater package. The release archive selection is handled by the electron-updater codebase and the filename pattern is hardcoded there. It selects the archive file that contains `arm64` in its name (case sensitive), if present, to use for updates on macOS hosts with ARM64 architecture. Previously, the build system produced archive files with the name format arduino-ide_<version>_macOS_ARM64.zip, consistent with the established naming in other Arduino tooling projects. Unfortunately this naming would cause either (depending on the order of the entries in the channel file) the x86 build to be used to update ARM64 macOS hosts (resulting in lesser performance due to Rosetta 2 overhead) or the ARM64 build to be used to update x86 hosts (resulting in the IDE failing to start). So it is necessary to change the build artifact name to follow the format dictated by the electron-updater package. Although it is not required (because electron-updater uses separate channel files for the x86 and ARM hosts), the Linux archive filename format was also changed for the sake of consistency.
1 parent c0af297 commit fe19e0e
Copy full SHA for fe19e0e

File tree

Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed
Filter options
Expand file treeCollapse file tree

1 file changed

+3
-3
lines changed

‎electron/packager/config.js

Copy file name to clipboardExpand all lines: electron/packager/config.js
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,17 +28,17 @@ function artifactName() {
2828
}
2929
case 'darwin': {
3030
if (arch === 'arm64') {
31-
return `${name}_${id}_macOS_ARM64.\$\{ext}`;
31+
return `${name}_${id}_macOS_arm64.\$\{ext}`;
3232
}
3333
return `${name}_${id}_macOS_64bit.\$\{ext}`;
3434
}
3535
case 'linux': {
3636
switch (arch) {
3737
case 'arm': {
38-
return `${name}_${id}_Linux_ARMv7.\$\{ext}`;
38+
return `${name}_${id}_Linux_armv7.\$\{ext}`;
3939
}
4040
case 'arm64': {
41-
return `${name}_${id}_Linux_ARM64.\$\{ext}`;
41+
return `${name}_${id}_Linux_arm64.\$\{ext}`;
4242
}
4343
case 'x64': {
4444
return `${name}_${id}_Linux_64bit.\$\{ext}`;

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.