Пример #1
0
 @Override
 public void finishedInstallation() {
   try {
     File folderForVersionToRun = updateSystem.getFolderForVersionToRun();
     Properties properties = new Properties();
     properties.setProperty(
         "library.folder",
         FilenameUtils.separatorsToUnix(folderForVersionToRun.getAbsolutePath()));
     new PropertiesSaver("anathema.properties").save(properties);
   } catch (IOException e) {
     // handle exception
   }
 }
Пример #2
0
 @Override
 public void execute() {
   Version currentVersion = getCurrentVersion();
   UpdateSystem updateSystem = createUpdateSystem(currentVersion);
   Updater updater = updateSystem.checkForUpdates();
   Version installedVersion = updateSystem.getInstalledVersion();
   UpdateDialogPage page = new UpdateDialogPage(resources, currentVersion);
   prepareForInstallation(page, updater);
   DefaultDialogConfiguration dialogConfiguration =
       DefaultDialogConfiguration.createWithOkOnly(page);
   UserDialog dialog =
       new UserDialog(SwingApplicationFrame.getParentComponent(), dialogConfiguration);
   updateSystem.reportAllProgressTo(new VersionDiscoveryReport(page, installedVersion));
   updateSystem.reportAllProgressTo(new InstallationProgressReport(page));
   updateSystem.reportAllProgressTo(new DialogUpdater(dialog));
   updateSystem.reportAllProgressTo(new ConfigureAnathema(updateSystem));
   dialog.getDialog().setModal(false);
   dialog.show();
   runUpdateCheck(updater);
 }