Bundle native Arduino Firmware Uploader with Apple Silicon build #2338
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
A separate build of Arduino IDE is produced for each of the macOS host architectures:
The Arduino IDE distribution includes several bundled helper tools. The build of those tools should also be selected according to the target host architecture.
At the time the infrastructure was set up for bundling the "Arduino Firmware Uploader" tool with the Arduino IDE distribution, that tool was only produced in a macOS x86 variant. So this was used even in the Apple Silicon Arduino IDE distribution, relying on Rosetta 2 to provide compatibility when used on Apple Silicon machines. Since that time, the Arduino Firmware Uploader build infrastructure has been updated to produce an Apple Silicon build of the tool (arduino/arduino-fwuploader#144) and such a build is available for the IDE's current version dependency of Arduino Firmware Updater:
arduino-ide/arduino-ide-extension/package.json
Lines 174 to 176 in b8dd39c
https://github.com/arduino/arduino-fwuploader/releases/tag/2.4.1
Change description
This PR updates the "Arduino Firmware Uploader" tool bundling script ito use the most appropriate variant of the dependency for the target host architecture. This provides the following benefits
Other information
I ran a demonstration build that includes the Apple Silicon variant in my fork:
https://github.com/per1234/arduino-ide/actions/runs/7602618426
Resolves #2337 by completing all related tasks in this codebase (work in other codebases should be tracked in those issue trackers).
Reviewer checklist