Use Apple Silicon build artifact name required by electron-updater #1919
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
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:
Two macOS host architectures are now supported:
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:https://github.com/electron-userland/electron-builder/blob/7704be02a076ec51a5bf118f59c0d47927b5c85f/packages/electron-updater/src/MacUpdater.ts#L67
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).Change description
Change the build artifact name to follow the format dictated by the electron-updater package.
Other information
Although it is not required (because electron-updater uses separate channel files for the x86 and ARM Linux hosts), the Linux archive filename format was also changed for the sake of consistency.
Reviewer checklist