Changeset 1077 for java/PlatformTools/src/net
- Timestamp:
- Oct 16, 2017, 5:09:22 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/PlatformTools/src/net/oni2/platformtools/PlatformInformation.java
r1033 r1077 26 26 * 64 bit 27 27 */ 28 AMD64 28 AMD64, 29 /** 30 * PPC 31 */ 32 PPC 29 33 } 30 34 … … 59 63 public static Architecture getArchitecture() { 60 64 if (architecture == null) { 65 Vector<String> params = new Vector<String>(); 66 ApplicationInvocationResult res = null; 67 61 68 switch (getPlatform()) { 62 69 case WIN: … … 68 75 break; 69 76 case MACOS: 77 params.add("-m"); 78 try { 79 res = ApplicationInvoker.executeAndWait( 80 EExeType.OSBINARY, null, new File("uname"), 81 params, false); 82 } catch (IOException e) { 83 e.printStackTrace(); 84 } catch (ERuntimeNotInstalledException e) { 85 e.printStackTrace(); 86 } 87 architecture = Architecture.AMD64; 88 if (res != null) { 89 if (res.output.get(0).toLowerCase().contains("power macintosh")) 90 architecture = Architecture.PPC; 91 } 92 break; 70 93 case LINUX: 71 Vector<String> params = new Vector<String>();72 94 params.add("LONG_BIT"); 73 ApplicationInvocationResult res = null;74 95 try { 75 96 res = ApplicationInvoker.executeAndWait(
Note:
See TracChangeset
for help on using the changeset viewer.