Changeset 663 for AE/installer2/src/net/oni2/aeinstaller/backend/oni
- Timestamp:
- Feb 4, 2013, 12:00:01 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r657 r663 208 208 public static void install(TreeSet<Package> mods, 209 209 InstallProgressListener listener) { 210 try {211 createEmptyPath(Paths.getEditionGDF());212 } catch (IOException e) {213 e.printStackTrace();214 }215 216 210 File logFile = new File(Paths.getInstallerPath(), "Installation.log"); 217 211 PrintWriter log = null; … … 226 220 227 221 log.println(); 228 log.println("AEI2 version: " + SwingJavaBuilder.getConfig().getResource("appversion")); 222 log.println("AEI2 version: " 223 + SwingJavaBuilder.getConfig().getResource("appversion")); 229 224 log.println("Installed tools:"); 230 225 for (Package t : PackageManager.getInstance().getInstalledTools()) { … … 236 231 } 237 232 log.println(); 233 234 Paths.getEditionGDF().mkdirs(); 235 for (File f : Paths.getEditionGDF().listFiles(new FilenameFilter() { 236 public boolean accept(File arg0, String arg1) { 237 String s = arg1.toLowerCase(); 238 return s.endsWith(".dat") 239 || s.endsWith(".raw") 240 || s.endsWith(".sep") 241 || (s.equals("intro.bik") && !Settings.getInstance() 242 .get("copyintro", false)) 243 || (s.equals("outro.bik") && !Settings.getInstance() 244 .get("copyoutro", false)); 245 } 246 })) { 247 f.delete(); 248 } 249 File IGMD = new File(Paths.getEditionGDF(), "IGMD"); 250 if (IGMD.exists()) { 251 for (File f : IGMD.listFiles(new FileFilter() { 252 @Override 253 public boolean accept(File pathname) { 254 return pathname.isDirectory(); 255 } 256 })) { 257 File ignore = new File(f, "ignore.txt"); 258 if (!ignore.exists()) { 259 try { 260 FileUtils.deleteDirectory(f); 261 } catch (IOException e) { 262 // TODO Auto-generated catch block 263 e.printStackTrace(); 264 } 265 } 266 } 267 } 238 268 239 269 File installCfg = new File(Paths.getEditionGDF(), "installed_mods.xml"); … … 267 297 } 268 298 } 269 299 270 300 combineBinaryFiles(foldersOni, listener, log); 271 301 combineBSLFolders(mods, listener, log); … … 370 400 if (!targetPath.exists()) 371 401 targetPath.mkdir(); 372 for (File fbsl : f.listFiles()) { 373 File targetFile = new File(targetPath, fbsl.getName()); 374 if (addon || !targetFile.exists()) { 375 try { 376 FileUtils.copyFile(fbsl, targetFile); 377 } catch (IOException e) { 378 e.printStackTrace(); 402 if (!(new File(targetPath, "ignore.txt").exists())) { 403 for (File fbsl : f.listFiles()) { 404 File targetFile = new File(targetPath, fbsl.getName()); 405 if (addon || !targetFile.exists()) { 406 try { 407 FileUtils.copyFile(fbsl, targetFile); 408 } catch (IOException e) { 409 e.printStackTrace(); 410 } 379 411 } 380 412 }
Note:
See TracChangeset
for help on using the changeset viewer.