Skip to content

Commit 0e7b0c9

Browse files
committed
Bundle native Arduino Firmware Uploader with Apple Silicon build
A separate build of Arduino IDE is produced for each of the macOS host architectures: * Apple Silicon (ARM) * Intel (x86) 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 and such a build is available for the IDE's current version dependency of Arduino Firmware Updater. The "Arduino Firmware Uploader" tool bundling script is hereby updated to use the most appropriate variant of the dependency for the target host architecture. This provides the following benefits * Compatibility with systems that don't have Rosetta 2 installed * Improved performance
1 parent b8dd39c commit 0e7b0c9

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Diff for: arduino-ide-extension/scripts/download-fwuploader.js

+8-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,14 @@
5050
const suffix = (() => {
5151
switch (platform) {
5252
case 'darwin':
53-
return 'macOS_64bit.tar.gz';
53+
switch (arch) {
54+
case 'arm64':
55+
return 'macOS_ARM64.tar.gz';
56+
case 'x64':
57+
return 'macOS_64bit.tar.gz';
58+
default:
59+
return undefined;
60+
}
5461
case 'win32':
5562
return 'Windows_64bit.zip';
5663
case 'linux': {

0 commit comments

Comments
 (0)