Changeset 648 for AE/installer2/src/net/oni2/aeinstaller/backend/oni
- Timestamp:
- Jan 25, 2013, 1:15:31 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
AE/installer2/src/net/oni2/aeinstaller/backend/oni/Installer.java
r631 r648 24 24 import net.oni2.aeinstaller.backend.Settings; 25 25 import net.oni2.aeinstaller.backend.Settings.Platform; 26 import net.oni2.aeinstaller.backend. mods.EBSLInstallType;27 import net.oni2.aeinstaller.backend. mods.Mod;28 import net.oni2.aeinstaller.backend. mods.ModManager;26 import net.oni2.aeinstaller.backend.packages.EBSLInstallType; 27 import net.oni2.aeinstaller.backend.packages.Package; 28 import net.oni2.aeinstaller.backend.packages.PackageManager; 29 29 30 30 import org.apache.commons.io.FileUtils; … … 62 62 public static Vector<Integer> getInstalledMods() { 63 63 File installCfg = new File(Paths.getEditionGDF(), "installed_mods.xml"); 64 return ModManager.getInstance().loadModSelection(installCfg);64 return PackageManager.getInstance().loadModSelection(installCfg); 65 65 } 66 66 … … 109 109 * Tools to install 110 110 */ 111 public static void installTools(TreeSet< Mod> tools) {111 public static void installTools(TreeSet<Package> tools) { 112 112 TreeSet<Integer> installed = getInstalledTools(); 113 for ( Modm : tools) {113 for (Package m : tools) { 114 114 File plain = new File(m.getLocalPath(), "plain"); 115 115 if (plain.exists()) { … … 138 138 * Tools to uninstall 139 139 */ 140 public static void uninstallTools(TreeSet< Mod> tools) {140 public static void uninstallTools(TreeSet<Package> tools) { 141 141 TreeSet<Integer> installed = getInstalledTools(); 142 for ( Modm : tools) {142 for (Package m : tools) { 143 143 if (installed.contains(m.getPackageNumber())) { 144 144 File plain = new File(m.getLocalPath(), "plain"); … … 205 205 * Listener for install progress updates 206 206 */ 207 public static void install(TreeSet< Mod> mods,207 public static void install(TreeSet<Package> mods, 208 208 InstallProgressListener listener) { 209 209 try { … … 214 214 215 215 File installCfg = new File(Paths.getEditionGDF(), "installed_mods.xml"); 216 ModManager.getInstance().saveModSelection(installCfg, mods);216 PackageManager.getInstance().saveModSelection(installCfg, mods); 217 217 218 218 HashSet<Integer> unlockLevels = new HashSet<Integer>(); … … 221 221 foldersOni.add(Paths.getVanillaOnisPath()); 222 222 223 for ( Modm : mods) {223 for (Package m : mods) { 224 224 for (int lev : m.getUnlockLevels()) 225 225 unlockLevels.add(lev); … … 253 253 } 254 254 255 private static void combineBSLFolders(TreeSet< Mod> mods,255 private static void combineBSLFolders(TreeSet<Package> mods, 256 256 InstallProgressListener listener) { 257 257 listener.installProgressUpdate(95, 100, "Installing BSL files"); 258 258 259 HashMap<EBSLInstallType, Vector< Mod>> modsToInclude = new HashMap<EBSLInstallType, Vector<Mod>>();260 modsToInclude.put(EBSLInstallType.NORMAL, new Vector< Mod>());261 modsToInclude.put(EBSLInstallType.ADDON, new Vector< Mod>());262 263 for ( Modm : mods.descendingSet()) {259 HashMap<EBSLInstallType, Vector<Package>> modsToInclude = new HashMap<EBSLInstallType, Vector<Package>>(); 260 modsToInclude.put(EBSLInstallType.NORMAL, new Vector<Package>()); 261 modsToInclude.put(EBSLInstallType.ADDON, new Vector<Package>()); 262 263 for (Package m : mods.descendingSet()) { 264 264 File bsl = new File(m.getLocalPath(), "bsl"); 265 265 if (bsl.exists()) { … … 281 281 } 282 282 283 for ( Modm : modsToInclude.get(EBSLInstallType.NORMAL)) {283 for (Package m : modsToInclude.get(EBSLInstallType.NORMAL)) { 284 284 copyBSL(m, false); 285 285 } 286 Vector< Mod> addons = modsToInclude.get(EBSLInstallType.ADDON);286 Vector<Package> addons = modsToInclude.get(EBSLInstallType.ADDON); 287 287 for (int i = addons.size() - 1; i >= 0; i--) { 288 288 copyBSL(addons.get(i), true); … … 290 290 } 291 291 292 private static void copyBSL( ModsourceMod, boolean addon) {292 private static void copyBSL(Package sourceMod, boolean addon) { 293 293 File targetBaseFolder = new File(Paths.getEditionGDF(), "IGMD"); 294 294 if (!targetBaseFolder.exists())
Note:
See TracChangeset
for help on using the changeset viewer.