Changeset 672 for AE/installer2/src/net/oni2/aeinstaller/backend
- Timestamp:
- Feb 23, 2013, 6:40:47 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend
- Files:
-
- 3 added
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/depot/DepotManager.java
r662 r672 275 275 NodeMod nm = (NodeMod) n; 276 276 if (nm.getInstallMethod().getName() 277 .equalsIgnoreCase(instMethName)) 278 result.add(nm); 277 .equalsIgnoreCase(instMethName)) { 278 try { 279 nm.getPackageNumber(); 280 result.add(nm); 281 } catch (NumberFormatException e) { 282 System.err.println("Node " + nm.getNid() + " does not have a package number!!!"); 283 } 284 } 279 285 } 280 286 } -
AE/installer2/src/net/oni2/aeinstaller/backend/oni/OniSplit.java
r624 r672 3 3 import java.io.File; 4 4 import java.io.IOException; 5 import java.lang.reflect.InvocationTargetException;6 import java.util.Map;7 5 import java.util.Vector; 8 6 7 import net.oni2.aeinstaller.backend.DotNet; 9 8 import net.oni2.aeinstaller.backend.Paths; 10 9 import net.oni2.aeinstaller.backend.AppExecution; 11 10 import net.oni2.aeinstaller.backend.Settings; 12 import net.oni2.aeinstaller.backend.Settings.Architecture;13 11 import net.oni2.aeinstaller.backend.Settings.Platform; 14 import net.oni2.aeinstaller.backend.WinRegistry;15 12 16 13 /** … … 18 15 */ 19 16 public class OniSplit { 20 21 /**22 * @return is a .NET implementation installed?23 */24 public static boolean isDotNETInstalled() {25 switch (Settings.getPlatform()) {26 case WIN:27 try {28 int view = WinRegistry.KEY_WOW64_32KEY;29 if (Settings.getArchitecture() == Architecture.AMD64)30 view = WinRegistry.KEY_WOW64_64KEY;31 32 Map<String, String> m = WinRegistry33 .readStringValues(34 WinRegistry.HKEY_LOCAL_MACHINE,35 "Software\\Microsoft\\NET Framework Setup\\NDP\\v2.0.50727",36 view);37 return m != null;38 } catch (IllegalArgumentException e) {39 e.printStackTrace();40 } catch (IllegalAccessException e) {41 e.printStackTrace();42 } catch (InvocationTargetException e) {43 e.printStackTrace();44 } catch (Exception e) {45 if (!e.getMessage()46 .equals("Registry access not supported (not a Windows OS?)."))47 e.printStackTrace();48 }49 return false;50 case MACOS:51 case LINUX:52 Vector<String> cmd = new Vector<String>();53 cmd.add("which");54 cmd.add("mono");55 Vector<String> res = null;56 try {57 res = AppExecution.executeAndWait(cmd);58 } catch (IOException e) {59 e.printStackTrace();60 }61 if (res != null) {62 if (res.get(0).startsWith("/")63 && res.get(0).endsWith("mono")) {64 return true;65 }66 }67 return false;68 default:69 return false;70 }71 }72 17 73 18 /** … … 209 154 private static Vector<String> getProgramInvocation() { 210 155 Vector<String> res = new Vector<String>(); 211 if ( Settings.getPlatform() != Platform.WIN)212 res.add( "mono");156 if (DotNet.getRuntimeExe().length() > 0) 157 res.add(DotNet.getRuntimeExe()); 213 158 res.add(getProgramFile().getPath()); 214 159 return res; -
AE/installer2/src/net/oni2/aeinstaller/backend/packages/Mod_Info.java
r671 r672 27 27 28 28 private File exeFile = null; 29 private EExeType exeType = EExeType.OSBINARY; 29 30 private File iconFile = null; 30 31 private String workingDir = "Base"; … … 111 112 } else if (sName.equalsIgnoreCase("ExeName")) { 112 113 exeFile = new File(Paths.getEditionBasePath(), sVal); 114 } else if (sName.equalsIgnoreCase("ExeType")) { 115 if (sVal.equalsIgnoreCase("OSBinary")) 116 exeType = EExeType.OSBINARY; 117 else if (sVal.equalsIgnoreCase("DotNet")) 118 exeType = EExeType.DOTNET; 119 else if (sVal.equalsIgnoreCase("Jar")) 120 exeType = EExeType.JAR; 113 121 } else if (sName.equalsIgnoreCase("WorkingDir")) { 114 122 workingDir = sVal; … … 116 124 iconFile = new File(Paths.getEditionBasePath(), sVal); 117 125 } 126 } 127 if (exeFile != null) { 128 if (exeFile.getName().toLowerCase().endsWith(".jar")) 129 exeType = EExeType.JAR; 118 130 } 119 131 } catch (FileNotFoundException e) { … … 203 215 204 216 /** 217 * @return the exeType 218 */ 219 public EExeType getExeType() { 220 return exeType; 221 } 222 223 /** 205 224 * @return the iconFile 206 225 */ -
AE/installer2/src/net/oni2/aeinstaller/backend/packages/Package.java
r670 r672 44 44 45 45 private File exeFile = null; 46 private EExeType exeType = EExeType.OSBINARY; 46 47 private File iconFile = null; 47 48 private String workingDir = "Base"; … … 124 125 125 126 exeFile = mi.getExeFile(); 127 exeType = mi.getExeType(); 126 128 workingDir = mi.getWorkingDir(); 127 129 iconFile = mi.getIconFile(); … … 387 389 388 390 /** 391 * @return Executable type of this tool 392 */ 393 public EExeType getExeType() { 394 return exeType; 395 } 396 397 /** 389 398 * @return Icon file of this tool 390 399 */
Note:
See TracChangeset
for help on using the changeset viewer.