- Timestamp:
- Feb 4, 2014, 8:36:53 PM (11 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/backend/oni/management/Installer.java
r810 r924 7 7 import java.io.IOException; 8 8 import java.io.InputStream; 9 import java.io.PrintWriter;10 9 import java.text.SimpleDateFormat; 11 10 import java.util.Date; … … 480 479 log.logAppOutput(res, true); 481 480 482 // Create masterpatch file (containing calls to all individual 483 // patches) 484 File masterpatch = new File(levelFolderXML, "masterpatch.oni-patch"); 485 PrintWriter masterpatchWriter = null; 486 try { 487 masterpatchWriter = new PrintWriter(masterpatch); 488 } catch (FileNotFoundException e) { 489 e.printStackTrace(); 490 } 491 for (File patch : patches.get(level)) { 492 String patternWildcard = patch.getName(); 493 patternWildcard = patternWildcard.substring(0, 494 patternWildcard.indexOf(".oni-patch")); 495 patternWildcard = patternWildcard + ".xml"; 496 patternWildcard = patternWildcard.replace('-', '*'); 497 File xmlFilePath = new File(levelFolderXML, patternWildcard); 498 masterpatchWriter 499 .println(String 500 .format("@COMMAND patchfile -filename:\"%s\" -forceinfiles:\"%s\"", 501 patch.getPath(), xmlFilePath.getPath())); 502 } 503 masterpatchWriter.close(); 504 // Apply patches through masterpatch in levelFolderXML 505 res = XMLTools.patch(masterpatch, null); 506 log.logAppOutput(res, false); 481 // Apply patches in levelFolderXML 482 File lastFolder = null; 483 for (File f : patches.get(level)) { 484 File pathOfPatch = f.getParentFile(); 485 if (!pathOfPatch.equals(lastFolder)) { 486 lastFolder = pathOfPatch; 487 488 res = XMLTools.patch(pathOfPatch, levelFolderXML); 489 log.logAppOutput(res, false); 490 } 491 } 507 492 508 493 // Create .oni files from XML
Note:
See TracChangeset
for help on using the changeset viewer.