Changeset 749 for java/installer2/src/net/oni2/aeinstaller/gui
- Timestamp:
- Mar 26, 2013, 6:26:41 PM (12 years ago)
- Location:
- java/installer2/src/net/oni2/aeinstaller/gui
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r720 r749 45 45 import net.oni2.aeinstaller.backend.Paths; 46 46 import net.oni2.aeinstaller.backend.SizeFormatter; 47 import net.oni2.aeinstaller.backend.depot.DepotManager;48 import net.oni2.aeinstaller.backend.oni.InstallProgressListener;49 import net.oni2.aeinstaller.backend.oni.Installer;50 47 import net.oni2.aeinstaller.backend.oni.OniLauncher; 51 48 import net.oni2.aeinstaller.backend.oni.OniSplit; 49 import net.oni2.aeinstaller.backend.oni.management.Initializer; 50 import net.oni2.aeinstaller.backend.oni.management.InstallProgressListener; 51 import net.oni2.aeinstaller.backend.oni.management.Installer; 52 import net.oni2.aeinstaller.backend.oni.management.ToolsManager; 52 53 import net.oni2.aeinstaller.backend.packages.Package; 53 54 import net.oni2.aeinstaller.backend.packages.PackageManager; … … 67 68 import net.oni2.aeinstaller.gui.settings.SettingsDialog; 68 69 import net.oni2.aeinstaller.gui.toolmanager.ToolManager; 70 import net.oni2.moddepot.DepotManager; 69 71 import net.oni2.platformtools.PlatformInformation; 70 72 import net.oni2.platformtools.PlatformInformation.Platform; … … 205 207 @DoInBackground(progressMessage = "updateDepot.title", cancelable = false, indeterminateProgress = false) 206 208 private void execDepotUpdate(final BackgroundEvent evt) { 209 DepotManager.loadFromCacheFile(Paths.getDepotCacheFilename()); 210 207 211 if (!SettingsManager.getInstance().isOfflineMode() 208 212 && !SettingsManager.getInstance().isNoCacheUpdateMode()) { 209 213 long start = new Date().getTime(); 210 214 211 try { 212 DepotManager.getInstance().updateInformation(); 213 } catch (Exception e) { 214 e.printStackTrace(); 215 } 215 if (DepotManager.getInstance().updateInformation()) 216 DepotManager.getInstance().saveToCacheFile( 217 Paths.getDepotCacheFilename()); 216 218 217 219 System.out.println("Took: " + (new Date().getTime() - start) … … 360 362 dl.setVisible(true); 361 363 if (dl.isFinished()) { 362 TreeSet<Integer> installed = Installer.getInstalledTools(); 364 TreeSet<Integer> installed = ToolsManager 365 .getInstalledTools(); 363 366 TreeSet<Package> tools = new TreeSet<Package>(); 364 367 for (Package m : execUpdates) … … 367 370 tools.add(m); 368 371 if (tools.size() > 0) { 369 Installer.installTools(tools, false);372 ToolsManager.installTools(tools, false); 370 373 } 371 374 } … … 461 464 @DoInBackground(progressMessage = "initializingEdition.title", cancelable = false, indeterminateProgress = false) 462 465 private void reglobalize(final BackgroundEvent evt) { 463 In staller.initializeEdition(new InstallProgressListener() {466 Initializer.initializeEdition(new InstallProgressListener() { 464 467 @Override 465 468 public void installProgressUpdate(int done, int total, String step) { … … 580 583 } 581 584 evt.setProgressMessage(bundle.getString("coreToolsInstall.title")); 582 Installer.installTools(PackageManager.getInstance().getCoreTools(),583 false);585 ToolsManager.installTools(PackageManager.getInstance() 586 .getCoreTools(), false); 584 587 } 585 588 } … … 731 734 732 735 if (actuallyTools.size() > 0) { 733 Installer.installTools(actuallyTools, false);736 ToolsManager.installTools(actuallyTools, false); 734 737 } 735 738 } … … 847 850 private void initialize(final BackgroundEvent evt) { 848 851 if (!Installer.isEditionInitialized()) { 849 In staller.initializeEdition(new InstallProgressListener() {852 Initializer.initializeEdition(new InstallProgressListener() { 850 853 @Override 851 854 public void installProgressUpdate(int done, int total, -
java/installer2/src/net/oni2/aeinstaller/gui/toolmanager/ToolManager.java
r720 r749 18 18 19 19 import net.oni2.SettingsManager; 20 import net.oni2.aeinstaller.backend.oni. Installer;20 import net.oni2.aeinstaller.backend.oni.management.ToolsManager; 21 21 import net.oni2.aeinstaller.backend.packages.Package; 22 22 import net.oni2.aeinstaller.gui.downloadwindow.Downloader; … … 97 97 TreeSet<Package> tools = new TreeSet<Package>(); 98 98 tools.add(selectedPackage); 99 Installer.installTools(tools, true);99 ToolsManager.installTools(tools, true); 100 100 } else { 101 101 if (!selectedPackage.isLocalAvailable()) { … … 123 123 TreeSet<Package> tools = new TreeSet<Package>(); 124 124 tools.add(selectedPackage); 125 Installer.installTools(tools, false);125 ToolsManager.installTools(tools, false); 126 126 } 127 127 }
Note:
See TracChangeset
for help on using the changeset viewer.