Changeset 767 for java/installer2/src/net/oni2
- Timestamp:
- Mar 31, 2013, 6:02:09 PM (12 years ago)
- Location:
- java/installer2/src/net/oni2/aeinstaller
- Files:
-
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/AEInstaller2.java
r766 r767 269 269 "AEInstaller2Updater.jar"); 270 270 ApplicationInvoker.execute(EExeType.JAR, null, updater, 271 null );271 null, false); 272 272 return; 273 273 } -
java/installer2/src/net/oni2/aeinstaller/backend/oni/OniLauncher.java
r766 r767 16 16 public class OniLauncher { 17 17 18 private static File getOniExe() {18 private static File getOniExe() throws FileNotFoundException { 19 19 File exe = null; 20 20 switch (PlatformInformation.getPlatform()) { 21 21 case WIN: 22 case LINUX: 22 23 exe = new File(Paths.getEditionBasePath(), "Oni.exe"); 23 break; 24 if (exe.exists()) 25 return exe; 26 else 27 throw new FileNotFoundException( 28 "Oni's executable was not found"); 24 29 case MACOS: 25 30 exe = new File("./Oni.app/Contents/MacOS/Oni"); … … 27 32 "Oni.app/Contents/MacOS/Oni").exists()) 28 33 return exe; 29 break; 30 case LINUX: 31 exe = new File(Paths.getEditionBasePath(), "Oni.exe"); 32 break; 34 else 35 throw new FileNotFoundException( 36 "Oni's executable was not found"); 33 37 default: 34 38 } 35 if ((exe != null) && !exe.exists()) 36 exe = null; 37 return exe; 39 return null; 38 40 } 39 41 … … 58 60 ERuntimeNotInstalledException { 59 61 File exe = getOniExe(); 60 if (exe == null)61 throw new FileNotFoundException("Oni's executable was not found");62 62 Vector<String> params = new Vector<String>(); 63 63 params.add("-debugfiles"); … … 65 65 params.add("-noswitch"); 66 66 ApplicationInvoker.execute(getOniExeType(), Paths.getEditionBasePath(), 67 exe, params );67 exe, params, true); 68 68 } 69 69 -
java/installer2/src/net/oni2/aeinstaller/backend/oni/OniSplit.java
r720 r767 35 35 * @return OniSplit output 36 36 */ 37 public static ApplicationInvocationResult export(File targetFolder, File input) { 37 public static ApplicationInvocationResult export(File targetFolder, 38 File input) { 38 39 return export(targetFolder, input, null); 39 40 } … … 50 51 * @return OniSplit output 51 52 */ 52 public static ApplicationInvocationResult export(File targetFolder, File input,53 Vector<String> patterns) {53 public static ApplicationInvocationResult export(File targetFolder, 54 File input, Vector<String> patterns) { 54 55 if (!targetFolder.exists()) 55 56 targetFolder.mkdir(); … … 66 67 ApplicationInvocationResult res = null; 67 68 try { 68 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 69 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 70 getProgramFile(), params, false); 69 71 } catch (IOException e) { 70 72 e.printStackTrace(); … … 84 86 * @return OniSplit output 85 87 */ 86 public static ApplicationInvocationResult importLevel( Vector<File> sourceFolders,87 File targetFile) {88 public static ApplicationInvocationResult importLevel( 89 Vector<File> sourceFolders, File targetFile) { 88 90 Vector<String> params = new Vector<String>(); 89 91 params.add(getImportParam()); … … 93 95 ApplicationInvocationResult res = null; 94 96 try { 95 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 97 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 98 getProgramFile(), params, false); 96 99 } catch (IOException e) { 97 100 e.printStackTrace(); … … 113 116 * @return OniSplit output 114 117 */ 115 public static ApplicationInvocationResult packLevel( Vector<File> sourceFoldersFiles,116 File targetFile) {118 public static ApplicationInvocationResult packLevel( 119 Vector<File> sourceFoldersFiles, File targetFile) { 117 120 Vector<String> params = new Vector<String>(); 118 121 params.add(getPackParam()); … … 124 127 ApplicationInvocationResult res = null; 125 128 try { 126 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 129 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 130 getProgramFile(), params, false); 127 131 } catch (IOException e) { 128 132 e.printStackTrace(); … … 145 149 * @return OniSplit output 146 150 */ 147 public static ApplicationInvocationResult move(File targetFolder, String input,148 String moveParameter) {151 public static ApplicationInvocationResult move(File targetFolder, 152 String input, String moveParameter) { 149 153 if (!targetFolder.exists()) 150 154 targetFolder.mkdir(); 151 155 152 156 Vector<String> params = new Vector<String>(); 153 params.add("-move" 154 + (moveParameter != null ? ":" + moveParameter : "")); 157 params.add("-move" + (moveParameter != null ? ":" + moveParameter : "")); 155 158 params.add(targetFolder.getPath()); 156 159 params.add(input); 157 160 ApplicationInvocationResult res = null; 158 161 try { 159 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 162 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 163 getProgramFile(), params, false); 160 164 } catch (IOException e) { 161 165 e.printStackTrace(); … … 175 179 * @return OniSplit output 176 180 */ 177 public static ApplicationInvocationResult convertOniToXML( File targetFolder,178 Vector<File> inputFiles) {181 public static ApplicationInvocationResult convertOniToXML( 182 File targetFolder, Vector<File> inputFiles) { 179 183 if (!targetFolder.exists()) 180 184 targetFolder.mkdirs(); … … 188 192 ApplicationInvocationResult res = null; 189 193 try { 190 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 194 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 195 getProgramFile(), params, false); 191 196 } catch (IOException e) { 192 197 e.printStackTrace(); … … 206 211 * @return OniSplit output 207 212 */ 208 public static ApplicationInvocationResult convertXMLtoOni( File targetFolder,209 Vector<File> inputFiles) {213 public static ApplicationInvocationResult convertXMLtoOni( 214 File targetFolder, Vector<File> inputFiles) { 210 215 if (!targetFolder.exists()) 211 216 targetFolder.mkdirs(); … … 219 224 ApplicationInvocationResult res = null; 220 225 try { 221 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, getProgramFile(), params); 226 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 227 getProgramFile(), params, false); 222 228 } catch (IOException e) { 223 229 e.printStackTrace(); -
java/installer2/src/net/oni2/aeinstaller/backend/oni/XMLTools.java
r744 r767 37 37 try { 38 38 res = ApplicationInvoker.executeAndWait(EExeType.DOTNET, null, 39 getProgramFile(), params );39 getProgramFile(), params, false); 40 40 } catch (IOException e) { 41 41 e.printStackTrace(); -
java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r749 r767 505 505 try { 506 506 ApplicationInvoker.execute(m.getExeType(), 507 m.getWorkingDir(), m.getExeFile(), null );507 m.getWorkingDir(), m.getExeFile(), null, false); 508 508 } catch (ERuntimeNotInstalledException e) { 509 509 JOptionPane.showMessageDialog(null,
Note:
See TracChangeset
for help on using the changeset viewer.