@@ -71,8 +71,8 @@ public class SysImageDownloader extends JDialog implements PropertyChangeListene
71
71
private static final String HAXM_INSTALL_TITLE = "Some words of caution..." ;
72
72
73
73
private static final String HAXM_INSTALL_MESSAGE =
74
- "You chose to run x86 images in the emulator. This is great but you need " +
75
- "to install the Intel Hardware Accelerated Execution Manager (Intel HAXM).<br><br>" +
74
+ "Processing will install x86 images in the emulator. These images are fast, but " +
75
+ "also need the Intel Hardware Accelerated Execution Manager (Intel HAXM).<br><br>" +
76
76
"Processing will try to run the HAXM installer now, which may ask for your " +
77
77
"administrator password or additional permissions." ;
78
78
@@ -417,7 +417,25 @@ public void run() {
417
417
if (abi == null || askABI ) {
418
418
// Either there was no image architecture selected, or the default was set.
419
419
// In this case, we give the user the option to choose between ARM and x86
420
- final int result = showSysImageMessage ();
420
+
421
+ final int result ;
422
+ // PROCESSOR_IDENTIFIER is only defined on Windows. For cross-platform CPU
423
+ // info, in the future we could use OSHI: https://github.com/oshi/oshi
424
+ String procId = System .getenv ("PROCESSOR_IDENTIFIER" );
425
+ if (procId != null ) {
426
+ if (-1 < procId .indexOf ("Intel" )) {
427
+ // Intel CPU: we go for the x86 abi
428
+ result = JOptionPane .YES_OPTION ;
429
+ } else {
430
+ // Another CPU, can only be AMD, so we go for ARM abi
431
+ result = JOptionPane .NO_OPTION ;
432
+ }
433
+ } else if (Platform .isMacOS ()) {
434
+ // Macs only have Intel CPUs, so we also go for the x86 abi
435
+ result = JOptionPane .YES_OPTION ;
436
+ } else {
437
+ result = showSysImageMessage ();
438
+ }
421
439
if (result == JOptionPane .YES_OPTION || result == JOptionPane .CLOSED_OPTION ) {
422
440
abi = "x86" ;
423
441
installHAXM ();
0 commit comments