Changeset 744 for java/installer2/src/net/oni2
- Timestamp:
- Mar 26, 2013, 1:22:47 PM (12 years ago)
- Location:
- java/installer2/src/net/oni2/aeinstaller
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r737 r744 314 314 } 315 315 316 TreeMap<String, Vector<File>> levels = new TreeMap<String, Vector<File>>(new NaturalOrderComparator()); 316 TreeMap<String, Vector<File>> levels = new TreeMap<String, Vector<File>>( 317 new NaturalOrderComparator()); 317 318 for (File path : foldersOni) { 318 319 for (File levelF : path.listFiles()) { … … 479 480 tmpFolder.mkdir(); 480 481 481 TreeMap<String, Vector<File>> patches = new TreeMap<String, Vector<File>>(new NaturalOrderComparator()); 482 TreeMap<String, Vector<File>> patches = new TreeMap<String, Vector<File>>( 483 new NaturalOrderComparator()); 482 484 for (File patchFolder : patchFolders) { 483 485 for (File levelFolder : patchFolder.listFiles(dirFileFilter)) { … … 563 565 logAppOutput(res, log); 564 566 565 // Apply patches in levelFolderXML 567 // Create masterpatch file (containing calls to all individual 568 // patches) 569 File masterpatch = new File(levelFolderXML, "masterpatch.oni-patch"); 570 PrintWriter masterpatchWriter = null; 571 try { 572 masterpatchWriter = new PrintWriter(masterpatch); 573 } catch (FileNotFoundException e) { 574 e.printStackTrace(); 575 } 566 576 for (File patch : patches.get(level)) { 567 577 String patternWildcard = patch.getName(); … … 570 580 patternWildcard = patternWildcard + ".xml"; 571 581 patternWildcard = patternWildcard.replace('-', '*'); 572 573 res = XMLTools.patch(patch, new File(levelFolderXML, 574 patternWildcard)); 575 logAppOutput(res, log); 576 } 582 File xmlFilePath = new File(levelFolderXML, patternWildcard); 583 masterpatchWriter.println(String.format("@COMMAND patchfile -filename:\"%s\" -forceinfiles:\"%s\"", patch.getPath(), xmlFilePath.getPath())); 584 } 585 masterpatchWriter.close(); 586 // Apply patches through masterpatch in levelFolderXML 587 res = XMLTools.patch(masterpatch, null); 588 logAppOutput(res, log); 577 589 578 590 // Create .oni files from XML … … 749 761 750 762 log.println("Reimporting levels"); 751 TreeSet<File> initFolders = new TreeSet<File>(new NaturalOrderComparator()); 763 TreeSet<File> initFolders = new TreeSet<File>( 764 new NaturalOrderComparator()); 752 765 for (File f : init.listFiles()) { 753 766 initFolders.add(f); -
java/installer2/src/net/oni2/aeinstaller/backend/oni/XMLTools.java
r720 r744 32 32 params.add("patchfile"); 33 33 params.add("-filename:" + patch.getPath()); 34 params.add("-forceinfiles:" + source.getPath()); 34 if (source != null) 35 params.add("-forceinfiles:" + source.getPath()); 35 36 ApplicationInvocationResult res = null; 36 37 try { -
java/installer2/src/net/oni2/aeinstaller/gui/MainWin.yml
r735 r744 3 3 title: appname 4 4 size: 950x600 5 minimumSize: 400x3005 minimumSize: 850x300 6 6 locationRelativeTo: null 7 7 defaultCloseOperation: doNothingOnClose … … 28 28 - JMenuItem(action=exitAction) 29 29 - JMenu(name=fileMenu, text=menu.file): 30 - JMenuItem(action=runOniFull)31 - JMenuItem(action=runOniWin)32 - JSeparator()33 30 - JMenuItem(action=update) 34 31 - JSeparator() … … 88 85 >btnRunOniWin=1 [min] 89 86 - MigLayout: | 87 [[gap 0px 0px, novisualpadding, insets 0]] 90 88 [min] [grow] [min] 91 89 panBottomLeft panBottomCenter panBottomRight [min]
Note:
See TracChangeset
for help on using the changeset viewer.