File tree 1 file changed +12
-3
lines changed
mode/src/processing/mode/android 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,8 @@ public void run() {
386
386
// Either there was no image architecture selected, or the default was set.
387
387
// In this case, we give the user the option to choose between ARM and x86
388
388
389
- final int result ;
389
+ int result = 0 ;
390
+ boolean arm64 = false ;
390
391
// PROCESSOR_IDENTIFIER is only defined on Windows. For cross-platform CPU
391
392
// info, in the future we could use OSHI: https://github.com/oshi/oshi
392
393
String procId = System .getenv ("PROCESSOR_IDENTIFIER" );
@@ -399,14 +400,22 @@ public void run() {
399
400
result = JOptionPane .NO_OPTION ;
400
401
}
401
402
} else if (Platform .isMacOS ()) {
402
- // Macs only have Intel CPUs, so we also go for the x86 abi
403
- result = JOptionPane .YES_OPTION ;
403
+ if (Platform .getNativeArch ().equals ("aarch64" )) {
404
+ // Apple Silicon Mac, so we go for the arm64 abi
405
+ arm64 = true ;
406
+ result = JOptionPane .NO_OPTION ;
407
+ } else {
408
+ // Intel Mac, so we go for the x86 abi
409
+ result = JOptionPane .YES_OPTION ;
410
+ }
404
411
} else {
405
412
result = showSysImageMessage ();
406
413
}
407
414
if (result == JOptionPane .YES_OPTION || result == JOptionPane .CLOSED_OPTION ) {
408
415
abi = "x86" ;
409
416
installHAXM ();
417
+ } else if (arm64 ) {
418
+ abi = "arm64-v8a" ;
410
419
} else {
411
420
abi = "arm" ;
412
421
}
You can’t perform that action at this time.
0 commit comments