Changeset 625 for AE/installer2/src/net/oni2/aeinstaller/backend
- Timestamp:
- Jan 16, 2013, 5:12:24 PM (12 years ago)
- Location:
- AE/installer2/src/net/oni2/aeinstaller/backend
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/Paths.java
r602 r625 16 16 */ 17 17 public static File getInstallerPath() { 18 // String jarPath = Settings.class.getProtectionDomain().getCodeSource() 19 // .getLocation().getPath(); 20 // String decodedPath = null; 21 // try { 22 // decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 23 // } catch (UnsupportedEncodingException e) { 24 // e.printStackTrace(); 25 // } 26 // return new File(decodedPath).getParentFile(); 27 String wd = System.getProperty("user.dir"); 28 return new File(wd); 18 if (Settings.isDebug()) { 19 String wd = System.getProperty("user.dir"); 20 return new File(wd); 21 } else { 22 String jarPath = Settings.class.getProtectionDomain() 23 .getCodeSource().getLocation().getPath(); 24 String decodedPath = null; 25 try { 26 decodedPath = URLDecoder.decode(jarPath, "UTF-8"); 27 } catch (UnsupportedEncodingException e) { 28 e.printStackTrace(); 29 } 30 return new File(decodedPath).getParentFile(); 31 } 29 32 } 30 33 -
AE/installer2/src/net/oni2/aeinstaller/backend/Settings.java
r623 r625 112 112 * @return Is debug run 113 113 */ 114 public static boolean getDebug() {114 public static boolean isDebug() { 115 115 return debugRun; 116 116 } -
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r624 r625 244 244 combineBSLFolders(mods, listener); 245 245 246 if (Settings.getInstance().get("copyintro", false)) { 247 File src = new File(Paths.getVanillaGDF(), "intro.bik"); 248 if (src.exists()) { 249 try { 250 FileUtils.copyFileToDirectory(src, Paths.getEditionGDF()); 251 } catch (IOException e) { 252 e.printStackTrace(); 253 } 254 } 255 } 256 if (Settings.getInstance().get("copyoutro", true)) { 257 File src = new File(Paths.getVanillaGDF(), "outro.bik"); 258 if (src.exists()) { 259 try { 260 FileUtils.copyFileToDirectory(src, Paths.getEditionGDF()); 261 } catch (IOException e) { 262 e.printStackTrace(); 263 } 264 } 265 } 266 246 267 if (unlockLevels.size() > 0) { 247 268 File dat = new File(Paths.getEditionBasePath(), "persist.dat");
Note:
See TracChangeset
for help on using the changeset viewer.