}
});
try
{
fireValidationEvent(new ValidationEvent(InstallProgressPanel.this, false, false, false, false));
t.start();
if (InstallationWizard.CURRENT_OS == InstallationWizard.OS_WIN)
{
WindowsInstallerExec windowsInstallerExec = new WindowsInstallerExec(
installationWizard.getConfig().getString("win.product.guid"),
installationWizard.getJavaHome(),
installationWizard.getInstallDir(),
!installationWizard.areStartMenuShortcutsEnabled(),
!installationWizard.areDesktopShortcutsEnabled(),
installationWizard.getNotAssociatedExtensions());
windowsInstallerExec.install();
windowsInstallerExec.dispose();
t.stop();
}
else if (InstallationWizard.CURRENT_OS == InstallationWizard.OS_UNIX)
{
UnixInstallerExec unixInstallerExec = new UnixInstallerExec(
installationWizard.getJavaHome(),
installationWizard.getInstallDir(),
installationWizard.getDesktopFolder(),
installationWizard.areDesktopShortcutsEnabled());
unixInstallerExec.install();
unixInstallerExec.dispose();
t.stop();
}
else
{
t.stop();
throw new AssertionError("Bad OS");
}
progressBar.setValue(progressBar.getMaximum());
label .setText(translator.getString("installprogress.success.label"));
detailsLabel.setText(translator.getString("installprogress.success.details"));
wasCompleted = true;
}
catch(final JixException e)
{
t.stop();
progressBar.setValue(0);
try
{
label .setText(translator.getString("installprogress.failed.label"));
detailsLabel.setText(translator.getString("installprogress.failed.details"));
}
catch (JixException e1)
{
e1.printStackTrace();
}
detailsButtonPanel.add(detailsButton);
detailsButton.addActionListener(new ActionListener()
{
public void actionPerformed(ActionEvent arg0)
{
ErrorDetailsDialog errorDetailsDialog = new ErrorDetailsDialog(e);
errorDetailsDialog.openDialog();
errorDetailsDialog.dispose();
return;
}
});
updateUI();
}
catch(IOException e)
{
t.stop();
progressBar.setValue(0);
ErrorDetailsDialog errorDetailsDialog = new ErrorDetailsDialog(new JixException(e));
errorDetailsDialog.setVisible(true);
errorDetailsDialog.dispose();
}
fireValidationEvent(new ValidationEvent(InstallProgressPanel.this, true, false, false));
}
});
fireValidationEvent(false);
}