Changeset 773 for java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
- Timestamp:
- Apr 1, 2013, 2:13:33 PM (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
java/installer2/src/net/oni2/aeinstaller/gui/MainWin.java
r772 r773 54 54 import net.oni2.aeinstaller.backend.packages.PackageManager; 55 55 import net.oni2.aeinstaller.backend.packages.Type; 56 import net.oni2.aeinstaller.backend.packages.download.ModDownloader;57 import net.oni2.aeinstaller.backend.packages.download.ModDownloader.State;58 import net.oni2.aeinstaller.backend.packages.download.ModDownloaderListener;59 56 import net.oni2.aeinstaller.gui.about.AboutDialog; 60 57 import net.oni2.aeinstaller.gui.corepackages.CorePackagesDialog; … … 357 354 private void doUpdate() { 358 355 if (execUpdates != null && execUpdates.size() > 0) { 359 Downloader dl = new Downloader(execUpdates, null );356 Downloader dl = new Downloader(execUpdates, null, false); 360 357 try { 361 358 dl.setVisible(true); … … 504 501 try { 505 502 ApplicationInvoker.execute(m.getExeType(), 506 m.getWorkingDir(), m.getExeFile(), null, false); 503 m.getWorkingDir(), m.getExeFile(), null, 504 false); 507 505 } catch (ERuntimeNotInstalledException e) { 508 506 JOptionPane.showMessageDialog(null, … … 547 545 } 548 546 549 @ DoInBackground(progressMessage = "checkCorePackages.title", cancelable = false, indeterminateProgress = false)550 private void checkCorePackages( final BackgroundEvent evt) {547 @SuppressWarnings("unused") 548 private void checkCorePackages() { 551 549 if (!SettingsManager.getInstance().isOfflineMode()) { 552 550 for (Package m : PackageManager.getInstance().getCoreTools()) { … … 561 559 } 562 560 if (execCoreUpdates.size() > 0) { 563 ModDownloader m = new ModDownloader(execCoreUpdates, 564 new ModDownloaderListener() { 565 @Override 566 public void updateStatus(ModDownloader source, 567 Package currentDownload, State state, 568 int filesDown, int filesTotal, 569 int bytesDown, int bytesTotal, 570 int duration, int remaining, int speed) { 571 evt.setProgressEnd(filesTotal); 572 evt.setProgressValue(filesDown); 573 } 574 }); 575 while (!m.isFinished()) { 576 try { 577 Thread.sleep(10); 578 } catch (InterruptedException e) { 579 e.printStackTrace(); 580 } 581 } 582 } 583 evt.setProgressMessage(bundle.getString("coreToolsInstall.title")); 561 Downloader dl = new Downloader(execCoreUpdates, null, true); 562 try { 563 dl.setVisible(true); 564 } finally { 565 dl.dispose(); 566 } 567 } 584 568 ToolsManager.installTools(PackageManager.getInstance() 585 569 .getCoreTools(), false); … … 626 610 627 611 if (toDownload.size() > 0) { 628 Downloader dl = new Downloader(toDownload, installDeps );612 Downloader dl = new Downloader(toDownload, installDeps, false); 629 613 try { 630 614 dl.setVisible(true);
Note:
See TracChangeset
for help on using the changeset viewer.