public void duringShow() {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_PREVIOUS);
Thread t = new Thread() {
public void run() {
InstallData installData = InstallData.getInstance();
if ( ! installData.preInstallDone() ) {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_NEXT);
Controller.checkPackagePathExistence(installData);
Controller.checkPackageFormat(installData);
if (( installData.getOSType().equalsIgnoreCase("SunOS") ) && ( installData.isMultiLingual() )) {
Controller.collectSystemLanguages(installData);
}
PackageDescription packageData = SetupDataProvider.getPackageDescription();
Installer installer = InstallerFactory.getInstance();
installer.preInstall(packageData);
installData.setPreInstallDone(true);
if ( SystemManager.logModuleStates() ) {
installData.setLogModuleStates(true);
}
if ( installData.logModuleStates() ) {
Dumper.logModuleStates(packageData, "Prologue Dialog");
}
if (( installData.getOSType().equalsIgnoreCase("SunOS") ) && ( installData.isMultiLingual() )) {
ModuleCtrl.checkLanguagesPackages(packageData, installData);
// int count = installData.getPreselectedLanguages();
// System.err.println("Number of preselected language packages: " + count);
if ( installData.getPreselectedLanguages() == 0 ) {
// Something misterious happened. Setting all languages again.
ModuleCtrl.setLanguagesPackages(packageData);
}
if ( installData.logModuleStates() ) {
Dumper.logModuleStates(packageData, "Prologue Dialog Language Selection");
}
}
if ( ! installData.isMultiLingual() ) {
ModuleCtrl.setHiddenLanguageModuleDefaultSettings(packageData);
if ( installData.logModuleStates() ) {
Dumper.logModuleStates(packageData, "after setHiddenLanguageModuleDefaultSettings");
}
}
if (( installData.isRootInstallation() ) && ( installData.getOSType().equalsIgnoreCase("SunOS") )) {
// Check, if root has write access in /usr and /etc .
// In sparse zones with imported directories this is not always the case.
if ( Controller.reducedRootWritePrivileges() ) {
ModuleCtrl.setIgnoreNonRelocatablePackages(packageData);
}
if ( installData.logModuleStates() ) {
Dumper.logModuleStates(packageData, "after setIgnoreNonRelocatablePackages");
}
}
if ( installData.isRootInstallation() ) {
// Setting installation directory!
String dir = "/";
installData.setInstallDir(dir);
installData.setInstallDefaultDir(installData.getDefaultDir());
Controller.checkForNewerVersion(installData);
// Check Write privileges in installation directory (installData.getInstallDefaultDir())
// If the directory exists, is has to be tested, whether the user has write access
dir = installData.getInstallDefaultDir();
if ( SystemManager.exists_directory(dir) ) {
if ( ! Controller.createdSubDirectory(dir) ) {
System.err.println("ERROR: No write privileges inside directory: " + dir);
System.exit(1);
}
}
// If the directory does not exist, is has to be tested, whether the user can create it
if ( ! SystemManager.exists_directory(dir)) {
if ( ! Controller.createdDirectory(dir) ) {
System.err.println("ERROR: No privileges to create directory: " + dir);
System.exit(1);
}
}
// Setting macro
SetupDataProvider.setNewMacro("DIR", dir); // important for string replacement
// Calculate available disc space
int discSpace = SystemManager.calculateDiscSpace(dir);
installData.setAvailableDiscSpace(discSpace);
if ( ! installData.databaseAnalyzed()) {
ModuleCtrl.defaultDatabaseAnalysis(installData);
installData.setDatabaseAnalyzed(true);
}
}
getSetupFrame().setButtonEnabled(true, getSetupFrame().BUTTON_NEXT);
}