File tree Expand file tree Collapse file tree 1 file changed +12
-3
lines changed
mode/src/processing/mode/android Expand file tree Collapse file tree 1 file changed +12
-3
lines changed Original file line number Diff line number Diff line change @@ -386,7 +386,8 @@ public void run() {
386386 // Either there was no image architecture selected, or the default was set.
387387 // In this case, we give the user the option to choose between ARM and x86
388388
389- final int result ;
389+ int result = 0 ;
390+ boolean arm64 = false ;
390391 // PROCESSOR_IDENTIFIER is only defined on Windows. For cross-platform CPU
391392 // info, in the future we could use OSHI: https://github.com/oshi/oshi
392393 String procId = System .getenv ("PROCESSOR_IDENTIFIER" );
@@ -399,14 +400,22 @@ public void run() {
399400 result = JOptionPane .NO_OPTION ;
400401 }
401402 } 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+ }
404411 } else {
405412 result = showSysImageMessage ();
406413 }
407414 if (result == JOptionPane .YES_OPTION || result == JOptionPane .CLOSED_OPTION ) {
408415 abi = "x86" ;
409416 installHAXM ();
417+ } else if (arm64 ) {
418+ abi = "arm64-v8a" ;
410419 } else {
411420 abi = "arm" ;
412421 }
You can’t perform that action at this time.
0 commit comments