return s;
}
public void beforeShow() {
ChooseDirectory panel = (ChooseDirectory)getPanel();
InstallData data = InstallData.getInstance();
panel.setDirectory(data.getInstallDir());
if ( data.isSolarisUserInstallation() ) {
if ( data.getInstallRoot() == null ) {
String rootDir = "/";
// System.getenv only supported in Java 1.5, property set in shell script
// if (( System.getenv("HOME") != null ) && ( ! System.getenv("HOME").equals(""))) {
// rootDir = System.getenv("HOME");
// }
if (( System.getProperty("HOME") != null ) && ( ! System.getProperty("HOME").equals("") )) {
rootDir = System.getProperty("user.home");
}
data.setInstallRoot(rootDir);
}
panel.setRootDirectory(data.getInstallRoot());
}
// In change of installations with root privileges, the destination directory is fix.
// Therefore before the directory selection dialog is shown, it has to be controlled,
// if there are already installed products.
// In installations with user privileges, this can only be checked, after the
// destination directory is controlled.
if ( data.isRootInstallation() ) {
// LogManager.setCommandsHeaderLine("Checking change installation");
// InstallChangeCtrl.checkInstallChange(data, panel); // <- much earlier!
// InstallChangeCtrl.checkInstallChange(data); // <- much earlier!
if (data.isChangeInstallation()) {
panel.setDirectory(data.getInstallDir());
panel.disableDirectoryField();
panel.disableBrowseButton();
// Maintenance mode
if ( data.sameVersionExists() ) {
String dialogTitle = ResourceManager.getString("String_ChooseDirectory1_Maintain");
panel.setTitleText(dialogTitle);
// String dialogText = ResourceManager.getString("String_ChooseDirectory2_Maintain");
// panel.setDialogText(dialogText);
}
// Update mode
if ( data.olderVersionExists() ) {
String dialogTitle = ResourceManager.getString("String_ChooseDirectory1_Update");
panel.setTitleText(dialogTitle);
// String dialogText = ResourceManager.getString("String_ChooseDirectory2_Update");
// panel.setDialogText(dialogText);
}
}
}