summaryrefslogtreecommitdiff
path: root/javainstaller2/src/JavaSetup/org/openoffice
diff options
context:
space:
mode:
Diffstat (limited to 'javainstaller2/src/JavaSetup/org/openoffice')
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/AcceptLicenseCtrl.java16
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseComponentsCtrl.java50
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseDirectoryCtrl.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseInstallationTypeCtrl.java52
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationComponentsCtrl.java22
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationTypeCtrl.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationCompletedCtrl.java20
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationImminentCtrl.java28
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java28
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/PrologueCtrl.java36
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationCompletedCtrl.java24
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationImminentCtrl.java22
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationOngoingCtrl.java32
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java38
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/DeckOfPanels.java10
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DatabaseDialog.java8
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java34
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java34
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java72
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/Installer.java6
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/InstallerFactory.java6
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java220
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java92
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java130
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java96
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Main.java10
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/AcceptLicense.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseDirectory.java62
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java44
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java30
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java16
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java20
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java16
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java28
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java8
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationPrologue.java16
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/PanelController.java30
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java24
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java12
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/ResourceManager.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupActionListener.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/DisplayPackageDescription.java52
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java120
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java54
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/SetupDataProvider.java4
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/XMLPackageDescription.java74
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java82
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/AbortInstaller.java6
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Calculator.java12
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java58
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Converter.java18
-rw-r--r--javainstaller2/src/JavaSetup/org/openoffice/setup/Util/DialogFocusTraversalPolicy.java48
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java60
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/ExecuteProcess.java20
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/FileExtensionFilter.java6
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoCtrl.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java58
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Informer.java4
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java18
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/LogManager.java20
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java202
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java42
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Parser.java6
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/SystemManager.java94
69 files changed, 1396 insertions, 1396 deletions
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/AcceptLicenseCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/AcceptLicenseCtrl.java
index 025b96a7990d..8a1f390f8450 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/AcceptLicenseCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/AcceptLicenseCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,7 +40,7 @@ public class AcceptLicenseCtrl extends PanelController {
super("AcceptLicense", new AcceptLicense());
helpFile = "String_Helpfile_AcceptLicense";
}
-
+
public String getNext() {
InstallData data = InstallData.getInstance();
@@ -48,23 +48,23 @@ public class AcceptLicenseCtrl extends PanelController {
if ( data.olderVersionExists() ) {
return new String("InstallationImminent");
} else if ( data.sameVersionExists() ) {
- return new String("ChooseComponents");
+ return new String("ChooseComponents");
} else {
return new String("ChooseInstallationType");
}
} else {
- return new String("ChooseDirectory");
+ return new String("ChooseDirectory");
}
}
-
+
public String getPrevious() {
return new String("Prologue");
- }
+ }
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public void beforeShow() {
String StringInstall = ResourceManager.getString("String_AcceptLicense");
getSetupFrame().setButtonText(StringInstall, getSetupFrame().BUTTON_NEXT);
@@ -73,5 +73,5 @@ public class AcceptLicenseCtrl extends PanelController {
getSetupFrame().setButtonSelected(getSetupFrame().BUTTON_CANCEL);
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseComponentsCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseComponentsCtrl.java
index e6eeda82d7b6..1ab3edc7a6cb 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseComponentsCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseComponentsCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,15 +52,15 @@ public class ChooseComponentsCtrl extends PanelController {
public String getNext() {
return new String("InstallationImminent");
}
-
+
public String getPrevious() {
InstallData data = InstallData.getInstance();
-
+
if ( data.isRootInstallation() ) {
if ( data.sameVersionExists() ) {
if ( data.hideEula() ) {
- return new String("Prologue");
+ return new String("Prologue");
} else {
return new String("AcceptLicense");
}
@@ -69,7 +69,7 @@ public class ChooseComponentsCtrl extends PanelController {
}
} else {
if ( data.sameVersionExists() ) {
- return new String("ChooseDirectory");
+ return new String("ChooseDirectory");
} else {
return new String("ChooseInstallationType");
}
@@ -79,11 +79,11 @@ public class ChooseComponentsCtrl extends PanelController {
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public void beforeShow() {
InstallData data = InstallData.getInstance();
-
+
// Setting the package size for node modules, that have hidden children
// -> Java module has three hidden children and 0 byte size
@@ -92,39 +92,39 @@ public class ChooseComponentsCtrl extends PanelController {
ModuleCtrl.setModuleSize(packageData);
data.setModuleSizeSet(true);
}
-
+
if ( data.sameVersionExists() ) {
ChooseComponents panel = (ChooseComponents)getPanel();
String dialogTitle = ResourceManager.getString("String_ChooseComponents1_Maintain");
panel.setTitleText(dialogTitle);
}
-
+
}
-
+
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
InstallData data = InstallData.getInstance();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
-
+
if ( nextButtonPressed ) {
-
+
// Check, if at least one visible module was selected for installation
data.setVisibleModulesChecked(false);
ModuleCtrl.checkVisibleModulesInstall(packageData, data);
-
+
if ( data.visibleModulesChecked() ) {
// Check, if at least one application module was selected for installation
// (not necessary, if an older product is updated or additional modules are
// added in maintenance mode).
-
+
boolean applicationSelected = false;
if ( data.olderVersionExists() || data.sameVersionExists() ) {
- applicationSelected = true;
+ applicationSelected = true;
} else {
data.setApplicationModulesChecked(false);
- ModuleCtrl.checkApplicationSelection(packageData, data);
+ ModuleCtrl.checkApplicationSelection(packageData, data);
applicationSelected = data.applicationModulesChecked();
}
@@ -133,16 +133,16 @@ public class ChooseComponentsCtrl extends PanelController {
// Check, if at least one language module was selected for installation
// (not necessary, if an older product is updated or additional modules are
// added in maintenance mode).
-
+
boolean languageSelected = false;
if ( data.olderVersionExists() || data.sameVersionExists() || ( ! data.isMultiLingual())) {
- languageSelected = true;
+ languageSelected = true;
} else {
data.setLanguageModulesChecked(false);
- ModuleCtrl.checkLanguageSelection(packageData, data);
+ ModuleCtrl.checkLanguageSelection(packageData, data);
languageSelected = data.languageModulesChecked();
}
-
+
if ( languageSelected ) {
// Set module settings for hidden modules.
@@ -175,7 +175,7 @@ public class ChooseComponentsCtrl extends PanelController {
ResourceManager.getString("String_No_Language_Selected_2");
String title = ResourceManager.getString("String_Change_Selection");
Informer.showInfoMessage(message, title);
- repeatDialog = true;
+ repeatDialog = true;
}
} else {
String message = ResourceManager.getString("String_No_Application_Selected_1") + "\n" +
@@ -183,7 +183,7 @@ public class ChooseComponentsCtrl extends PanelController {
String title = ResourceManager.getString("String_Change_Selection");
Informer.showInfoMessage(message, title);
repeatDialog = true;
- }
+ }
} else { // no modules selected for installation
String message = ResourceManager.getString("String_No_Components_Selected_1") + "\n" +
ResourceManager.getString("String_No_Components_Selected_2");
@@ -195,10 +195,10 @@ public class ChooseComponentsCtrl extends PanelController {
// Saving typical selection state values (always if back button is pressed!).
// System.err.println("Saving custom selection states");
ModuleCtrl.saveCustomSelectionStates(packageData);
- data.setCustomSelectionStateSaved(true);
+ data.setCustomSelectionStateSaved(true);
}
-
+
return repeatDialog;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseDirectoryCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseDirectoryCtrl.java
index 4a3bfab8452e..deecd854e77c 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseDirectoryCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseDirectoryCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,7 +53,7 @@ import org.openoffice.setup.Util.PackageCollector;
public class ChooseDirectoryCtrl extends PanelController {
private String helpFile;
-
+
public ChooseDirectoryCtrl() {
super("ChooseDirectory", new ChooseDirectory());
helpFile = "String_Helpfile_ChooseDirectory";
@@ -66,17 +66,17 @@ public class ChooseDirectoryCtrl extends PanelController {
if ( data.olderVersionExists() ) {
return new String("InstallationImminent");
} else if ( data.sameVersionExists() ) {
- return new String("ChooseComponents");
+ return new String("ChooseComponents");
} else {
return new String("ChooseInstallationType");
}
}
-
+
public String getPrevious() {
InstallData data = InstallData.getInstance();
if ( data.hideEula() ) {
- return new String("Prologue");
+ return new String("Prologue");
} else {
return new String("AcceptLicense");
}
@@ -94,14 +94,14 @@ public class ChooseDirectoryCtrl extends PanelController {
}
// mask spaces
// s.replaceAll(" ", "\\ ");
-
+
return s;
}
public void beforeShow() {
ChooseDirectory panel = (ChooseDirectory)getPanel();
InstallData data = InstallData.getInstance();
-
+
if ( data.getInstallDir() == null ) {
String installDir = data.getDefaultDir();
@@ -127,7 +127,7 @@ public class ChooseDirectoryCtrl extends PanelController {
dir = removeEndingDelimiter(dir);
InstallData data = InstallData.getInstance();
data.setInstallDir(dir);
-
+
File installDefaultDir = new File(dir, data.getDefaultDir());
data.setInstallDefaultDir(installDefaultDir.getPath());
@@ -167,13 +167,13 @@ public class ChooseDirectoryCtrl extends PanelController {
}
// Additional tasks, if the directory is okay
-
+
if ( ! repeatDialog ) {
// Calculate available disc space
int discSpace = SystemManager.calculateDiscSpace(dir);
data.setAvailableDiscSpace(discSpace);
- Installer installer = InstallerFactory.getInstance();
+ Installer installer = InstallerFactory.getInstance();
// Is this a new directory, or one that was already set before.
// In this case, the database does not need to be evaluated again.
@@ -183,12 +183,12 @@ public class ChooseDirectoryCtrl extends PanelController {
String oldDatabasePath = data.getDatabasePath();
// Setting the database path
installer.defineDatabasePath();
-
+
if (( oldDatabasePath == null ) || ( ! oldDatabasePath.equals(data.getDatabasePath()))) {
data.setDatabaseAnalyzed(false);
data.setDatabaseQueried(false);
} else {
- data.setDatabaseAnalyzed(true);
+ data.setDatabaseAnalyzed(true);
}
}
@@ -202,16 +202,16 @@ public class ChooseDirectoryCtrl extends PanelController {
InstallChangeCtrl.checkInstallChange(data);
// InstallChangeCtrl.checkInstallChange(data, panel);
}
-
+
// At this point it is clear, whether the update-Package is installed or not.
// If it is installed, it is also clear, in which version it is installed.
- // Therefore the following dialog is also defined.
-
+ // Therefore the following dialog is also defined.
+
if ( data.newerVersionExists() ) {
// This can happen only in installation with user privileges.
- // Installations with root privileges have cancelled installation
+ // Installations with root privileges have cancelled installation
// already at first dialog.
- // Possibility to select a new directory, in which no
+ // Possibility to select a new directory, in which no
// newer product exists
String message = ResourceManager.getString("String_Newer_Version_Installed_Found") + "\n" + data.getInstallDir() + "\n" +
ResourceManager.getString("String_Newer_Version_Database") + ": " + data.getDatabasePath() + "\n" +
@@ -221,15 +221,15 @@ public class ChooseDirectoryCtrl extends PanelController {
repeatDialog = true;
}
-
+
// If an older version is found, and the update is forbidden, the user
// can select another installation directory.
if ( data.olderVersionExists() && data.dontUpdate() ) {
// This can happen only in installation with user privileges.
- // Installations with root privileges have cancelled installation
+ // Installations with root privileges have cancelled installation
// already at first dialog (InstallChangeCtrl.java).
- // Possibility to select a new directory, in which no
+ // Possibility to select a new directory, in which no
// older product exists
String message = ResourceManager.getString("String_Older_Version_Installed_Found") + "\n" + data.getInstallDir() + "\n" +
ResourceManager.getString("String_Newer_Version_Database") + ": " + data.getDatabasePath() + "\n" +
@@ -249,7 +249,7 @@ public class ChooseDirectoryCtrl extends PanelController {
}
}
}
-
+
return repeatDialog;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseInstallationTypeCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseInstallationTypeCtrl.java
index 25432ae7def3..ee7bea2e6f30 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseInstallationTypeCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseInstallationTypeCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,47 +41,47 @@ import java.util.Vector;
import org.openoffice.setup.Util.PackageCollector;
public class ChooseInstallationTypeCtrl extends PanelController implements ActionListener {
-
+
private String helpFile;
-
+
public ChooseInstallationTypeCtrl() {
super("ChooseInstallationType", new ChooseInstallationType());
helpFile = "String_Helpfile_ChooseInstallationType";
}
-
+
public String getNext() {
InstallData data = InstallData.getInstance();
-
+
if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
return new String("ChooseComponents");
} else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
- return new String("InstallationImminent");
+ return new String("InstallationImminent");
} else {
- System.err.println("Error: Unknown installation type!" );
- return new String("Error");
+ System.err.println("Error: Unknown installation type!" );
+ return new String("Error");
}
}
-
+
public String getPrevious() {
InstallData data = InstallData.getInstance();
-
+
if ( data.isRootInstallation() ) {
if ( data.hideEula() ) {
- return new String("Prologue");
+ return new String("Prologue");
} else {
return new String("AcceptLicense");
}
} else {
return new String("ChooseDirectory");
}
- }
+ }
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public void beforeShow() {
InstallData data = InstallData.getInstance();
@@ -91,22 +91,22 @@ public class ChooseInstallationTypeCtrl extends PanelController implements Actio
panel.setTypicalActionCommand(data.getTypicalActionCommand());
panel.setCustomActionCommand(data.getCustomActionCommand());
}
-
+
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
ChooseInstallationType panel = (ChooseInstallationType)getPanel();
panel.removeActionListener((ChooseInstallationTypeCtrl)this);
-
+
if ( nextButtonPressed ) {
-
+
InstallData data = InstallData.getInstance();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
-
+
// If typical selection state values have been saved before,
// it is now time to restore them
-
+
if ( data.typicalSelectionStateSaved()) {
// System.err.println("Restoring typical selection states");
ModuleCtrl.restoreTypicalSelectionStates(packageData);
@@ -125,7 +125,7 @@ public class ChooseInstallationTypeCtrl extends PanelController implements Actio
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseInstallationType: After setHiddenModuleSettingsInstall");
}
-
+
// Collecting packages to install
Vector installPackages = new Vector();
PackageCollector.collectInstallPackages(packageData, installPackages);
@@ -134,7 +134,7 @@ public class ChooseInstallationTypeCtrl extends PanelController implements Actio
// Check disc space
if ( Calculator.notEnoughDiscSpace(data) ) {
repeatDialog = true;
- }
+ }
}
// Custom installation type
@@ -145,7 +145,7 @@ public class ChooseInstallationTypeCtrl extends PanelController implements Actio
ModuleCtrl.saveTypicalSelectionStates(packageData);
data.setTypicalSelectionStateSaved(true);
}
-
+
// Setting custom selection state values, if they have been saved before.
if ( data.customSelectionStateSaved() ) {
// System.err.println("Restoring custom selection states");
@@ -156,19 +156,19 @@ public class ChooseInstallationTypeCtrl extends PanelController implements Actio
return repeatDialog;
}
-
+
public void actionPerformed(ActionEvent evt) {
InstallData data = InstallData.getInstance();
if (evt.getActionCommand().equals(data.getTypicalActionCommand())) {
data.setInstallationType(data.getTypicalActionCommand());
- // System.err.println("Setting installation type: " + data.getTypicalActionCommand());
+ // System.err.println("Setting installation type: " + data.getTypicalActionCommand());
} else if (evt.getActionCommand().equals(data.getCustomActionCommand())) {
data.setInstallationType(data.getCustomActionCommand());
- // System.err.println("Setting installation type: " + data.getCustomActionCommand());
+ // System.err.println("Setting installation type: " + data.getCustomActionCommand());
}
-
+
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationComponentsCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationComponentsCtrl.java
index 15ae15654d28..69f01439a188 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationComponentsCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationComponentsCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -45,19 +45,19 @@ public class ChooseUninstallationComponentsCtrl extends PanelController {
super("ChooseUninstallationComponents", new ChooseUninstallationComponents());
helpFile = "String_Helpfile_ChooseUninstallationComponents";
}
-
+
public String getNext() {
return new String("UninstallationImminent");
}
-
+
public String getPrevious() {
return new String("ChooseUninstallationType");
- }
+ }
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
@@ -79,7 +79,7 @@ public class ChooseUninstallationComponentsCtrl extends PanelController {
ResourceManager.getString("String_No_Uninstallcomponents_Selected_2");
String title = ResourceManager.getString("String_Nothing_To_Uninstall");
Informer.showInfoMessage(message, title);
- repeatDialog = true;
+ repeatDialog = true;
} else {
// Check, if all visible modules are selected for uninstallation.
// Then this shall be handled as complete uninstallation
@@ -89,12 +89,12 @@ public class ChooseUninstallationComponentsCtrl extends PanelController {
// If this is not a complete uninstallation, at least one language
// module or one application module has to be installed.
-
+
if ( ! data.isMaskedCompleteUninstallation() ) {
data.setApplicationModulesChecked(false);
ModuleCtrl.checkApplicationModulesUninstall(packageData, data);
-
+
if ( ! data.applicationModulesChecked() ) {
String message = ResourceManager.getString("String_All_Applicationcomponents_Selected_1") + "\n" +
@@ -122,10 +122,10 @@ public class ChooseUninstallationComponentsCtrl extends PanelController {
} else { // the back button was pressed
// Saving typical selection state values (always if back button is pressed!).
ModuleCtrl.saveCustomSelectionStates(packageData);
- data.setCustomSelectionStateSaved(true);
+ data.setCustomSelectionStateSaved(true);
}
-
+
return repeatDialog;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationTypeCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationTypeCtrl.java
index d1c5e69430db..e24f3859fbad 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationTypeCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/ChooseUninstallationTypeCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,32 +37,32 @@ import org.openoffice.setup.SetupData.SetupDataProvider;
import org.openoffice.setup.Util.ModuleCtrl;
public class ChooseUninstallationTypeCtrl extends PanelController implements ActionListener {
-
+
private String helpFile;
-
+
public ChooseUninstallationTypeCtrl() {
super("ChooseUninstallationType", new ChooseUninstallationType());
helpFile = "String_Helpfile_ChooseUninstallationType";
}
-
+
public String getNext() {
InstallData data = InstallData.getInstance();
-
+
if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
return new String("ChooseUninstallationComponents");
} else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
- return new String("UninstallationImminent");
+ return new String("UninstallationImminent");
} else {
- System.err.println("Error: Unknown uninstallation type!" );
- return new String("Error");
+ System.err.println("Error: Unknown uninstallation type!" );
+ return new String("Error");
}
}
-
+
public String getPrevious() {
return new String("UninstallationPrologue");
- }
-
+ }
+
public void beforeShow() {
InstallData data = InstallData.getInstance();
@@ -75,20 +75,20 @@ public class ChooseUninstallationTypeCtrl extends PanelController implements Act
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
-
+
ChooseUninstallationType panel = (ChooseUninstallationType)getPanel();
panel.removeActionListener((ChooseUninstallationTypeCtrl)this);
-
+
if ( nextButtonPressed ) {
InstallData data = InstallData.getInstance();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
-
+
// Typical uninstallation type
if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
// If typical selection state values have been saved before,
// it is now time to restore them
-
+
if ( data.typicalSelectionStateSaved()) {
ModuleCtrl.restoreTypicalSelectionStates(packageData);
}
@@ -100,7 +100,7 @@ public class ChooseUninstallationTypeCtrl extends PanelController implements Act
if ( ! data.typicalSelectionStateSaved()) {
ModuleCtrl.saveTypicalSelectionStates(packageData);
data.setTypicalSelectionStateSaved(true);
- }
+ }
// Setting custom selection state values, if they have been saved before.
if ( data.customSelectionStateSaved() ) {
@@ -111,23 +111,23 @@ public class ChooseUninstallationTypeCtrl extends PanelController implements Act
return repeatDialog;
}
-
+
public void actionPerformed(ActionEvent evt) {
InstallData data = InstallData.getInstance();
if (evt.getActionCommand().equals(data.getTypicalActionCommand())) {
data.setInstallationType(data.getTypicalActionCommand());
- // System.err.println("Setting uninstallation type: " + data.getTypicalActionCommand());
+ // System.err.println("Setting uninstallation type: " + data.getTypicalActionCommand());
} else if (evt.getActionCommand().equals(data.getCustomActionCommand())) {
data.setInstallationType(data.getCustomActionCommand());
- // System.err.println("Setting uninstallation type: " + data.getCustomActionCommand());
+ // System.err.println("Setting uninstallation type: " + data.getCustomActionCommand());
}
-
+
}
public final String getHelpFileName () {
return this.helpFile;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationCompletedCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationCompletedCtrl.java
index fc14c238da0b..39342969dca2 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationCompletedCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationCompletedCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ public class InstallationCompletedCtrl extends PanelController {
super("InstallationCompleted", new installationCompleted());
helpFile = "String_Helpfile_InstallationCompleted";
}
-
+
public void beforeShow() {
InstallData installData = InstallData.getInstance();
ProductDescription productData = SetupDataProvider.getProductDescription();
@@ -58,12 +58,12 @@ public class InstallationCompletedCtrl extends PanelController {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_HELP);
getSetupFrame().removeButtonIcon(getSetupFrame().BUTTON_NEXT);
getSetupFrame().setButtonSelected(getSetupFrame().BUTTON_NEXT);
-
+
installationCompleted panel = (installationCompleted)getPanel();
panel.setDetailsButtonActionCommand(getSetupFrame().ACTION_DETAILS);
panel.addDetailsButtonActionListener(getSetupFrame().getSetupActionListener());
- if ( installData.isAbortedInstallation() ) {
+ if ( installData.isAbortedInstallation() ) {
String titleText = ResourceManager.getString("String_InstallationCompleted1_Abort");
panel.setTitleText(titleText);
String dialogText = ResourceManager.getString("String_InstallationCompleted2_Abort");
@@ -72,7 +72,7 @@ public class InstallationCompletedCtrl extends PanelController {
String titleText = ResourceManager.getString("String_InstallationCompleted1_Error");
panel.setTitleText(titleText);
String dialogText = ResourceManager.getString("String_InstallationCompleted2_Error");
- panel.setDialogText(dialogText);
+ panel.setDialogText(dialogText);
}
htmlInfoText = InfoCtrl.setHtmlFrame("header", htmlInfoText);
@@ -83,27 +83,27 @@ public class InstallationCompletedCtrl extends PanelController {
public void duringShow() {
Thread t = new Thread() {
public void run() {
- PackageDescription packageData = SetupDataProvider.getPackageDescription();
+ PackageDescription packageData = SetupDataProvider.getPackageDescription();
Installer installer = InstallerFactory.getInstance();
installer.postInstall(packageData);
}
};
- t.start();
+ t.start();
}
public String getNext() {
return null;
}
-
+
public String getPrevious() {
return null;
}
-
+
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public String getDialogText() {
return htmlInfoText;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationImminentCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationImminentCtrl.java
index 0130607acc36..b2629f6137c2 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationImminentCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationImminentCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -50,11 +50,11 @@ public class InstallationImminentCtrl extends PanelController {
super("InstallationImminent", new InstallationImminent());
helpFile = "String_Helpfile_InstallationImminent";
}
-
+
public String getNext() {
return new String("InstallationOngoing");
}
-
+
public String getPrevious() {
InstallData data = InstallData.getInstance();
@@ -62,7 +62,7 @@ public class InstallationImminentCtrl extends PanelController {
if ( data.isRootInstallation() ) {
if ( data.olderVersionExists() ) {
if ( data.hideEula() ) {
- return new String("Prologue");
+ return new String("Prologue");
} else {
return new String("AcceptLicense");
}
@@ -72,10 +72,10 @@ public class InstallationImminentCtrl extends PanelController {
if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
return new String("ChooseComponents");
} else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
- return new String("ChooseInstallationType");
+ return new String("ChooseInstallationType");
} else {
- System.err.println("Error: Unknown installation type!" );
- return new String("Error");
+ System.err.println("Error: Unknown installation type!" );
+ return new String("Error");
}
}
} else {
@@ -87,14 +87,14 @@ public class InstallationImminentCtrl extends PanelController {
if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
return new String("ChooseComponents");
} else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
- return new String("ChooseInstallationType");
+ return new String("ChooseInstallationType");
} else {
- System.err.println("Error: Unknown installation type!" );
- return new String("Error");
+ System.err.println("Error: Unknown installation type!" );
+ return new String("Error");
}
}
}
- }
+ }
public final String getHelpFileName () {
return this.helpFile;
@@ -103,7 +103,7 @@ public class InstallationImminentCtrl extends PanelController {
public void beforeShow() {
String StringInstall = ResourceManager.getString("String_Install");
getSetupFrame().setButtonText(StringInstall, getSetupFrame().BUTTON_NEXT);
-
+
ProductDescription productData = SetupDataProvider.getProductDescription();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
// Dumper.dumpPackageSettings(packageData);
@@ -115,7 +115,7 @@ public class InstallationImminentCtrl extends PanelController {
InstallationImminent panel = (InstallationImminent)getPanel();
panel.setInfoText(htmlInfoText);
panel.setCaretPosition();
-
+
// Update mode
InstallData data = InstallData.getInstance();
if ( data.olderVersionExists() ) {
@@ -149,7 +149,7 @@ public class InstallationImminentCtrl extends PanelController {
repeatDialog = true;
}
}
-
+
return repeatDialog;
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java
index b435b480eaea..2cdaa16cb561 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/InstallationOngoingCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,20 +46,20 @@ public class InstallationOngoingCtrl extends PanelController {
private String helpFile;
private String nextDialog = new String("InstallationCompleted");
private String previousDialog = new String("InstallationImminent");
-
+
public InstallationOngoingCtrl() {
super("InstallationOngoing", new InstallationOngoing());
helpFile = "String_Helpfile_InstallationOngoing";
}
-
+
public String getNext() {
return new String("InstallationCompleted");
}
-
+
public String getPrevious() {
return new String("InstallationImminent");
}
-
+
public final String getHelpFileName () {
return this.helpFile;
}
@@ -89,15 +89,15 @@ public class InstallationOngoingCtrl extends PanelController {
PackageCollector.sortPackages(installData.getOldPackages(), sortedUninstallPackages, "uninstall");
installData.setOldPackages(sortedUninstallPackages);
}
-
+
Installer installer = InstallerFactory.getInstance();
installer.preInstallationOngoing();
}
-
+
public void duringShow() {
-
+
Thread t = new Thread() {
-
+
InstallData installData = InstallData.getInstance();
InstallationOngoing panel = (InstallationOngoing)getPanel();
Vector installPackages = installData.getInstallPackages();
@@ -130,10 +130,10 @@ public class InstallationOngoingCtrl extends PanelController {
installer.installPackage(packageData);
installedPackages.add(packageData);
-
+
if ( installData.isAbortedInstallation() ) {
break;
- }
+ }
}
if ( installData.isMajorUpgrade() ) {
@@ -167,8 +167,8 @@ public class InstallationOngoingCtrl extends PanelController {
SystemManager.deleteFile(removeFile);
}
}
-
- installer.postInstallationOngoing();
+
+ installer.postInstallationOngoing();
String next = getNext();
getSetupFrame().setCurrentPanel(next, false, true);
@@ -186,7 +186,7 @@ public class InstallationOngoingCtrl extends PanelController {
InstallData installData = InstallData.getInstance();
if ( ! installData.isAbortedInstallation() ) {
- InfoDir.prepareUninstallation();
+ InfoDir.prepareUninstallation();
}
return repeatDialog;
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/PrologueCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/PrologueCtrl.java
index 85c682f9dee6..0d3fc1f2fcdb 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/PrologueCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/PrologueCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,18 +40,18 @@ import org.openoffice.setup.Util.ModuleCtrl;
import org.openoffice.setup.Util.SystemManager;
public class PrologueCtrl extends PanelController {
-
+
private String helpFile;
public PrologueCtrl() {
super("Prologue", new Prologue());
helpFile = "String_Helpfile_Prologue";
}
-
+
// public void beforeShow() {
public void duringShow() {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_PREVIOUS);
-
+
Thread t = new Thread() {
public void run() {
InstallData installData = InstallData.getInstance();
@@ -60,7 +60,7 @@ public class PrologueCtrl extends PanelController {
Controller.checkPackagePathExistence(installData);
Controller.checkPackageFormat(installData);
-
+
if (( installData.getOSType().equalsIgnoreCase("SunOS") ) && ( installData.isMultiLingual() )) {
Controller.collectSystemLanguages(installData);
}
@@ -81,12 +81,12 @@ public class PrologueCtrl extends PanelController {
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.
+ // Something misterious happened. Setting all languages again.
ModuleCtrl.setLanguagesPackages(packageData);
}
@@ -145,11 +145,11 @@ public class PrologueCtrl extends PanelController {
// 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);
@@ -162,13 +162,13 @@ public class PrologueCtrl extends PanelController {
};
t.start();
}
-
+
public boolean afterShow(boolean nextButtonPressed) {
boolean repeatDialog = false;
getSetupFrame().setButtonEnabled(true, getSetupFrame().BUTTON_PREVIOUS);
return repeatDialog;
}
-
+
public String getNext() {
InstallData data = InstallData.getInstance();
@@ -177,24 +177,24 @@ public class PrologueCtrl extends PanelController {
if ( data.olderVersionExists() ) {
return new String("InstallationImminent");
} else if ( data.sameVersionExists() ) {
- return new String("ChooseComponents");
+ return new String("ChooseComponents");
} else {
return new String("ChooseInstallationType");
}
} else {
- return new String("ChooseDirectory");
- }
+ return new String("ChooseDirectory");
+ }
} else {
return new String("AcceptLicense");
}
}
-
+
public String getPrevious() {
return null;
}
-
+
public final String getHelpFileName() {
return this.helpFile;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationCompletedCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationCompletedCtrl.java
index 837f28546728..cb895dc43772 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationCompletedCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationCompletedCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,23 +51,23 @@ public class UninstallationCompletedCtrl extends PanelController {
public void beforeShow() {
InstallData installData = InstallData.getInstance();
ProductDescription productData = SetupDataProvider.getProductDescription();
-
+
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_PREVIOUS);
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_CANCEL);
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_HELP);
getSetupFrame().removeButtonIcon(getSetupFrame().BUTTON_NEXT);
getSetupFrame().setButtonSelected(getSetupFrame().BUTTON_NEXT);
-
+
UninstallationCompleted panel = (UninstallationCompleted)getPanel();
panel.setDetailsButtonActionCommand(getSetupFrame().ACTION_DETAILS);
panel.addDetailsButtonActionListener(getSetupFrame().getSetupActionListener());
-
+
if (( installData.isCustomInstallation() ) && ( ! installData.isMaskedCompleteUninstallation() )) {
String dialogText = ResourceManager.getString("String_UninstallationCompleted2_Partial");
- panel.setDialogText(dialogText);
+ panel.setDialogText(dialogText);
}
-
- if ( installData.isAbortedInstallation() ) {
+
+ if ( installData.isAbortedInstallation() ) {
String titleText = ResourceManager.getString("String_UninstallationCompleted1_Abort");
panel.setTitleText(titleText);
String dialogText = ResourceManager.getString("String_UninstallationCompleted2_Abort");
@@ -76,26 +76,26 @@ public class UninstallationCompletedCtrl extends PanelController {
String titleText = ResourceManager.getString("String_UninstallationCompleted1_Error");
panel.setTitleText(titleText);
String dialogText = ResourceManager.getString("String_UninstallationCompleted2_Error");
- panel.setDialogText(dialogText);
+ panel.setDialogText(dialogText);
}
htmlInfoText = InfoCtrl.setHtmlFrame("header", htmlInfoText);
htmlInfoText = InfoCtrl.setInstallLogInfoText(productData, htmlInfoText);
htmlInfoText = InfoCtrl.setHtmlFrame("end", htmlInfoText);
}
-
+
public String getNext() {
return null;
}
-
+
public String getPrevious() {
return null;
}
-
+
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public String getDialogText() {
return htmlInfoText;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationImminentCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationImminentCtrl.java
index 00b7ff25de31..d8f74a50ab32 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationImminentCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationImminentCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,11 +46,11 @@ public class UninstallationImminentCtrl extends PanelController {
super("UninstallationImminent", new UninstallationImminent());
helpFile = "String_Helpfile_UninstallationImminent";
}
-
+
public String getNext() {
return new String("UninstallationOngoing");
}
-
+
public String getPrevious() {
InstallData data = InstallData.getInstance();
@@ -58,12 +58,12 @@ public class UninstallationImminentCtrl extends PanelController {
if ( data.getInstallationType().equals(data.getCustomActionCommand()) ) {
return new String("ChooseUninstallationComponents");
} else if ( data.getInstallationType().equals(data.getTypicalActionCommand()) ) {
- return new String("ChooseUninstallationType");
+ return new String("ChooseUninstallationType");
} else {
- System.err.println("Error: Unknown uninstallation type!" );
- return new String("Error");
+ System.err.println("Error: Unknown uninstallation type!" );
+ return new String("Error");
}
- }
+ }
public final String getHelpFileName () {
return this.helpFile;
@@ -72,7 +72,7 @@ public class UninstallationImminentCtrl extends PanelController {
public void beforeShow() {
String StringInstall = ResourceManager.getString("String_Uninstall");
getSetupFrame().setButtonText(StringInstall, getSetupFrame().BUTTON_NEXT);
-
+
ProductDescription productData = SetupDataProvider.getProductDescription();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
@@ -88,7 +88,7 @@ public class UninstallationImminentCtrl extends PanelController {
// System.err.println("\nUninstallation module state dump 3:");
// Dumper.dumpModuleStates(packageData);
}
-
+
public void duringShow() {
UninstallationImminent panel = (UninstallationImminent)getPanel();
panel.setTabOrder();
@@ -105,8 +105,8 @@ public class UninstallationImminentCtrl extends PanelController {
// System.err.println("\nUninstallation module state dump 4:");
// Dumper.dumpModuleStates(packageData);
}
-
+
return repeatDialog;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationOngoingCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationOngoingCtrl.java
index a5065cc0e905..4c95d13e4c70 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationOngoingCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationOngoingCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,7 +41,7 @@ import java.util.Vector;
public class UninstallationOngoingCtrl extends PanelController {
private String helpFile;
-
+
public UninstallationOngoingCtrl() {
super("UninstallationOngoing", new UninstallationOngoing());
helpFile = "String_Helpfile_UninstallationOngoing";
@@ -50,7 +50,7 @@ public class UninstallationOngoingCtrl extends PanelController {
public String getNext() {
return new String("UninstallationCompleted");
}
-
+
public String getPrevious() {
return new String("UninstallationImminent");
}
@@ -58,7 +58,7 @@ public class UninstallationOngoingCtrl extends PanelController {
public final String getHelpFileName () {
return this.helpFile;
}
-
+
public void beforeShow() {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_PREVIOUS);
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_NEXT);
@@ -80,27 +80,27 @@ public class UninstallationOngoingCtrl extends PanelController {
data.setInstallPackages(sortedPackages);
// collectPackages(packageData);
-
+
Installer installer = InstallerFactory.getInstance();
installer.preInstallationOngoing();
}
-
+
public void duringShow() {
Thread t = new Thread() {
-
+
UninstallationOngoing panel = (UninstallationOngoing)getPanel();
InstallData installData = InstallData.getInstance();
Vector uninstallPackages = installData.getInstallPackages();
-
+
public void run() {
LogManager.setCommandsHeaderLine("Uninstallation");
Installer installer = InstallerFactory.getInstance();
-
+
for (int i = 0; i < uninstallPackages.size(); i++) {
PackageDescription packageData = (PackageDescription) uninstallPackages.get(i);
int progress = java.lang.Math.round((100*(i+1))/uninstallPackages.size());
- panel.setProgressValue(progress);
+ panel.setProgressValue(progress);
panel.setProgressText(packageData.getPackageName());
installer.uninstallPackage(packageData);
@@ -109,21 +109,21 @@ public class UninstallationOngoingCtrl extends PanelController {
break;
}
}
-
+
if ( installData.isAbortedInstallation() ) {
LogManager.setCommandsHeaderLine("Uninstallation aborted!");
// undoing the uninstallation is not possible
}
- installer.postUninstallationOngoing();
+ installer.postUninstallationOngoing();
- String next = getNext();
- getSetupFrame().setCurrentPanel(next, false, true);
+ String next = getNext();
+ getSetupFrame().setCurrentPanel(next, false, true);
}
};
-
+
t.start();
-
+
}
public boolean afterShow(boolean nextButtonPressed) {
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java
index 1e35db23454d..bd3519497ebd 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Controller/UninstallationPrologueCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,7 +48,7 @@ import org.openoffice.setup.ResourceManager;
public class UninstallationPrologueCtrl extends PanelController {
private String helpFile;
-
+
public UninstallationPrologueCtrl() {
super("UninstallationPrologue", new UninstallationPrologue());
helpFile = "String_Helpfile_UninstallationPrologue";
@@ -57,11 +57,11 @@ public class UninstallationPrologueCtrl extends PanelController {
public String getNext() {
return new String("ChooseUninstallationType");
}
-
+
public String getPrevious() {
return null;
}
-
+
public final String getHelpFileName () {
return this.helpFile;
}
@@ -77,7 +77,7 @@ public class UninstallationPrologueCtrl extends PanelController {
// for (int i = 0; i < infoFileContent.size(); i++) {
// System.out.println(infoFileContent.get(i));
// }
-
+
// Iterator m = map.entrySet().iterator();
// while ( m.hasNext() ) {
// Map.Entry entry = (Map.Entry) m.next();
@@ -86,7 +86,7 @@ public class UninstallationPrologueCtrl extends PanelController {
return map;
}
-
+
private void setNewInstallData(HashMap map) {
InstallData data = InstallData.getInstance();
// adding information to installData
@@ -97,16 +97,16 @@ public class UninstallationPrologueCtrl extends PanelController {
data.setAdminFileNameNoRelocNoDepends((String)map.get("AdminFileNoRelocNoDepends"));
data.setDatabasePath((String)map.get("DatabasePath"));
data.setInstallDir((String)map.get("InstallationDir"));
- data.setStoredInstallationPrivileges((String)map.get("InstallationPrivileges"));
+ data.setStoredInstallationPrivileges((String)map.get("InstallationPrivileges"));
data.setGetUidPath((String)map.get("GetUidFile"));
}
-
+
private void readInfoFile() {
HashMap map = getInfoFileData();
setNewInstallData(map);
Dumper.dumpNewInstallData();
}
-
+
private void checkUninstallPrivileges() {
InstallData data = InstallData.getInstance();
// data.setStoredInstallationPrivileges((String)map.get("InstallationPrivileges"));
@@ -120,7 +120,7 @@ public class UninstallationPrologueCtrl extends PanelController {
Informer.showErrorMessage(message, title);
String log = "<b>Error: Wrong uninstallation privileges (currently Root)!</b><br>";
System.err.println(log);
- // LogManager.addLogfileComment(log);
+ // LogManager.addLogfileComment(log);
} else {
String message = ResourceManager.getString("String_UninstallationPrologue_Wrong_Privileges_Current_User");
String title = ResourceManager.getString("String_Error");
@@ -129,15 +129,15 @@ public class UninstallationPrologueCtrl extends PanelController {
System.err.println(log);
// LogManager.addLogfileComment(log);
}
- System.exit(1);
+ System.exit(1);
}
}
-
+
public void beforeShow() {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_PREVIOUS);
// System.err.println("\nUninstallation module state dump 1:");
- // PackageDescription packageData = SetupDataProvider.getPackageDescription();
+ // PackageDescription packageData = SetupDataProvider.getPackageDescription();
// ModuleCtrl.dumpModuleStates(packageData);
getSetupFrame().setButtonSelected(getSetupFrame().BUTTON_NEXT);
}
@@ -149,15 +149,15 @@ public class UninstallationPrologueCtrl extends PanelController {
InstallData installData = InstallData.getInstance();
if ( ! installData.databaseAnalyzed() ) {
getSetupFrame().setButtonEnabled(false, getSetupFrame().BUTTON_NEXT);
-
+
// now it is time to read the infoFile in directory "installData.getInfoRoot()"
readInfoFile();
-
+
// controlling the installation privileges. Are the original installation privileges
// identical with the current deinstallation privileges?
checkUninstallPrivileges();
- PackageDescription packageData = SetupDataProvider.getPackageDescription();
+ PackageDescription packageData = SetupDataProvider.getPackageDescription();
Installer installer = InstallerFactory.getInstance();
installer.preUninstall(packageData);
@@ -173,8 +173,8 @@ public class UninstallationPrologueCtrl extends PanelController {
}
}
};
-
- t.start();
+
+ t.start();
}
public boolean afterShow(boolean nextButtonPressed) {
@@ -182,5 +182,5 @@ public class UninstallationPrologueCtrl extends PanelController {
getSetupFrame().setButtonEnabled(true, getSetupFrame().BUTTON_PREVIOUS);
return repeatDialog;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/DeckOfPanels.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/DeckOfPanels.java
index c433307ed2f1..1471b068f6dc 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/DeckOfPanels.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/DeckOfPanels.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,20 +33,20 @@ public class DeckOfPanels {
private PanelController mCurrent;
private HashMap mDeck;
-
+
public DeckOfPanels() {
mDeck = new HashMap();
mCurrent = null;
}
-
+
void addPanel(PanelController panel, String name) {
mDeck.put(name, panel);
}
-
+
public PanelController getCurrentPanel () {
return mCurrent;
}
-
+
public PanelController setCurrentPanel(String name) {
mCurrent = (PanelController)mDeck.get(name);
return mCurrent;
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DatabaseDialog.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DatabaseDialog.java
index 9df39ec2d517..2d0682bbdd9c 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DatabaseDialog.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DatabaseDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ import javax.swing.border.EmptyBorder;
import org.openoffice.setup.ResourceManager;
public class DatabaseDialog extends JDialog {
-
+
public DatabaseDialog(SetupFrame setupFrame) {
// super(setupFrame.getDialog());
@@ -48,12 +48,12 @@ public class DatabaseDialog extends JDialog {
setTitle(text1);
this.getContentPane().setLayout(new java.awt.BorderLayout());
-
+
JPanel toppanel = new JPanel();
toppanel.setLayout(new java.awt.BorderLayout());
toppanel.setBorder(new EmptyBorder(new Insets(50, 50, 50, 50)));
- PanelLabel label1 = new PanelLabel(text2);
+ PanelLabel label1 = new PanelLabel(text2);
toppanel.add(label1, BorderLayout.NORTH);
Container contentPane = this.getContentPane();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java
index c21d1e663cae..af72ef8cee3d 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/DetailsDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -52,7 +52,7 @@ public class DetailsDialog extends JDialog implements ActionListener {
private JButton okButton;
private String helpFileName;
private String helpFileString;
-
+
public DetailsDialog(SetupFrame setupFrame) {
super(setupFrame.getDialog());
@@ -61,14 +61,14 @@ public class DetailsDialog extends JDialog implements ActionListener {
String dialogTitle = ResourceManager.getString("String_InstallationCompleted_Button");
String dialogText = setupFrame.getCurrentPanel().getDialogText();
-
+
setTitle(dialogTitle);
this.getContentPane().setLayout(new java.awt.BorderLayout());
-
+
JPanel toppanel = new JPanel();
toppanel.setLayout(new java.awt.BorderLayout());
toppanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
-
+
JPanel buttonpanel = new JPanel();
buttonpanel.setLayout(new java.awt.FlowLayout());
buttonpanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
@@ -101,39 +101,39 @@ public class DetailsDialog extends JDialog implements ActionListener {
okButton.addActionListener(this);
JSeparator separator = new JSeparator();
-
+
// toppanel.add(label1, BorderLayout.NORTH);
- // toppanel.add(label2, BorderLayout.CENTER);
- buttonpanel.add(okButton);
+ // toppanel.add(label2, BorderLayout.CENTER);
+ buttonpanel.add(okButton);
this.getContentPane().add(toppanel, BorderLayout.NORTH);
this.getContentPane().add(editorScrollPane, BorderLayout.CENTER);
this.getContentPane().add(buttonpanel, BorderLayout.SOUTH);
-
+
// JScrollBar ScrollBar = editorScrollPane.getVerticalScrollBar();
// if ( ScrollBar.isShowing() ) {
// editorPane.setFocusable(false);
// } else {
- // editorPane.setFocusable(true);
+ // editorPane.setFocusable(true);
// }
-
- // Setting tab-order and focus on okButton
+
+ // Setting tab-order and focus on okButton
DialogFocusTraversalPolicy policy = new DialogFocusTraversalPolicy(new JComponent[] {okButton, editorScrollPane});
this.setFocusTraversalPolicy(policy); // set policy
this.setFocusCycleRoot(true); // enable policy
}
-
+
private JEditorPane createEditorPane(String dialogText) {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
editorPane.setContentType("text/html");
- editorPane.setText(dialogText);
+ editorPane.setText(dialogText);
return editorPane;
- }
-
+ }
+
public void actionPerformed (java.awt.event.ActionEvent evt) {
setVisible(false);
- dispose();
+ dispose();
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java
index 3fd9b1976e0c..ecc8afdcebc6 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Dialogs/HelpDialog.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,22 +53,22 @@ public class HelpDialog extends JDialog implements ActionListener {
private JScrollPane editorScrollPane;
private String helpFileName;
private String helpFileString;
-
+
public HelpDialog(SetupFrame setupFrame) {
super(setupFrame.getDialog());
InstallData data = InstallData.getInstance();
-
+
helpFileString = setupFrame.getCurrentPanel().getHelpFileName();
helpFileName = ResourceManager.getFileName(helpFileString);
// String dialogName = setupFrame.getCurrentPanel().getName();
-
- String helpTitle = ResourceManager.getString("String_Help");
+
+ String helpTitle = ResourceManager.getString("String_Help");
setTitle(helpTitle);
// setLayout(new java.awt.BorderLayout());
this.getContentPane().setLayout(new java.awt.BorderLayout());
-
+
JPanel toppanel = new JPanel();
toppanel.setLayout(new java.awt.BorderLayout());
toppanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
@@ -89,11 +89,11 @@ public class HelpDialog extends JDialog implements ActionListener {
// String helpTitle1 = null;
// InstallData data = InstallData.getInstance();
// if ( data.isInstallationMode() ) {
- // helpTitle1 = ResourceManager.getString("String_Help_Title_1");
+ // helpTitle1 = ResourceManager.getString("String_Help_Title_1");
// } else {
// helpTitle1 = ResourceManager.getString("String_Help_Title_1_Uninstallation");
// }
-
+
// PanelLabel label1 = new PanelLabel(helpTitle1, true);
// String helpTitle2 = ResourceManager.getString("String_Help_Title_2");
// PanelLabel label2 = new PanelLabel(helpTitle2);
@@ -105,21 +105,21 @@ public class HelpDialog extends JDialog implements ActionListener {
if ( data.useRtl() ) { okButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
JSeparator separator = new JSeparator();
-
+
// toppanel.add(label1, BorderLayout.NORTH);
- // toppanel.add(label2, BorderLayout.CENTER);
- buttonpanel.add(okButton);
+ // toppanel.add(label2, BorderLayout.CENTER);
+ buttonpanel.add(okButton);
this.getContentPane().add(toppanel, BorderLayout.NORTH);
this.getContentPane().add(editorScrollPane, BorderLayout.CENTER);
this.getContentPane().add(buttonpanel, BorderLayout.SOUTH);
- // Setting tab-order and focus on okButton
+ // Setting tab-order and focus on okButton
DialogFocusTraversalPolicy policy = new DialogFocusTraversalPolicy(new JComponent[] {okButton, editorScrollPane});
this.setFocusTraversalPolicy(policy); // set policy
this.setFocusCycleRoot(true); // enable policy
}
-
+
private JEditorPane createEditorPane() {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
@@ -145,10 +145,10 @@ public class HelpDialog extends JDialog implements ActionListener {
else {
System.err.println("Did not find html directory");
}
-
+
return editorPane;
}
-
+
// public void setTabForScrollPane() {
// JScrollBar ScrollBar = editorScrollPane.getVerticalScrollBar();
// editorPane.setFocusable(true);
@@ -157,10 +157,10 @@ public class HelpDialog extends JDialog implements ActionListener {
// editorPane.setFocusable(false);
// }
// }
-
+
public void actionPerformed (java.awt.event.ActionEvent evt) {
setVisible(false);
- dispose();
+ dispose();
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
index 358ebd489db4..30a222d3b162 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallData.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -113,7 +113,7 @@ public class InstallData
static private Vector installPackages = new Vector();
static private Vector oldPackages = new Vector();
static private Vector systemLanguages = new Vector();
-
+
public static InstallData getInstance()
{
if (instance == null) {
@@ -150,20 +150,20 @@ public class InstallData
}
}
- private void setInstallationMode() {
+ private void setInstallationMode() {
// Exists a directory "uninstalldata" below the resource root?
File uninstallDir = new File(resourceRoot, uninstallDirName);
File installDir = new File(resourceRoot, installDirName);
-
+
if ( SystemManager.exists_directory(uninstallDir.getPath())) {
isInstallationMode = false;
isUninstallationMode = true;
infoRoot = uninstallDir;
- System.err.println("Mode: uninstallation");
+ System.err.println("Mode: uninstallation");
} else if ( SystemManager.exists_directory(installDir.getPath())) {
isInstallationMode = true;
isUninstallationMode = false;
- infoRoot = installDir;
+ infoRoot = installDir;
System.err.println("Mode: installation");
} else {
// isInstallationMode = null;
@@ -174,7 +174,7 @@ public class InstallData
System.exit(1);
}
}
-
+
private void setSolarisUserInstall() {
if (( isUserInstallation ) && (osType.equalsIgnoreCase("SunOS"))) {
isSolarisUserInstallation = true;
@@ -189,7 +189,7 @@ public class InstallData
File htmlDirectory = getInfoRoot("html");
ResourceManager.checkFileExistence(htmlDirectory);
}
-
+
private void setBidiSupport() {
Locale locale = Locale.getDefault();
if (( locale.getLanguage().equals(new Locale("he", "", "").getLanguage()) )
@@ -197,11 +197,11 @@ public class InstallData
useRtl = true;
}
}
-
+
private void setInstallationPrivileges(boolean isUserInstallation) {
if ( isUserInstallation ) {
installationPrivileges = "user";
- } else {
+ } else {
installationPrivileges = "root";
}
}
@@ -231,9 +231,9 @@ public class InstallData
}
public File getResourceRoot(String subDirectory) {
-
+
File dir = getResourceRoot();
-
+
if (dir != null) {
dir = new File(dir, subDirectory);
if (!dir.exists()) {
@@ -320,7 +320,7 @@ public class InstallData
public String getUninstallDirName() {
return uninstallDirName;
}
-
+
public String getInstallDir() {
return installDir;
}
@@ -383,7 +383,7 @@ public class InstallData
public String getLocalTempPath() {
return localTempPath;
}
-
+
public void setLocalTempPath(String path) {
localTempPath = path;
}
@@ -391,7 +391,7 @@ public class InstallData
public int getAvailableDiscSpace() {
return availableDiscSpace;
}
-
+
public void setAvailableDiscSpace(int space) {
availableDiscSpace = space;
}
@@ -399,7 +399,7 @@ public class InstallData
public int getPreselectedLanguages() {
return preselectedLanguages;
}
-
+
public void setPreselectedLanguages(int count) {
preselectedLanguages = count;
}
@@ -435,7 +435,7 @@ public class InstallData
public void setAdminFileNameNoRelocNoDepends(String fileName) {
adminFileNameNoRelocNoDepends = fileName;
}
-
+
public String getGetUidPath() {
return getUidPath;
}
@@ -455,7 +455,7 @@ public class InstallData
public void setStillRunning(boolean running) {
stillRunning = running;
}
-
+
public boolean stillRunning() {
return stillRunning;
}
@@ -463,7 +463,7 @@ public class InstallData
public void setStillAnalyzing(boolean running) {
stillAnalyzing = running;
}
-
+
public boolean stillAnalyzing() {
return stillAnalyzing;
}
@@ -471,7 +471,7 @@ public class InstallData
public void setDatabaseAnalyzed(boolean analyzed) {
databaseAnalyzed = analyzed;
}
-
+
public boolean databaseAnalyzed() {
return databaseAnalyzed;
}
@@ -479,7 +479,7 @@ public class InstallData
public void setModuleSizeSet(boolean set) {
moduleSizeSet = set;
}
-
+
public boolean moduleSizeSet() {
return moduleSizeSet;
}
@@ -487,7 +487,7 @@ public class InstallData
public void setPreInstallDone(boolean done) {
preInstallDone = done;
}
-
+
public boolean preInstallDone() {
return preInstallDone;
}
@@ -495,7 +495,7 @@ public class InstallData
public boolean isChangeInstallation() {
return isChangeInstallation;
}
-
+
public void setIsChangeInstallation(boolean changeInstallation) {
isChangeInstallation = changeInstallation;
}
@@ -511,7 +511,7 @@ public class InstallData
public boolean isAbortedInstallation() {
return isAbortedInstallation;
}
-
+
public void setIsAbortedInstallation(boolean abortedInstallation) {
isAbortedInstallation = abortedInstallation;
}
@@ -519,7 +519,7 @@ public class InstallData
public boolean isErrorInstallation() {
return isErrorInstallation;
}
-
+
public void setIsErrorInstallation(boolean errorInstallation) {
isErrorInstallation = errorInstallation;
}
@@ -527,7 +527,7 @@ public class InstallData
public boolean isMultiLingual() {
return isMultiLingual;
}
-
+
public void setIsMultiLingual(boolean multiLingual) {
isMultiLingual = multiLingual;
}
@@ -535,11 +535,11 @@ public class InstallData
public boolean logModuleStates() {
return logModuleStates;
}
-
+
public void setLogModuleStates(boolean log) {
logModuleStates = log;
}
-
+
public boolean visibleModulesChecked() {
return visibleModulesChecked;
}
@@ -567,7 +567,7 @@ public class InstallData
public boolean isMaskedCompleteUninstallation() {
return isMaskedCompleteUninstallation;
}
-
+
public void setMaskedCompleteUninstallation(boolean masked) {
isMaskedCompleteUninstallation = masked;
}
@@ -575,7 +575,7 @@ public class InstallData
public boolean typicalSelectionStateSaved() {
return typicalSelectionStateSaved;
}
-
+
public void setTypicalSelectionStateSaved(boolean saved) {
typicalSelectionStateSaved = saved;
}
@@ -583,7 +583,7 @@ public class InstallData
public boolean customSelectionStateSaved() {
return customSelectionStateSaved;
}
-
+
public void setCustomSelectionStateSaved(boolean saved) {
customSelectionStateSaved = saved;
}
@@ -591,7 +591,7 @@ public class InstallData
public boolean startSelectionStateSaved() {
return startSelectionStateSaved;
}
-
+
public void setStartSelectionStateSaved(boolean saved) {
startSelectionStateSaved = saved;
}
@@ -699,7 +699,7 @@ public class InstallData
public HashMap getDatabaseMap() {
return databaseMap;
}
-
+
public void setDatabaseMap(HashMap map) {
databaseMap = map;
}
@@ -711,7 +711,7 @@ public class InstallData
public Vector getInstallPackages() {
return installPackages;
}
-
+
public void setInstallPackages(Vector packages) {
installPackages = packages;
}
@@ -719,7 +719,7 @@ public class InstallData
public Vector getOldPackages() {
return oldPackages;
}
-
+
public void setOldPackages(Vector packages) {
oldPackages = packages;
}
@@ -727,7 +727,7 @@ public class InstallData
public Vector getSystemLanguages() {
return systemLanguages;
}
-
+
public void setSystemLanguages(Vector languages) {
systemLanguages = languages;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/Installer.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/Installer.java
index 43ae1a369bd3..76e407622094 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/Installer.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/Installer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@ import org.openoffice.setup.InstallData;
import org.openoffice.setup.SetupData.PackageDescription;
public abstract class Installer {
-
+
public Installer() {
}
@@ -70,7 +70,7 @@ public abstract class Installer {
public abstract void installPackage(PackageDescription packageData);
public abstract void uninstallPackage(PackageDescription packageData);
-
+
public abstract boolean isPackageInstalled(PackageDescription packageData, InstallData installData);
public abstract boolean isInstalledPackageOlder(PackageDescription packageData, InstallData installData);
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/InstallerFactory.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/InstallerFactory.java
index 04e2cf2b4808..c141dfb4b4b7 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/InstallerFactory.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/InstallerFactory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ public class InstallerFactory
}
private static Installer createInstaller() {
-
+
InstallData data = InstallData.getInstance();
if ( data.getOSType().equalsIgnoreCase("Linux")) {
instance = new LinuxInstaller();
@@ -60,7 +60,7 @@ public class InstallerFactory
Informer.showErrorMessage(message, title);
System.exit(1);
}
-
+
return instance;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
index 4383904569c0..204c9e18ea83 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/LinuxInstaller.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -43,13 +43,13 @@ import java.util.Map;
import java.util.Vector;
public class LinuxInstaller extends Installer {
-
+
LinuxHelper helper = new LinuxHelper();
-
+
public LinuxInstaller() {
super();
}
-
+
public void preInstall(PackageDescription packageData) {
InstallData installData = InstallData.getInstance();
// Collecting package names
@@ -108,8 +108,8 @@ public class LinuxInstaller extends Installer {
String installDir = null;
InstallData installData = InstallData.getInstance();
- String packageName = packageData.getPkgRealName();
-
+ String packageName = packageData.getPkgRealName();
+
if ( packageName != null ) {
String rpmCommand = "rpm -q --queryformat %{INSTALLPREFIX} " + packageName;
String[] rpmCommandArray = new String[5];
@@ -118,19 +118,19 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[2] = "--queryformat";
rpmCommandArray[3] = "%{INSTALLPREFIX}";
rpmCommandArray[4] = packageName;
-
+
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmCommandArray, returnVector, returnErrorVector);
String returnString = (String) returnVector.get(0);
returnString = returnString.replaceAll("//","/");
-
+
String log = rpmCommand + "<br><b>Returns: " + returnString + "</b><br>";
LogManager.addCommandsLogfileComment(log);
-
- installDir = returnString;
+
+ installDir = returnString;
}
-
+
return installDir;
}
@@ -142,7 +142,7 @@ public class LinuxInstaller extends Installer {
// String log = "<br><b>Package: " + packageData.getName() + "</b>";
// LogManager.addCommandsLogfileComment(log);
String log = "";
-
+
// setting installDir
String installDir = data.getInstallDir();
String packagePath = data.getPackagePath();
@@ -160,55 +160,55 @@ public class LinuxInstaller extends Installer {
} else {
log = "<b>Package Name: " + packageName + "</b>";
LogManager.addCommandsLogfileComment(log);
-
+
File completePackage = new File(packagePath, packageName);
packageName = completePackage.getPath();
packageName = "\"" + packageName + "\""; // Quoting is necessary, if the path the the packages contains white spaces.
-
+
if ( completePackage.exists() ) {
String relocations = helper.getRelocationString(packageData, packageName);
if ( relocations != null ) {
// Problem: If Prefix = "/" the packages are not relocatable with RPM version 3.x .
- // Therefore Prefix has to be "/opt" in spec file, although packages shall not be
+ // Therefore Prefix has to be "/opt" in spec file, although packages shall not be
// relocatable (except for installations with root privileges). So /opt has to be
- // listed left and right of equal sign: --relocate /opt=<installDir>/opt
+ // listed left and right of equal sign: --relocate /opt=<installDir>/opt
// -> /opt has to be added to the installDir
File localInstallDir = new File(installDir, relocations); // "/" -> "/opt"
String localInstallDirString = localInstallDir.getPath();
// Fixing problem with installation directory and RPM version 3.x
- String fixedInstallDir = helper.fixInstallationDirectory(localInstallDirString);
+ String fixedInstallDir = helper.fixInstallationDirectory(localInstallDirString);
relocations = relocations + "=" + fixedInstallDir;
// relocations: "/opt/staroffice8=" + fixedInstallDir;
}
-
- // Some packages have to be installed with parameter "--force", if the link "/usr/bin/soffice"
+
+ // Some packages have to be installed with parameter "--force", if the link "/usr/bin/soffice"
// already exists. These pacakges return true with methode "useForce()".
boolean useForce = false;
if ( packageData.useForce() ) {
File sofficeLink = new File("/usr/bin/soffice");
if ( sofficeLink.exists() ) { useForce = true; }
}
-
+
// On Debian based systems, rpms can be installed with the switch --force-debian, if a rpm
// is installed.
String forceDebianString = "";
String nodepsString = "";
-
+
if ( ! data.debianInvestigated() ) {
helper.investigateDebian(data);
data.setDebianInvestigated(true);
}
-
+
if ( data.isDebianSystem() ) {
nodepsString = "--nodeps";
-
+
if ( data.useForceDebian() ) {
forceDebianString = "--force-debian";
}
}
-
+
String databasePath = null;
String databaseString = "";
boolean useLocalDatabase = false;
@@ -220,63 +220,63 @@ public class LinuxInstaller extends Installer {
data.setDatabasePath(databasePath);
}
}
-
+
if (( databasePath != null ) && (! databasePath.equalsIgnoreCase("null"))) {
databaseString = "--dbpath";
useLocalDatabase = true;
}
-
- // Defining a Vector that contains the full rpm command. Then the string array can be
+
+ // Defining a Vector that contains the full rpm command. Then the string array can be
// created dynamically. Otherwise there would be too many different scenarios.
-
+
Vector rpmVector = new Vector();
-
+
rpmVector.add("rpm");
rpmVector.add("--upgrade");
rpmVector.add("--ignoresize");
-
+
if ( useForce ) {
rpmVector.add("--force");
}
-
+
if ( ! forceDebianString.equals("") ) {
rpmVector.add(forceDebianString);
}
-
+
if ( ! nodepsString.equals("") ) {
rpmVector.add(nodepsString);
}
-
+
rpmVector.add("-vh");
-
+
if ( relocations != null ) {
rpmVector.add("--relocate");
rpmVector.add(relocations);
}
-
+
if ( useLocalDatabase ) {
rpmVector.add(databaseString);
rpmVector.add(databasePath);
}
-
+
rpmVector.add(packageName);
-
+
// Creating String and StringArray for rpm command
-
+
int capacity = rpmVector.size();
-
+
String rpmCommand = "";
String[] rpmCommandArray = new String[capacity];
-
+
for (int i = 0; i < rpmVector.size(); i++) {
rpmCommandArray[i] = (String)rpmVector.get(i);
rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
}
-
+
rpmCommand = rpmCommand.trim();
-
+
// Staring rpm process
-
+
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
// int returnValue = SystemManager.executeProcessReturnVector(rpmCommand, returnVector, returnErrorVector);
@@ -285,7 +285,7 @@ public class LinuxInstaller extends Installer {
if ( returnValue == 0 ) {
log = rpmCommand + "<br><b>Returns: " + returnValue + " Successful installation</b><br>";
LogManager.addCommandsLogfileComment(log);
- } else { // an error occured during installation
+ } else { // an error occured during installation
if ( packageData.installCanFail() ) {
log = rpmCommand + "<br><b>Returns: " + returnValue + " Problem during installation. Can be ignored.</b><br>";
LogManager.addCommandsLogfileComment(log);
@@ -323,19 +323,19 @@ public class LinuxInstaller extends Installer {
// LogManager.addCommandsLogfileComment(log);
String rpmPackageName = packageData.getPackageName();
-
+
if (( rpmPackageName.equals("")) || ( rpmPackageName == null )) {
log = "<b>No package name specified. Nothing to do</b>";
LogManager.addCommandsLogfileComment(log);
} else {
log = "<b>Package Name: " + rpmPackageName + "</b>";
LogManager.addCommandsLogfileComment(log);
-
+
String packageName = packageData.getPkgRealName();
String databasePath = data.getDatabasePath();
String databaseString = "";
boolean useLocalDatabase = false;
-
+
if (( databasePath != null ) && (! databasePath.equalsIgnoreCase("null"))) {
databaseString = "--dbpath";
useLocalDatabase = true;
@@ -346,56 +346,56 @@ public class LinuxInstaller extends Installer {
String forceDebianString = "";
String nodepsString = "";
-
+
if ( ! data.debianInvestigated() ) {
helper.investigateDebian(data);
data.setDebianInvestigated(true);
}
-
+
if ( data.isDebianSystem() ) {
nodepsString = "--nodeps";
-
+
if ( data.useForceDebian() ) {
forceDebianString = "--force-debian";
}
}
- // Defining a Vector that contains the full rpm command. Then the string array can be
+ // Defining a Vector that contains the full rpm command. Then the string array can be
// created dynamically. Otherwise there would be too many different scenarios.
-
+
Vector rpmVector = new Vector();
-
+
rpmVector.add("rpm");
-
+
if ( ! forceDebianString.equals("") ) {
rpmVector.add(forceDebianString);
}
-
+
if ( ! nodepsString.equals("") ) {
rpmVector.add(nodepsString);
}
-
+
rpmVector.add("-ev");
-
+
if ( useLocalDatabase ) {
rpmVector.add(databaseString);
rpmVector.add(databasePath);
}
-
+
rpmVector.add(packageName);
-
+
// Creating String and StringArray for rpm command
-
+
int capacity = rpmVector.size();
-
+
String rpmCommand = "";
String[] rpmCommandArray = new String[capacity];
-
+
for (int i = 0; i < rpmVector.size(); i++) {
rpmCommandArray[i] = (String)rpmVector.get(i);
rpmCommand = rpmCommand + " " + (String)rpmVector.get(i);
}
-
+
rpmCommand = rpmCommand.trim();
// Starting rpm process
@@ -406,8 +406,8 @@ public class LinuxInstaller extends Installer {
if ( returnValue == 0 ) {
log = rpmCommand + "<br><b>Returns: " + returnValue + " Successful uninstallation</b><br>";
- LogManager.addCommandsLogfileComment(log);
- } else { // an error occured during installation
+ LogManager.addCommandsLogfileComment(log);
+ } else { // an error occured during installation
if ( packageData.uninstallCanFail() ) {
log = rpmCommand + "<br><b>Returns: " + returnValue + " Problem during uninstallation. Can be ignored.</b><br>";
LogManager.addCommandsLogfileComment(log);
@@ -422,23 +422,23 @@ public class LinuxInstaller extends Installer {
}
}
}
-
+
public boolean isPackageInstalledClassic(PackageDescription packageData, InstallData installData) {
-
+
boolean isInstalled = false;
boolean doCheck = false;
-
- // only checking existing packages (and always at uninstallation)
+
+ // only checking existing packages (and always at uninstallation)
if ( (packageData.pkgExists()) || (installData.isUninstallationMode()) ) {
doCheck = true;
}
-
+
String rpmPackageName = packageData.getPackageName();
if ( rpmPackageName.equals("") ) {
rpmPackageName = null;
}
-
+
if (( rpmPackageName != null ) && ( doCheck )) {
String databaseString = "";
@@ -450,17 +450,17 @@ public class LinuxInstaller extends Installer {
if (installData.isUserInstallation()) {
databasePath = installData.getDatabasePath();
}
-
+
if (( databasePath != null ) && (! databasePath.equals("null"))) {
databaseString = "--dbpath";
useLocalDatabase = true;
}
-
+
if (packageName != null) {
-
+
String rpmCommand;
String[] rpmCommandArray;
-
+
if (useLocalDatabase) {
rpmCommand = "rpm" + " " + databaseString + " " + databasePath + " --query " + packageName;
rpmCommandArray = new String[5];
@@ -468,7 +468,7 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[1] = databaseString;
rpmCommandArray[2] = databasePath;
rpmCommandArray[3] = "--query";
- rpmCommandArray[4] = packageName;
+ rpmCommandArray[4] = packageName;
} else {
rpmCommand = "rpm" + " --query " + packageName;
rpmCommandArray = new String[3];
@@ -476,7 +476,7 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[1] = "--query";
rpmCommandArray[2] = packageName;
}
-
+
int returnValue = ExecuteProcess.executeProcessReturnValue(rpmCommandArray);
if ( returnValue == 0 ) {
@@ -493,26 +493,26 @@ public class LinuxInstaller extends Installer {
return isInstalled;
}
-
+
private void queryAllDatabase(InstallData installData) {
String databaseString = "";
String databasePath = null;
HashMap map = new HashMap();;
boolean useLocalDatabase = false;
-
+
if (installData.isUserInstallation()) {
databasePath = installData.getDatabasePath();
}
-
+
if (( databasePath != null ) && (! databasePath.equals("null"))) {
databaseString = "--dbpath";
useLocalDatabase = true;
}
-
+
String rpmCommand;
String[] rpmCommandArray;
-
+
if (useLocalDatabase) {
rpmCommand = "rpm" + " " + databaseString + " " + databasePath + " --query" + " -a";
rpmCommandArray = new String[5];
@@ -520,7 +520,7 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[1] = databaseString;
rpmCommandArray[2] = databasePath;
rpmCommandArray[3] = "--query";
- rpmCommandArray[4] = "-a";
+ rpmCommandArray[4] = "-a";
} else {
rpmCommand = "rpm" + " --query" + " -a";
rpmCommandArray = new String[3];
@@ -528,15 +528,15 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[1] = "--query";
rpmCommandArray[2] = "-a";
}
-
+
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmCommandArray, returnVector, returnErrorVector);
-
+
String log = rpmCommand + "<br><b>Returns: " + returnValue + "</b><br>";
LogManager.addCommandsLogfileComment(log);
String value = "1";
-
+
if ( ! returnVector.isEmpty()) {
for (int i = 0; i < returnVector.size(); i++) {
String onePackage = (String)returnVector.get(i);
@@ -548,15 +548,15 @@ public class LinuxInstaller extends Installer {
}
installData.setDatabaseQueried(true);
- installData.setDatabaseMap(map);
+ installData.setDatabaseMap(map);
}
public boolean isPackageInstalled(PackageDescription packageData, InstallData installData) {
-
+
boolean isInstalled = false;
boolean doCheck = false;
-
- // only checking existing packages (and always at uninstallation)
+
+ // only checking existing packages (and always at uninstallation)
if ( (packageData.pkgExists()) || (installData.isUninstallationMode()) ) {
doCheck = true;
}
@@ -566,10 +566,10 @@ public class LinuxInstaller extends Installer {
if ( rpmPackageName.equals("") ) {
rpmPackageName = null;
}
-
+
if (( rpmPackageName != null ) && ( doCheck )) {
String packageName = packageData.getPkgRealName();
-
+
if (packageName != null) {
HashMap map = null;
@@ -578,13 +578,13 @@ public class LinuxInstaller extends Installer {
}
map = installData.getDatabaseMap();
-
+
if ( map.containsKey(packageName)) {
isInstalled = true;
- }
+ }
} else {
- System.err.println("Error: No packageName defined for package: " + packageData.getPackageName());
- }
+ System.err.println("Error: No packageName defined for package: " + packageData.getPackageName());
+ }
}
return isInstalled;
@@ -605,39 +605,39 @@ public class LinuxInstaller extends Installer {
}
private boolean findOlderPackage(PackageDescription packageData, InstallData installData, boolean checkIfInstalledIsOlder) {
-
+
// The information about the new package is stored in packageData (the version and the release).
// This information can be stored in xpd files. If it is not stored in xpd files, it is determined
// during installation process by querying the rpm file. This process costs much time and should
// therefore be done by the process, that creates the xpd files. On the other hand this requires,
// that the xpd files contain the correct information.
-
+
boolean isOlder = false;
-
+
// get the version of the installed package
String rpmPackageName = packageData.getPackageName();
String log;
-
+
if ( rpmPackageName.equals("")) {
rpmPackageName = null;
}
-
+
if ( rpmPackageName != null ) {
String databaseString = "";
String databasePath = null;
- String packageName = packageData.getPkgRealName();
+ String packageName = packageData.getPkgRealName();
Vector allPackages = null;
boolean useLocalDatabase = false;
if (installData.isUserInstallation()) {
databasePath = installData.getDatabasePath();
}
-
+
if (( databasePath != null ) && (! databasePath.equals("null"))) {
databaseString = "--dbpath";
useLocalDatabase = true;
}
-
+
if (packageName != null) {
// Collect information about the installed package by querying the database.
// Instead of rpm file name, the real package name has to be used.
@@ -654,7 +654,7 @@ public class LinuxInstaller extends Installer {
rpmCommandArray[3] = "-q";
rpmCommandArray[4] = "--queryformat";
rpmCommandArray[5] = "%{VERSION}\\n";
- rpmCommandArray[6] = packageName;
+ rpmCommandArray[6] = packageName;
} else {
rpmCommand = "rpm" + " -q --queryformat %{VERSION}\\n " + packageName;
rpmCommandArray = new String[5];
@@ -677,13 +677,13 @@ public class LinuxInstaller extends Installer {
installData.setInstalledProductMinor(productMinor);
installData.setInstalledProductMinorSet(true);
}
-
+
if (useLocalDatabase) {
rpmCommand = "rpm" + " " + databaseString + " " + databasePath + " -q --queryformat %{RELEASE}\\n " + packageName;
rpmCommandArray[5] = "%{RELEASE}\\n";
} else {
rpmCommand = "rpm" + " -q --queryformat %{RELEASE}\\n " + packageName;
- rpmCommandArray[3] = "%{RELEASE}\\n";
+ rpmCommandArray[3] = "%{RELEASE}\\n";
}
Vector releaseVector = new Vector();
@@ -694,7 +694,7 @@ public class LinuxInstaller extends Installer {
LogManager.addCommandsLogfileComment(log);
isOlder = helper.compareVersionAndRelease(version, release, packageData, checkIfInstalledIsOlder);
-
+
if ( checkIfInstalledIsOlder ) {
if ( isOlder ) {
LogManager.addCommandsLogfileComment("<b>-> Installed package is older</b><br>");
@@ -706,11 +706,11 @@ public class LinuxInstaller extends Installer {
LogManager.addCommandsLogfileComment("<b>-> Package in installation set is older</b><br>");
} else {
LogManager.addCommandsLogfileComment("<b>-> Package in installation set is not older</b><br>");
- }
+ }
}
} else {
- System.err.println("Error: No packageName defined for package: " + rpmPackageName);
+ System.err.println("Error: No packageName defined for package: " + rpmPackageName);
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java
index 7aacc5557fa6..3bcdd3410d47 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Installer/SolarisInstaller.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,13 +41,13 @@ import java.util.HashMap;
import java.util.Vector;
public class SolarisInstaller extends Installer {
-
+
SolarisHelper helper = new SolarisHelper();
-
+
public SolarisInstaller() {
super();
}
-
+
public void defineDatabasePath() {
InstallData data = InstallData.getInstance();
@@ -68,14 +68,14 @@ public class SolarisInstaller extends Installer {
if ( ! databasePath.equals(oldDatabasePath) ) {
data.setDatabaseAnalyzed(false);
data.setDatabaseQueried(false);
- }
+ }
}
}
public void preInstallationOngoing() {
// an admin file has to be created for user and for root installation
InstallData data = InstallData.getInstance();
-
+
if ( data.isInstallationMode()) {
boolean makeRelocatableAdminFile = true;
boolean removeDepends = true;
@@ -99,7 +99,7 @@ public class SolarisInstaller extends Installer {
// Solaris 10 needs to have local temp directory for pkgadd
// removeLocalTempDir();
// }
-
+
helper.removeSolarisLockFile();
}
@@ -115,15 +115,15 @@ public class SolarisInstaller extends Installer {
data.setStillRunning(false);
}
}
-
+
public void postUninstallationOngoing() {
- helper.removeSolarisLockFile();
+ helper.removeSolarisLockFile();
}
-
+
public String getChangeInstallDir(PackageDescription packageData) {
String installDir = null;
- String packageName = packageData.getPackageName();
-
+ String packageName = packageData.getPackageName();
+
if ( packageName != null ) {
String pkgCommand = "pkginfo -r" + " " + packageName;
String[] pkgCommandArray = new String[3];
@@ -134,16 +134,16 @@ public class SolarisInstaller extends Installer {
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(pkgCommandArray, returnVector, returnErrorVector);
String returnString = (String) returnVector.get(0);
-
+
String log = pkgCommand + "<br><b>Returns: " + returnString + "</b><br>";
LogManager.addCommandsLogfileComment(log);
- installDir = returnString;
+ installDir = returnString;
}
-
+
return installDir;
}
-
+
public void installPackage(PackageDescription packageData) {
InstallData data = InstallData.getInstance();
@@ -159,7 +159,7 @@ public class SolarisInstaller extends Installer {
}
String packageName = packageData.getPackageName();
-
+
if (( packageName.equals("")) || ( packageName == null )) {
log = "<b>No package name specified. Nothing to do</b>";
LogManager.addCommandsLogfileComment(log);
@@ -215,10 +215,10 @@ public class SolarisInstaller extends Installer {
pkgCommandArray[6] = packageName;
returnValue = ExecuteProcess.executeProcessReturnVector(pkgCommandArray, returnVector, returnErrorVector);
}
-
+
if ( returnValue == 0 ) {
log = pkgCommand + "<br><b>Returns: " + returnValue + " Successful installation</b><br>";
- LogManager.addCommandsLogfileComment(log);
+ LogManager.addCommandsLogfileComment(log);
} else { // an error occured during installation
if ( packageData.installCanFail() ) {
log = pkgCommand + "<br><b>Returns: " + returnValue + " Problem during installation. Can be ignored.</b><br>";
@@ -252,7 +252,7 @@ public class SolarisInstaller extends Installer {
String log = "<br><b>Package: " + packageData.getName() + "</b>";
LogManager.addCommandsLogfileComment(log);
-
+
String installRoot = data.getInstallDir();
String packageName = packageData.getPackageName();
String adminFileName = "";
@@ -271,7 +271,7 @@ public class SolarisInstaller extends Installer {
adminFileName = data.getAdminFileNameNoReloc();
}
}
-
+
String pkgCommand = "";
String[] pkgCommandArray;
int returnValue;
@@ -306,8 +306,8 @@ public class SolarisInstaller extends Installer {
if ( returnValue == 0 ) {
log = pkgCommand + "<br><b>Returns: " + returnValue + " Successful uninstallation</b><br>";
- LogManager.addCommandsLogfileComment(log);
- } else { // an error occured during installation
+ LogManager.addCommandsLogfileComment(log);
+ } else { // an error occured during installation
if ( packageData.uninstallCanFail() ) {
log = pkgCommand + "<br><b>Returns: " + returnValue + " Problem during uninstallation. Can be ignored.</b><br>";
LogManager.addCommandsLogfileComment(log);
@@ -335,12 +335,12 @@ public class SolarisInstaller extends Installer {
if (installData.isUserInstallation()) {
rootPath = installData.getDatabasePath();
}
-
+
if (( rootPath != null ) && (! rootPath.equals("null"))) {
rootString = "-R";
useLocalRoot = true;
}
-
+
if (useLocalRoot) {
pkgCommand = "pkginfo " + rootString + " " + rootPath + " " + packageName;
pkgCommandArray = new String[4];
@@ -357,16 +357,16 @@ public class SolarisInstaller extends Installer {
// Vector returnVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnValue(pkgCommandArray);
-
+
if ( returnValue == 0 ) {
isInstalled = true;
String log = pkgCommand + "<br><b>Returns: " + returnValue + " Package is installed" + "</b><br>";
LogManager.addCommandsLogfileComment(log);
} else {
String log = pkgCommand + "<br><b>Returns: " + returnValue + " Package is not installed" + "</b><br>";
- LogManager.addCommandsLogfileComment(log);
+ LogManager.addCommandsLogfileComment(log);
}
-
+
return isInstalled;
}
@@ -382,12 +382,12 @@ public class SolarisInstaller extends Installer {
if (installData.isUserInstallation()) {
rootPath = installData.getDatabasePath();
}
-
+
if (( rootPath != null ) && (! rootPath.equals("null"))) {
rootString = "-R";
useLocalRoot = true;
}
-
+
if (useLocalRoot) {
pkgCommand = "pkginfo " + rootString + " " + rootPath;
pkgCommandArray = new String[4];
@@ -405,11 +405,11 @@ public class SolarisInstaller extends Installer {
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(pkgCommandArray, returnVector, returnErrorVector);
-
+
String log = pkgCommand + "<br><b>Returns: " + returnValue + "</b><br>";
LogManager.addCommandsLogfileComment(log);
String value = "1";
-
+
if ( ! returnVector.isEmpty()) {
for (int i = 0; i < returnVector.size(); i++) {
String onePackage = (String)returnVector.get(i);
@@ -434,35 +434,35 @@ public class SolarisInstaller extends Installer {
}
map = installData.getDatabaseMap();
-
+
if ( map.containsKey(packageName)) {
isInstalled = true;
- }
+ }
return isInstalled;
}
public boolean isPackageInstalled(PackageDescription packageData, InstallData installData) {
boolean isInstalled = false;
-
+
String packageName = packageData.getPackageName();
if ( packageName.equals("")) {
packageName = null;
}
-
+
if ( packageName != null ) {
- isInstalled = isPackageNameInstalled(packageName, installData);
+ isInstalled = isPackageNameInstalled(packageName, installData);
}
return isInstalled;
- }
+ }
public boolean isInstallSetPackageOlder(PackageDescription packageData, InstallData installData) {
boolean installSetPackageIsOlder = false;
boolean checkIfInstalledIsOlder = false;
installSetPackageIsOlder = findOlderPackage(packageData, installData, checkIfInstalledIsOlder);
- return installSetPackageIsOlder;
+ return installSetPackageIsOlder;
}
public boolean isInstalledPackageOlder(PackageDescription packageData, InstallData installData) {
@@ -507,7 +507,7 @@ public class SolarisInstaller extends Installer {
pkgCommandArray[2] = rootString;
pkgCommandArray[3] = rootPath;
pkgCommandArray[4] = packageName;
-
+
} else {
// String pkgCommand = "pkginfo -l" + rootString + " " + rootPath + " " + packageName + " | grep VERSION:";
pkgCommand = "pkginfo -x " + packageName;
@@ -540,7 +540,7 @@ public class SolarisInstaller extends Installer {
installData.setInstalledProductMinor(productMinor);
installData.setInstalledProductMinorSet(true);
}
-
+
if (( installedPackageVersion != null ) && ( newPackageVersion != null )) {
if ( checkIfInstalledIsOlder ) {
firstPackageIsOlder = helper.comparePackageVersions(installedPackageVersion, newPackageVersion);
@@ -548,7 +548,7 @@ public class SolarisInstaller extends Installer {
firstPackageIsOlder = helper.comparePackageVersions(newPackageVersion, installedPackageVersion);
}
}
- }
+ }
if ( checkIfInstalledIsOlder ) {
if ( firstPackageIsOlder ) {
@@ -556,7 +556,7 @@ public class SolarisInstaller extends Installer {
LogManager.addCommandsLogfileComment(log);
} else {
log = "<b>-> Installed package is not older</b><br>";
- LogManager.addCommandsLogfileComment(log);
+ LogManager.addCommandsLogfileComment(log);
}
} else {
if ( firstPackageIsOlder ) {
@@ -564,9 +564,9 @@ public class SolarisInstaller extends Installer {
LogManager.addCommandsLogfileComment(log);
} else {
log = "<b>-> Package in installation set is not older</b><br>";
- LogManager.addCommandsLogfileComment(log);
- }
- }
+ LogManager.addCommandsLogfileComment(log);
+ }
+ }
return firstPackageIsOlder;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
index 91e8463fdc03..fb8bfa96a838 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/LinuxHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ import java.io.File;
import java.util.Enumeration;
import java.util.HashMap;
import java.util.Vector;public class LinuxHelper {
-
+
public LinuxHelper() {
super();
}
@@ -110,21 +110,21 @@ import java.util.Vector;public class LinuxHelper {
}
private HashMap analyzeVersionString(String versionString) {
-
+
boolean errorOccured = false;
-
+
Integer micro = null;
Integer minor = null;
Integer major = null;
Integer release = null;
-
+
String microString = null;
String minorString = null;
String majorString = null;
String releaseString = null;
-
+
int pos = versionString.lastIndexOf("_"); // this is a jre RPM (1.5.0_06)
-
+
if ( pos > -1 ) {
try {
releaseString = versionString.substring(pos+1, versionString.length());
@@ -137,7 +137,7 @@ import java.util.Vector;public class LinuxHelper {
int releaseInt = Integer.parseInt(releaseString);
release = new Integer(releaseInt);
} catch (NumberFormatException ex) {
- System.err.println("Error: Could not convert " + releaseString + " to integer");
+ System.err.println("Error: Could not convert " + releaseString + " to integer");
errorOccured = true;
}
}
@@ -150,23 +150,23 @@ import java.util.Vector;public class LinuxHelper {
pos = substring.lastIndexOf("."); // returns "-1", if not found
if ( pos == -1 ) {
versionString = versionString + ".0";
- // System.err.println("Warning: Changing from " + compareString + " to " + versionString);
+ // System.err.println("Warning: Changing from " + compareString + " to " + versionString);
}
} else {
- versionString = versionString + ".0.0";
+ versionString = versionString + ".0.0";
}
-
+
// the standard analyzing mechanism
pos = versionString.lastIndexOf("."); // returns "-1", if not found
-
+
if ( pos > -1 )
{
try {
microString = versionString.substring(pos+1, versionString.length());
versionString = versionString.substring(0, pos);
} catch (IndexOutOfBoundsException ex) {
- System.err.println("Error: Could not get substring from " + versionString);
- errorOccured = true;
+ System.err.println("Error: Could not get substring from " + versionString);
+ errorOccured = true;
}
pos = versionString.lastIndexOf(".");
@@ -175,7 +175,7 @@ import java.util.Vector;public class LinuxHelper {
minorString = versionString.substring(pos+1, versionString.length());
majorString = versionString.substring(0, pos);
} catch (IndexOutOfBoundsException ex) {
- System.err.println("Error: Could not get substring from " + versionString);
+ System.err.println("Error: Could not get substring from " + versionString);
errorOccured = true;
}
try {
@@ -186,36 +186,36 @@ import java.util.Vector;public class LinuxHelper {
minor = new Integer(minorInt);
major = new Integer(majorInt);
} catch (NumberFormatException ex) {
- System.err.println("Error: Could not convert " + microString + "," +
- minorString + " or " + majorString + " to integer");
+ System.err.println("Error: Could not convert " + microString + "," +
+ minorString + " or " + majorString + " to integer");
errorOccured = true;
}
}
}
-
+
// if ( microString == null ) { microString = ""; }
// if ( majorString == null ) { majorString = ""; }
// if ( releaseString == null ) { releaseString = ""; }
// if ( minorString == null ) { minorString = ""; }
// System.err.println("Major " + majorString + " Minor: " + minorString + " Micro: " + microString + " Release: " + releaseString);
-
+
if ( errorOccured ) {
micro = null;
minor = null;
major = null;
release = null;
}
-
+
HashMap hashRpm = new HashMap();
-
+
hashRpm.put("micro", micro);
hashRpm.put("minor", minor);
hashRpm.put("major", major);
hashRpm.put("release", release);
-
+
// If one of this values is "null", procedure "compareTwoRpms" always delivers false.
// This means, that the installed package is not older.
-
+
// System.err.println("Analyzed: " + "micro: " + hashRpm.get("micro").toString() + " minor: " + hashRpm.get("minor").toString() + " major: " + hashRpm.get("major").toString());
return hashRpm;
@@ -223,7 +223,7 @@ import java.util.Vector;public class LinuxHelper {
private HashMap analyzeReleaseString(HashMap hashRpm, String releaseString) {
int release;
-
+
try {
release = Integer.parseInt(releaseString);
Integer releaseObj = new Integer(release);
@@ -233,13 +233,13 @@ import java.util.Vector;public class LinuxHelper {
// JRE often contain a string like "FCS"
// System.err.println("Error: Could not convert " + releaseString + " to integer");
hashRpm.put("release", null);
- }
+ }
return hashRpm;
}
public int getInstalledMinor(String version) {
-
+
int minor = 0;
int pos = version.indexOf(".");
if ( pos > -1 ) {
@@ -250,14 +250,14 @@ import java.util.Vector;public class LinuxHelper {
reduced = reduced.substring(0, pos);
minor = Integer.parseInt(reduced);
}
- }
+ }
return minor;
}
-
+
private boolean compareTwoRpms(HashMap hash1, HashMap hash2) {
boolean hash1IsOlder = false;
-
+
if (( hash1.get("major") != null ) && ( hash2.get("major") != null )) {
if ( ((Integer)hash1.get("major")).intValue() < ((Integer)hash2.get("major")).intValue() ) {
hash1IsOlder = true;
@@ -284,19 +284,19 @@ import java.util.Vector;public class LinuxHelper {
return hash1IsOlder;
}
-
+
public boolean compareVersionAndRelease(String versionString, String releaseString, PackageDescription packageData, boolean checkIfInstalledIsOlder) {
// version and release are gotten from the rpm database. packageData contains
// the information about the rpm, that shall be installed. It has to be installed,
// if the installed product defined by version and release is older.
- // version is something like "2.0.3", release something like "164".
+ // version is something like "2.0.3", release something like "164".
// An exception is the jre package, where version is "1.5.0_06" and release "fcs".
HashMap installedRpm = analyzeVersionString(versionString);
if ( installedRpm.get("release") == null ) {
installedRpm = analyzeReleaseString(installedRpm, releaseString);
}
-
+
// System.err.println("Package: " + packageData.getPackageName());
// String outputString = "Installed RPM: ";
// if ( installedRpm.get("major") != null ) { outputString = outputString + " major: " + installedRpm.get("major").toString(); }
@@ -326,15 +326,15 @@ import java.util.Vector;public class LinuxHelper {
// System.err.println(outputString);
boolean firstIsOlder = false;
-
+
if ( checkIfInstalledIsOlder ) {
firstIsOlder = compareTwoRpms(installedRpm, notInstalledRpm);
// System.err.println("Result: Installed RPM is older: " + firstIsOlder);
} else {
- firstIsOlder = compareTwoRpms(notInstalledRpm, installedRpm);
+ firstIsOlder = compareTwoRpms(notInstalledRpm, installedRpm);
// System.err.println("Result: Not installed RPM is older: " + firstIsOlder);
}
-
+
return firstIsOlder;
}
@@ -361,7 +361,7 @@ import java.util.Vector;public class LinuxHelper {
} else {
packageData.setPkgExists(false);
}
-
+
}
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
@@ -377,23 +377,23 @@ import java.util.Vector;public class LinuxHelper {
// String databaseDir = SystemManager.getParentDirectory(installDir);
String linuxDatabaseName = ".RPM_OFFICE_DATABASE";
File databaseFile = new File(databaseDir, linuxDatabaseName);
- databasePath = databaseFile.getPath();
+ databasePath = databaseFile.getPath();
return databasePath;
}
-
+
public void investigateDebian(InstallData data) {
-
+
// First check: Is this a Debian system?
-
+
String dpkgFile = "/usr/bin/dpkg";
-
+
if ( new File(dpkgFile).exists() ) {
-
+
data.setIsDebianSystem(true);
-
+
// Second check: If this is a Debian system, is "--force-debian" required? Older
// versions do not support "--force-debian".
-
+
// String rpmQuery = "rpm --help;
String[] rpmQueryArray = new String[2];
rpmQueryArray[0] = "rpm";
@@ -402,9 +402,9 @@ import java.util.Vector;public class LinuxHelper {
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
-
+
// Checking if the return vector contains the string "force-debian"
-
+
for (int i = 0; i < returnVector.size(); i++) {
String line = (String) returnVector.get(i);
if ( line.indexOf("force-debian") > -1 ) {
@@ -412,8 +412,8 @@ import java.util.Vector;public class LinuxHelper {
}
}
}
- }
-
+ }
+
public void getLinuxFileInfo(PackageDescription packageData) {
// analyzing a string like "openoffice-core01-2.0.3-159" as "name-version-release"
InstallData data = InstallData.getInstance();
@@ -441,7 +441,7 @@ import java.util.Vector;public class LinuxHelper {
PackageDescription child = (PackageDescription) e.nextElement();
getLinuxFileInfo(child);
}
-
+
}
public void setFullPackageNameAtUninstall(PackageDescription packageData, HashMap packageNames) {
@@ -466,7 +466,7 @@ import java.util.Vector;public class LinuxHelper {
public String getRelocationString(PackageDescription packageData, String packageName) {
String relocationString = null;
-
+
if ( packageData.isRelocatable() ) {
// String rpmQuery = "rpm -qp --qf %{PREFIXES}" + " " + packageName;
String[] rpmQueryArray = new String[5];
@@ -475,32 +475,32 @@ import java.util.Vector;public class LinuxHelper {
rpmQueryArray[2] = "--qf";
rpmQueryArray[3] = "%{PREFIXES}";
rpmQueryArray[4] = packageName;
-
+
Vector returnVector = new Vector();
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(rpmQueryArray, returnVector, returnErrorVector);
relocationString = (String) returnVector.get(0);
}
-
+
return relocationString;
}
public void createPackageNameFileAtPostinstall(InstallData data, PackageDescription packageData) {
-
+
// The file "packageNames" must not be an own database! It must be possible to install
// and deinstall RPMs without this GUI installer. Therefore the file packageNames is
// not always up to date. Nevertheless it makes the deinstallation faster, because of
// all packages, whose "real" package name is not defined in xpd files (for example
- // "openoffice-core01-2.0.3-159.rpm" hat the "real" name "openoffice-core01" that is
- // used for deinstallation) this can be read in this file. Otherwise it would be
+ // "openoffice-core01-2.0.3-159.rpm" hat the "real" name "openoffice-core01" that is
+ // used for deinstallation) this can be read in this file. Otherwise it would be
// neccessary to determine the "real" name with a database question.
- // The version and release that are also stored in file "packageNames" must not be
+ // The version and release that are also stored in file "packageNames" must not be
// used for deinstallation because they are probably not up to date.
-
- File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
+
+ File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
File uninstallDir = new File(destDir, data.getUninstallDirName());
- String fileName = "packageNames";
- File packageNamesFile = new File(uninstallDir, fileName);
+ String fileName = "packageNames";
+ File packageNamesFile = new File(uninstallDir, fileName);
Vector packageNames = new Vector();
getPackageNamesContent(packageData, packageNames);
SystemManager.saveCharFileVector(packageNamesFile.getPath(), packageNames);
@@ -516,15 +516,15 @@ import java.util.Vector;public class LinuxHelper {
HashMap map = Converter.convertVectorToHashmap(fileContent);
return map;
}
-
+
public void saveModulesLogFile(InstallData data) {
if ( data.logModuleStates() ) {
Vector logContent = LogManager.getModulesLogFile();
- File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
+ File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
File uninstallDir = new File(destDir, data.getUninstallDirName());
- File modulesLogFile = new File(uninstallDir, "moduleSettingsLog.txt");
- SystemManager.saveCharFileVector(modulesLogFile.getPath(), logContent);
- }
+ File modulesLogFile = new File(uninstallDir, "moduleSettingsLog.txt");
+ SystemManager.saveCharFileVector(modulesLogFile.getPath(), logContent);
+ }
}
public String fixInstallationDirectory(String installDir) {
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java
index ad3460159262..7a99b7ffbd1e 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/InstallerHelper/SolarisHelper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,10 +41,10 @@ import java.util.HashMap;
import java.util.Vector;
public class SolarisHelper {
-
+
public SolarisHelper() {
}
-
+
private void createLocalTempDir() {
String mktempString = "/usr/bin/mktemp";
File mktemp = new File(mktempString);
@@ -60,26 +60,26 @@ public class SolarisHelper {
Vector returnErrorVector = new Vector();
int returnValue = ExecuteProcess.executeProcessReturnVector(mktempCommandArray, returnVector, returnErrorVector);
String uniqueLocalDir = (String) returnVector.get(0);
-
+
data.setLocalTempPath(uniqueLocalDir);
-
+
String log = mktempCommand + "<br><b>Returns: " + uniqueLocalDir + "</b><br>";
LogManager.addCommandsLogfileComment(log);
-
+
String installRoot = data.getInstallDir();
File installRootTemp = new File(installRoot, "tmp");
-
+
if ( installRootTemp.exists() ) {
SystemManager.removeDirectory(installRootTemp);
}
-
+
String linkCommand = "ln -s " + uniqueLocalDir + " " + installRootTemp.getPath();
String[] linkCommandArray = new String[4];
linkCommandArray[0] = "ln";
linkCommandArray[1] = "-s";
linkCommandArray[2] = uniqueLocalDir;
linkCommandArray[3] = installRootTemp.getPath();
-
+
// Vector returnVector = new Vector();
returnValue = ExecuteProcess.executeProcessReturnValue(linkCommandArray);
@@ -87,16 +87,16 @@ public class SolarisHelper {
LogManager.addCommandsLogfileComment(log);
}
}
-
+
private void removeLocalTempDir() {
InstallData data = InstallData.getInstance();
-
+
if ( data.getLocalTempPath() != null ) {
File installRootTemp = new File(data.getInstallDir(), "tmp");
if ( installRootTemp.exists() ) {
installRootTemp.delete(); // removing the link
SystemManager.createDirectory(installRootTemp);
- }
+ }
File localTemp = new File(data.getLocalTempPath());
if ( localTemp.exists() ) {
@@ -104,12 +104,12 @@ public class SolarisHelper {
}
}
}
-
+
private Vector getAdminFileContent(boolean relocatable, boolean rdepends) {
Vector adminFile = new Vector();
InstallData data = InstallData.getInstance();
-
+
// if ( relocatable ) {
// String installDir = data.getInstallDir();
// // installDir = installDir.replace(" ", "\\ ");
@@ -121,41 +121,41 @@ public class SolarisHelper {
adminFile.add(mailLine);
String conflictLine = "conflict=nochange";
- if ( data.isUserInstallation() ) { conflictLine = "conflict=nochange"; }
+ if ( data.isUserInstallation() ) { conflictLine = "conflict=nochange"; }
adminFile.add(conflictLine);
String runlevelLine = "runlevel=nocheck";
adminFile.add(runlevelLine);
String setuidLine = "setuid=quit";
- if ( data.isUserInstallation() ) { setuidLine = "setuid=nocheck"; }
+ if ( data.isUserInstallation() ) { setuidLine = "setuid=nocheck"; }
adminFile.add(setuidLine);
String actionLine = "action=nocheck";
adminFile.add(actionLine);
String partialLine = "partial=quit";
- if ( data.isUserInstallation() ) { partialLine = "partial=nocheck"; }
+ if ( data.isUserInstallation() ) { partialLine = "partial=nocheck"; }
adminFile.add(partialLine);
String instanceLine = "instance=unique";
adminFile.add(instanceLine);
-
+
// String idependLine = "idepend=quit";
String idependLine = "idepend=nocheck";
- // if ( data.isUserInstallation() ) { idependLine = "idepend=nocheck"; }
+ // if ( data.isUserInstallation() ) { idependLine = "idepend=nocheck"; }
adminFile.add(idependLine);
// String rdependLine = "rdepend=nocheck";
String rdependLine = "rdepend=quit";
if ( ! rdepends ) { rdependLine = "rdepend=nocheck"; }
- if ( data.isUserInstallation() ) { rdependLine = "rdepend=nocheck"; }
+ if ( data.isUserInstallation() ) { rdependLine = "rdepend=nocheck"; }
adminFile.add(rdependLine);
String spaceLine = "space=quit";
- if ( data.isUserInstallation() ) { spaceLine = "space=nocheck"; }
+ if ( data.isUserInstallation() ) { spaceLine = "space=nocheck"; }
adminFile.add(spaceLine);
-
+
return adminFile;
}
@@ -169,7 +169,7 @@ public class SolarisHelper {
return mainVersion;
}
-
+
private String getPackageRevision(String version) {
String revision = null;
@@ -180,7 +180,7 @@ public class SolarisHelper {
return revision;
}
-
+
private Vector getVectorOfNumbers(String version) {
Vector numbers = new Vector();
int pos = -1;
@@ -194,10 +194,10 @@ public class SolarisHelper {
}
} while ( pos > -1 );
- numbers.add(version);
+ numbers.add(version);
return numbers;
}
-
+
private int getMinimum(int a, int b) {
int minimum;
@@ -209,10 +209,10 @@ public class SolarisHelper {
return minimum;
}
-
+
private String compareVersion(String firstVersion, String secondVersion) {
// comparing strings with syntax 2.0.0
- String comparison = "bothPackagesAreEqual";
+ String comparison = "bothPackagesAreEqual";
Vector firstVector = getVectorOfNumbers(firstVersion);
Vector secondVector = getVectorOfNumbers(secondVersion);
@@ -232,7 +232,7 @@ public class SolarisHelper {
break;
} else if ( second_ < first ) {
comparison = "secondPackageIsOlder";
- break;
+ break;
}
}
@@ -244,22 +244,22 @@ public class SolarisHelper {
Vector logContent = LogManager.getModulesLogFile();
File baseDir = new File(data.getInstallDefaultDir(), data.getProductDir());
File uninstallDir = new File(baseDir, data.getUninstallDirName());
- File modulesLogFile = new File(uninstallDir, "moduleSettingsLog.txt");
+ File modulesLogFile = new File(uninstallDir, "moduleSettingsLog.txt");
// System.err.println("Saving file: " + modulesLogFile.getPath());
SystemManager.saveCharFileVector(modulesLogFile.getPath(), logContent);
- }
+ }
}
public void removeSolarisLockFile() {
String lockFileName = "/tmp/.ai.pkg.zone.lock-afdb66cf-1dd1-11b2-a049-000d560ddc3e";
File lockFile = new File(lockFileName);
-
+
if ( lockFile.exists() ) {
// System.err.println("Found file: " + lockFileName);
boolean deleted = lockFile.delete();
- }
+ }
}
-
+
public String getSolarisDatabasePath(InstallData data) {
String databasePath = null;
databasePath = data.getInstallDir();
@@ -270,19 +270,19 @@ public class SolarisHelper {
InstallData data = InstallData.getInstance();
Vector removeFiles = data.getRemoveFiles();
String adminFileName = "";
-
+
if ( relocatable ) {
if ( rdepends ) {
adminFileName = "adminFileReloc";
} else {
- adminFileName = "adminFileRelocNoDepends";
+ adminFileName = "adminFileRelocNoDepends";
}
} else {
if ( rdepends ) {
adminFileName = "adminFileNoReloc";
} else {
adminFileName = "adminFileNoRelocNoDepends";
- }
+ }
}
Vector fileContent = getAdminFileContent(relocatable, rdepends);
@@ -292,7 +292,7 @@ public class SolarisHelper {
if ( relocatable ) {
if ( rdepends ) {
data.setAdminFileNameReloc(completeAdminFileName);
- } else {
+ } else {
data.setAdminFileNameRelocNoDepends(completeAdminFileName);
}
} else {
@@ -302,7 +302,7 @@ public class SolarisHelper {
data.setAdminFileNameNoRelocNoDepends(completeAdminFileName);
}
}
-
+
if ( ! adminFile.exists() ) {
// only saving, if it did not exist
SystemManager.saveCharFileVector(completeAdminFileName, fileContent);
@@ -322,11 +322,11 @@ public class SolarisHelper {
env.put("LD_PRELOAD_32", data.getGetUidPath());
data.setShellEnvironment(env);
}
-
+
public String getVersionString(Vector returnVector) {
String versionString = null;
String versionLine = null;
-
+
for (int i = 0; i < returnVector.size(); i++) {
String line = (String) returnVector.get(i);
int pos = line.indexOf("REV=");
@@ -341,13 +341,13 @@ public class SolarisHelper {
int pos = versionLine.lastIndexOf(" ");
versionString = versionLine.substring(pos + 1, versionLine.length());
}
-
+
return versionString;
}
public int getInstalledMinor(String version) {
-
- int minor = 0;
+
+ int minor = 0;
int pos = version.indexOf(".");
if ( pos > -1 ) {
@@ -358,7 +358,7 @@ public class SolarisHelper {
reduced = reduced.substring(0, pos);
minor = Integer.parseInt(reduced);
}
- }
+ }
return minor;
}
@@ -375,7 +375,7 @@ public class SolarisHelper {
if (( firstPackageMainVersion != null ) && ( secondPackageMainVersion != null )) {
comparison = compareVersion(firstPackageMainVersion, secondPackageMainVersion);
}
-
+
if ( comparison.equals("firstPackageIsOlder") ) {
firstPackageIsOlder = true;
} else if ( comparison.equals("secondPackageIsOlder") ) {
@@ -388,7 +388,7 @@ public class SolarisHelper {
comparison = compareVersion(firstPackageRevision, secondPackageRevision);
if ( comparison.equals("firstPackageIsOlder") ) {
firstPackageIsOlder = true;
- } else {
+ } else {
firstPackageIsOlder = false;
}
}
@@ -400,5 +400,5 @@ public class SolarisHelper {
return firstPackageIsOlder;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Main.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Main.java
index 75a2af9b3117..623b1a51e363 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Main.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Main.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
package org.openoffice.setup;
import org.openoffice.setup.Controller.AcceptLicenseCtrl;
@@ -44,7 +44,7 @@ import org.openoffice.setup.Controller.PrologueCtrl;
// import org.openoffice.setup.Util.Dumper;
public class Main {
-
+
public static void main(String[] args) {
// try {
// UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
@@ -84,9 +84,9 @@ public class Main {
frame.addPanel(controller5, controller5.getName());
PanelController controller6 = new UninstallationCompletedCtrl();
frame.addPanel(controller6, controller6.getName());
- frame.setCurrentPanel(controller1.getName(), false, true);
+ frame.setCurrentPanel(controller1.getName(), false, true);
}
-
+
int ret = frame.showFrame();
while ( data.stillRunning() ) {
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/AcceptLicense.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/AcceptLicense.java
index 42c1f91cdb13..a9e68b4db91e 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/AcceptLicense.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/AcceptLicense.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,33 +46,33 @@ public class AcceptLicense extends JPanel {
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titletext = ResourceManager.getString("String_AcceptLicense1");
PanelTitle titlebox = new PanelTitle(titletext);
add(titlebox, BorderLayout.NORTH);
JPanel contentpanel = new JPanel();
contentpanel.setLayout(new java.awt.BorderLayout());
-
+
String text1 = ResourceManager.getString("String_AcceptLicense2");
PanelLabel label1 = new PanelLabel(text1);
-
+
String text2 = ResourceManager.getString("String_AcceptLicense3");
PanelLabel label2 = new PanelLabel(text2, true);
JEditorPane editorPane = createEditorPane();
JScrollPane editorScrollPane = new JScrollPane(editorPane);
-
+
editorScrollPane.setPreferredSize(new Dimension(250, 145));
editorScrollPane.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
-
+
contentpanel.add(label1, BorderLayout.NORTH);
contentpanel.add(editorScrollPane, BorderLayout.CENTER);
- contentpanel.add(label2, BorderLayout.SOUTH);
-
+ contentpanel.add(label2, BorderLayout.SOUTH);
+
add(contentpanel, BorderLayout.CENTER);
}
-
+
private JEditorPane createEditorPane() {
JEditorPane editorPane = new JEditorPane();
editorPane.setEditable(false);
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java
index 89f76db06227..70ac3fe72c73 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseComponents.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -57,19 +57,19 @@ import org.openoffice.setup.InstallData;
public class ChooseComponents extends JPanel implements MouseListener, KeyListener, TreeSelectionListener {
private JTree componentTree;
- private PanelLabel descriptionLabel;
+ private PanelLabel descriptionLabel;
private PanelLabel sizeLabel;
-
+
private String sizeString;
private PanelTitle titleBox;
-
+
public ChooseComponents() {
InstallData data = InstallData.getInstance();
setLayout(new BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_ChooseComponents1");
String subtitleText = ResourceManager.getString("String_ChooseComponents2");
titleBox = new PanelTitle(titleText, subtitleText, 2, 40);
@@ -88,25 +88,25 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen
componentTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
componentTree.addTreeSelectionListener(this);
// if ( data.useRtl() ) { componentTree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
String BorderTitle = ResourceManager.getString("String_ChooseComponents3");
TitledBorder PanelBorder = BorderFactory.createTitledBorder(BorderTitle);
-
+
BorderLayout PanelLayout = new BorderLayout();
PanelLayout.setHgap(20);
JPanel DescriptionPanel = new JPanel();
DescriptionPanel.setBorder(PanelBorder);
DescriptionPanel.setLayout(PanelLayout);
-
+
String DescriptionText = "";
- descriptionLabel = new PanelLabel(DescriptionText, 3, 20);
+ descriptionLabel = new PanelLabel(DescriptionText, 3, 20);
sizeString = ResourceManager.getString("String_ChooseComponents4");
sizeLabel = new PanelLabel(sizeString, 1, 5);
-
+
DescriptionPanel.add(descriptionLabel, BorderLayout.CENTER);
DescriptionPanel.add(sizeLabel, BorderLayout.EAST);
if ( data.useRtl() ) { DescriptionPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
add(new JScrollPane(componentTree), BorderLayout.CENTER);
add(DescriptionPanel, BorderLayout.SOUTH);
}
@@ -122,16 +122,16 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen
DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
// model.nodeChanged(node);
-
- // The following line was included because of task i78481.
+
+ // The following line was included because of task i78481.
// In Java 1.6 nodeChanged does not work correctly.
model.nodeStructureChanged(node);
-
+
descriptionLabel.setText(nodeInfo.getDescription());
sizeLabel.setText(sizeString + nodeInfo.getSize());
}
}
-
+
/**
* Implement the MouseListener Interface
*/
@@ -146,14 +146,14 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen
if ((selPath != null) && (componentTree.getPathBounds(selPath).getX() + 20 >= event.getX())) {
updateNode((DefaultMutableTreeNode)selPath.getLastPathComponent());
}
- }
+ }
public void mouseReleased(MouseEvent e) {
}
-
+
/**
* Implement the KeyListener Interface
*/
- public void keyPressed(KeyEvent event) {
+ public void keyPressed(KeyEvent event) {
}
public void keyReleased(KeyEvent event) {
}
@@ -165,9 +165,9 @@ public class ChooseComponents extends JPanel implements MouseListener, KeyListen
}
}
}
-
- /**
- * Implement the TreeSelectionListener Interface.
+
+ /**
+ * Implement the TreeSelectionListener Interface.
*/
public void valueChanged(TreeSelectionEvent event) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)componentTree.getLastSelectedPathComponent();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseDirectory.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseDirectory.java
index 15d44fa2d179..43c86ef03bf6 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseDirectory.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseDirectory.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,74 +48,74 @@ import javax.swing.JTextField;
import javax.swing.border.EmptyBorder;
public class ChooseDirectory extends JPanel implements ActionListener {
-
+
private JFileChooser directoryChooser;
private JFileChooser directoryChooserRootdir;
private JButton directoryButton;
private JButton directoryButtonRootdir;
private JTextField directoryField;
private JTextField directoryFieldRootdir;
- private PanelLabel databaseProgress;
+ private PanelLabel databaseProgress;
private PanelTitle titleBox;
-
+
public ChooseDirectory() {
-
+
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_ChooseDirectory1");
String subtitleText = ResourceManager.getString("String_ChooseDirectory2");
titleBox = new PanelTitle(titleText, subtitleText);
titleBox.addVerticalStrut(10);
add(titleBox, BorderLayout.NORTH);
-
+
Box contentBox = new Box(BoxLayout.Y_AXIS);
-
+
JPanel contentPanel = new JPanel();
contentPanel.setLayout(new GridBagLayout());
-
+
directoryChooser = new JFileChooser();
directoryChooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);
-
+
String browseText = ResourceManager.getString("String_ChooseDirectory3");
directoryButton = new JButton(browseText);
directoryButton.addActionListener(this);
-
+
directoryField = new JTextField();
-
+
GridBagConstraints constraints = new GridBagConstraints();
-
+
constraints.gridx = 0;
constraints.gridy = 0;
constraints.weightx = 1;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(directoryField, constraints);
-
+
constraints.gridx = 1;
constraints.gridy = 0;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(directoryButton, constraints);
-
+
constraints.gridx = 0;
constraints.gridy = 1;
constraints.weightx = 0;
constraints.weighty = 1;
constraints.fill = GridBagConstraints.VERTICAL;
-
+
contentPanel.add(new JPanel(), constraints);
-
+
contentBox.add(contentPanel);
-
+
// defining a place for text output
databaseProgress = new PanelLabel(""); // planned for database progress
contentBox.add(databaseProgress);
-
+
add(contentBox, BorderLayout.CENTER);
}
@@ -126,7 +126,7 @@ public class ChooseDirectory extends JPanel implements ActionListener {
public void setTitleText(String s) {
titleBox.setTitle(s);
}
-
+
public void setDirectory(String dir) {
directoryField.setText(dir);
}
@@ -146,21 +146,21 @@ public class ChooseDirectory extends JPanel implements ActionListener {
public String getDirectory() {
return directoryField.getText();
}
-
+
public void setRootDirectory(String dir) {
directoryFieldRootdir.setText(dir);
}
-
+
public String getRootDirectory() {
return directoryFieldRootdir.getText();
}
-
+
public void actionPerformed(ActionEvent e) {
-
+
//Handle open button action.
if (e.getSource() == directoryButton) {
int ReturnValue = directoryChooser.showOpenDialog(ChooseDirectory.this);
-
+
if (ReturnValue == JFileChooser.APPROVE_OPTION) {
File file = directoryChooser.getSelectedFile();
directoryField.setText(file.getAbsolutePath());
@@ -168,10 +168,10 @@ public class ChooseDirectory extends JPanel implements ActionListener {
// do nothing for now
}
}
-
+
if (e.getSource() == directoryButtonRootdir) {
int ReturnValue = directoryChooserRootdir.showOpenDialog(ChooseDirectory.this);
-
+
if (ReturnValue == JFileChooser.APPROVE_OPTION) {
File file = directoryChooserRootdir.getSelectedFile();
directoryFieldRootdir.setText(file.getAbsolutePath());
@@ -179,7 +179,7 @@ public class ChooseDirectory extends JPanel implements ActionListener {
// do nothing for now
}
}
-
+
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java
index 74a72c936800..f4b3cb4fa42a 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseInstallationType.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -56,35 +56,35 @@ public class ChooseInstallationType extends JPanel {
setLayout(new BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_ChooseInstallationType1");
String subtitleText = ResourceManager.getString("String_ChooseInstallationType2");
PanelTitle titleBox = new PanelTitle(titleText, subtitleText);
titleBox.addVerticalStrut(20);
-
+
if ( data.useRtl() ) { titleBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
- add(titleBox, BorderLayout.NORTH);
-
+
+ add(titleBox, BorderLayout.NORTH);
+
String borderTitle = ResourceManager.getString("String_ChooseInstallationType3");
TitledBorder PanelBorder = BorderFactory.createTitledBorder(borderTitle);
-
+
JPanel contentPanel = new JPanel();
contentPanel.setBorder(PanelBorder);
contentPanel.setLayout(new GridBagLayout());
if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
GridBagConstraints constraints = new GridBagConstraints();
constraints.insets = new Insets(0, 0, 0, 10);
// constraints.anchor = GridBagConstraints.NORTHWEST;
-
+
String typicalText = ResourceManager.getString("String_ChooseInstallationType4");
- PanelLabel typicalComment = new PanelLabel(typicalText, true);
+ PanelLabel typicalComment = new PanelLabel(typicalText, true);
if ( data.useRtl() ) { typicalComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
String customText = ResourceManager.getString("String_ChooseInstallationType5");
PanelLabel customComment = new PanelLabel(customText, true);
if ( data.useRtl() ) { customComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ButtonGroup group = new ButtonGroup();
String typicalButtonText = ResourceManager.getString("String_ChooseInstallationType6");
@@ -96,7 +96,7 @@ public class ChooseInstallationType extends JPanel {
custom = new JRadioButton(customButtonText, false);
custom.setMnemonic(KeyEvent.VK_U);
if ( data.useRtl() ) { custom.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
group.add(typical);
group.add(custom);
@@ -107,13 +107,13 @@ public class ChooseInstallationType extends JPanel {
constraints.fill = GridBagConstraints.VERTICAL;
contentPanel.add(new JPanel(), constraints);
-
+
constraints.gridx = 0;
constraints.gridy = 1;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(typical, constraints);
constraints.gridx = 1;
@@ -121,7 +121,7 @@ public class ChooseInstallationType extends JPanel {
constraints.weightx = 1;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(typicalComment, constraints);
constraints.gridx = 0;
@@ -129,23 +129,23 @@ public class ChooseInstallationType extends JPanel {
constraints.weightx = 0;
constraints.weighty = 1;
constraints.fill = GridBagConstraints.VERTICAL;
-
+
contentPanel.add(new JPanel(), constraints);
-
+
constraints.gridx = 0;
constraints.gridy = 3;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(custom, constraints);
-
+
constraints.gridx = 1;
constraints.gridy = 3;
constraints.weightx = 1;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(customComment, constraints);
constraints.gridx = 0;
@@ -153,9 +153,9 @@ public class ChooseInstallationType extends JPanel {
constraints.weightx = 0;
constraints.weighty = 1;
constraints.fill = GridBagConstraints.VERTICAL;
-
+
contentPanel.add(new JPanel(), constraints);
-
+
add(contentPanel, BorderLayout.CENTER);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java
index 81de5505bc3c..782046bd13c9 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationComponents.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -58,25 +58,25 @@ import org.openoffice.setup.InstallData;
public class ChooseUninstallationComponents extends JPanel implements MouseListener, KeyListener, TreeSelectionListener {
private JTree componentTree;
- private PanelLabel descriptionLabel;
+ private PanelLabel descriptionLabel;
private PanelLabel sizeLabel;
-
+
private String sizeString;
-
+
public ChooseUninstallationComponents() {
InstallData data = InstallData.getInstance();
setLayout(new BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_ChooseComponents1");
String subtitleText = ResourceManager.getString("String_ChooseUninstallationComponents2");
PanelTitle titleBox = new PanelTitle(titleText, subtitleText, 2, 40);
// PanelTitle titleBox = new PanelTitle(titleText, subtitleText);
titleBox.addVerticalStrut(20);
add(titleBox, BorderLayout.NORTH);
-
+
DefaultMutableTreeNode root = SetupDataProvider.createTree();
componentTree = new JTree(root);
@@ -89,30 +89,30 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe
componentTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
componentTree.addTreeSelectionListener(this);
// if ( data.useRtl() ) { componentTree.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
String BorderTitle = ResourceManager.getString("String_ChooseComponents3");
TitledBorder PanelBorder = BorderFactory.createTitledBorder(BorderTitle);
-
+
BorderLayout PanelLayout = new BorderLayout();
PanelLayout.setHgap(20);
JPanel DescriptionPanel = new JPanel();
DescriptionPanel.setBorder(PanelBorder);
DescriptionPanel.setLayout(PanelLayout);
-
+
String DescriptionText = "";
- descriptionLabel = new PanelLabel(DescriptionText, 3, 20);
+ descriptionLabel = new PanelLabel(DescriptionText, 3, 20);
sizeString = ResourceManager.getString("String_ChooseComponents4");
sizeLabel = new PanelLabel(sizeString, 1, 5);
if ( data.useRtl() ) { descriptionLabel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
DescriptionPanel.add(descriptionLabel, BorderLayout.CENTER);
DescriptionPanel.add(sizeLabel, BorderLayout.EAST);
if ( data.useRtl() ) { DescriptionPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
add(new JScrollPane(componentTree), BorderLayout.CENTER);
add(DescriptionPanel, BorderLayout.SOUTH);
}
-
+
private void updateNode(DefaultMutableTreeNode node) {
if (node != null) {
DisplayPackageDescription nodeInfo = (DisplayPackageDescription)node.getUserObject();
@@ -120,12 +120,12 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe
DefaultTreeModel model = (DefaultTreeModel)componentTree.getModel();
model.nodeChanged(node);
-
+
descriptionLabel.setText(nodeInfo.getDescription());
sizeLabel.setText(sizeString + nodeInfo.getSize());
}
}
-
+
/**
* Implement the MouseListener Interface
*/
@@ -140,14 +140,14 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe
if ((selPath != null) && (componentTree.getPathBounds(selPath).getX() + 20 >= event.getX())) {
updateNode((DefaultMutableTreeNode)selPath.getLastPathComponent());
}
- }
+ }
public void mouseReleased(MouseEvent e) {
}
-
+
/**
* Implement the KeyListener Interface
*/
- public void keyPressed(KeyEvent event) {
+ public void keyPressed(KeyEvent event) {
}
public void keyReleased(KeyEvent event) {
}
@@ -159,9 +159,9 @@ public class ChooseUninstallationComponents extends JPanel implements MouseListe
}
}
}
-
- /**
- * Implement the TreeSelectionListener Interface.
+
+ /**
+ * Implement the TreeSelectionListener Interface.
*/
public void valueChanged(TreeSelectionEvent event) {
DefaultMutableTreeNode node = (DefaultMutableTreeNode)componentTree.getLastSelectedPathComponent();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java
index 45e29ba575de..e589cd3d82fc 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/ChooseUninstallationType.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -53,35 +53,35 @@ public class ChooseUninstallationType extends JPanel {
public ChooseUninstallationType() {
InstallData data = InstallData.getInstance();
-
+
setLayout(new BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_ChooseUninstallationType1");
String subtitleText = ResourceManager.getString("String_ChooseUninstallationType2");
PanelTitle titleBox = new PanelTitle(titleText, subtitleText);
titleBox.addVerticalStrut(20);
- add(titleBox, BorderLayout.NORTH);
-
+ add(titleBox, BorderLayout.NORTH);
+
String borderTitle = ResourceManager.getString("String_ChooseUninstallationType1");
TitledBorder PanelBorder = BorderFactory.createTitledBorder(borderTitle);
-
+
JPanel contentPanel = new JPanel();
contentPanel.setBorder(PanelBorder);
contentPanel.setLayout(new GridBagLayout());
if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
GridBagConstraints constraints = new GridBagConstraints();
constraints.insets = new Insets(0, 0, 0, 10);
// constraints.anchor = GridBagConstraints.NORTHWEST;
-
+
String completeText = ResourceManager.getString("String_ChooseUninstallationType4");
- PanelLabel completeComment = new PanelLabel(completeText, true);
+ PanelLabel completeComment = new PanelLabel(completeText, true);
if ( data.useRtl() ) { completeComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
String customText = ResourceManager.getString("String_ChooseUninstallationType5");
PanelLabel customComment = new PanelLabel(customText, true);
if ( data.useRtl() ) { customComment.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ButtonGroup group = new ButtonGroup();
String completeButtonText = ResourceManager.getString("String_ChooseUninstallationType6");
@@ -92,7 +92,7 @@ public class ChooseUninstallationType extends JPanel {
custom = new JRadioButton(customButtonText, false);
custom.setMnemonic(KeyEvent.VK_U);
if ( data.useRtl() ) { custom.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
group.add(complete);
group.add(custom);
@@ -103,13 +103,13 @@ public class ChooseUninstallationType extends JPanel {
constraints.fill = GridBagConstraints.VERTICAL;
contentPanel.add(new JPanel(), constraints);
-
+
constraints.gridx = 0;
constraints.gridy = 1;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(complete, constraints);
constraints.gridx = 1;
@@ -117,7 +117,7 @@ public class ChooseUninstallationType extends JPanel {
constraints.weightx = 1;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(completeComment, constraints);
constraints.gridx = 0;
@@ -125,23 +125,23 @@ public class ChooseUninstallationType extends JPanel {
constraints.weightx = 0;
constraints.weighty = 1;
constraints.fill = GridBagConstraints.VERTICAL;
-
+
contentPanel.add(new JPanel(), constraints);
-
+
constraints.gridx = 0;
constraints.gridy = 3;
constraints.weightx = 0;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(custom, constraints);
-
+
constraints.gridx = 1;
constraints.gridy = 3;
constraints.weightx = 1;
constraints.weighty = 0;
constraints.fill = GridBagConstraints.HORIZONTAL;
-
+
contentPanel.add(customComment, constraints);
constraints.gridx = 0;
@@ -149,9 +149,9 @@ public class ChooseUninstallationType extends JPanel {
constraints.weightx = 0;
constraints.weighty = 1;
constraints.fill = GridBagConstraints.VERTICAL;
-
+
contentPanel.add(new JPanel(), constraints);
-
+
add(contentPanel, BorderLayout.CENTER);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java
index 7fda225f55d9..fa6e55b789e8 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationImminent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,39 +47,39 @@ public class InstallationImminent extends JPanel {
private JEditorPane ProductInformation;
private JScrollPane ProductPane;
private PanelTitle titlebox;
-
+
public InstallationImminent() {
InstallData data = InstallData.getInstance();
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titletext = ResourceManager.getString("String_InstallationImminent1");
titlebox = new PanelTitle(titletext);
add(titlebox, BorderLayout.NORTH);
-
+
JPanel contentpanel = new JPanel();
contentpanel.setLayout(new java.awt.BorderLayout());
if ( data.useRtl() ) { contentpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
String text1 = ResourceManager.getString("String_InstallationImminent2");
PanelLabel label1 = new PanelLabel(text1);
if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ProductInformation = new JEditorPane("text/html", getInfoText());
ProductInformation.setEditable(false);
if ( data.useRtl() ) { ProductInformation.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ProductPane = new JScrollPane(ProductInformation);
ProductPane.setPreferredSize(new Dimension(250, 145));
ProductPane.setBorder(new EmptyBorder(10, 0, 10, 0));
if ( data.useRtl() ) { ProductPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
- contentpanel.add(label1, BorderLayout.NORTH);
+
+ contentpanel.add(label1, BorderLayout.NORTH);
contentpanel.add(ProductPane, BorderLayout.CENTER);
-
- add(contentpanel, BorderLayout.CENTER);
+
+ add(contentpanel, BorderLayout.CENTER);
}
public void setInfoText(String text) {
@@ -94,20 +94,20 @@ public class InstallationImminent extends JPanel {
public String getInfoText() {
return infoText;
}
-
+
public void updateInfoText() {
ProductInformation.setText(infoText);
}
-
+
public void setTabOrder() {
JScrollBar ScrollBar = ProductPane.getVerticalScrollBar();
if ( ScrollBar.isShowing() ) {
ProductInformation.setFocusable(true);
} else {
ProductInformation.setFocusable(false);
- }
+ }
}
-
+
public void setCaretPosition() {
ProductInformation.setCaretPosition(0);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java
index 7daf033ab3bd..ac64418cb893 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/InstallationOngoing.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -49,14 +49,14 @@ public class InstallationOngoing extends JPanel {
private JButton mStopButton;
private String mTitle = "";
private PanelTitle mTitlebox;
-
+
public InstallationOngoing() {
InstallData data = InstallData.getInstance();
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
// String titleText = ResourceManager.getString("String_InstallationOngoing1");
// PanelTitle titlebox = new PanelTitle(titleText);
// PanelTitle titlebox = new PanelTitle(mTitle);
@@ -89,14 +89,14 @@ public class InstallationOngoing extends JPanel {
contentbox.add(Box.createVerticalStrut(10));
contentbox.add(innerbox);
contentbox.add(Box.createVerticalStrut(20));
-
+
add(contentbox, BorderLayout.SOUTH);
}
-
+
public void setProgressText(String s) {
currentProgress.setText(s);
}
-
+
public void setProgressValue(int i) {
progressBar.setValue(i);
}
@@ -113,9 +113,9 @@ public class InstallationOngoing extends JPanel {
public void addStopButtonActionListener(SetupActionListener actionListener) {
mStopButton.addActionListener(actionListener);
}
-
+
public void setStopButtonEnabled(boolean enabled) {
mStopButton.setEnabled(enabled);
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java
index 5209c98241ee..20d64f2981eb 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/Prologue.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -42,10 +42,10 @@ public class Prologue extends JPanel {
public Prologue() {
InstallData data = InstallData.getInstance();
-
+
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_Prologue1");
PanelTitle titleBox = new PanelTitle(titleText);
if ( data.useRtl() ) { titleBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
@@ -53,24 +53,24 @@ public class Prologue extends JPanel {
JPanel contentPanel = new JPanel();
contentPanel.setLayout(new java.awt.BorderLayout());
-
+
String text1 = ResourceManager.getString("String_Prologue2");
PanelLabel label1 = new PanelLabel(text1, true);
if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
String text2 = ResourceManager.getString("String_Prologue3");
PanelLabel label2 = new PanelLabel(text2);
if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
contentPanel.add(label1, BorderLayout.NORTH);
- contentPanel.add(label2, BorderLayout.CENTER);
-
+ contentPanel.add(label2, BorderLayout.CENTER);
+
if ( data.isUserInstallation() ) {
String text3 = ResourceManager.getString("String_Prologue4");
PanelLabel label3 = new PanelLabel(text3, true);
if ( data.useRtl() ) { label3.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
- contentPanel.add(label3, BorderLayout.SOUTH);
+ contentPanel.add(label3, BorderLayout.SOUTH);
}
-
- add(contentPanel, BorderLayout.CENTER);
+
+ add(contentPanel, BorderLayout.CENTER);
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java
index 1c724fc47c86..2f224bb6a78e 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationCompleted.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -54,7 +54,7 @@ public class UninstallationCompleted extends JPanel {
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_UninstallationCompleted1");
titleBox = new PanelTitle(titleText);
add(titleBox, BorderLayout.NORTH);
@@ -64,7 +64,7 @@ public class UninstallationCompleted extends JPanel {
if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
String dialogText = ResourceManager.getString("String_UninstallationCompleted2");
- varLabel = new PanelLabel(dialogText, true);
+ varLabel = new PanelLabel(dialogText, true);
String text2 = ResourceManager.getString("String_InstallationCompleted3");
PanelLabel label2 = new PanelLabel(text2);
if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
@@ -77,18 +77,18 @@ public class UninstallationCompleted extends JPanel {
JPanel ButtonPanel = new JPanel();
ButtonPanel.setLayout(new BorderLayout());
- ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
+ ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
ButtonPanel.setPreferredSize(new Dimension(120, 44));
ButtonPanel.add(mDetailsButton, BorderLayout.NORTH);
if ( data.useRtl() ) { ButtonPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
contentPanel.add(varLabel, BorderLayout.NORTH);
contentPanel.add(ButtonPanel, BorderLayout.EAST);
- contentPanel.add(label2, BorderLayout.CENTER);
-
- add(contentPanel, BorderLayout.CENTER);
+ contentPanel.add(label2, BorderLayout.CENTER);
+
+ add(contentPanel, BorderLayout.CENTER);
}
-
+
public void setDetailsButtonActionCommand(String actionCommand) {
mDetailsButton.setActionCommand(actionCommand);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java
index fdef8958a676..c20d577a4dab 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationImminent.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -46,38 +46,38 @@ public class UninstallationImminent extends JPanel {
private String infoText;
private JEditorPane ProductInformation;
private JScrollPane ProductPane;
-
+
public UninstallationImminent() {
InstallData data = InstallData.getInstance();
-
+
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titletext = ResourceManager.getString("String_UninstallationImminent1");
PanelTitle titlebox = new PanelTitle(titletext);
add(titlebox, BorderLayout.NORTH);
-
+
JPanel contentpanel = new JPanel();
contentpanel.setLayout(new java.awt.BorderLayout());
if ( data.useRtl() ) { contentpanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
String text1 = ResourceManager.getString("String_UninstallationImminent2");
PanelLabel label1 = new PanelLabel(text1);
if ( data.useRtl() ) { label1.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ProductInformation = new JEditorPane("text/html", getInfoText());
ProductInformation.setEditable(false);
if ( data.useRtl() ) { ProductInformation.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
ProductPane = new JScrollPane(ProductInformation);
ProductPane.setPreferredSize(new Dimension(250, 145));
ProductPane.setBorder(new EmptyBorder(10, 0, 10, 0));
if ( data.useRtl() ) { ProductPane.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
- contentpanel.add(label1, BorderLayout.NORTH);
+
+ contentpanel.add(label1, BorderLayout.NORTH);
contentpanel.add(ProductPane, BorderLayout.CENTER);
-
+
add(contentpanel, BorderLayout.CENTER);
}
@@ -89,15 +89,15 @@ public class UninstallationImminent extends JPanel {
public String getInfoText() {
return infoText;
}
-
+
public void updateInfoText() {
ProductInformation.setText(infoText);
}
-
+
public void setTabOrder() {
JScrollBar ScrollBar = ProductPane.getVerticalScrollBar();
if ( ScrollBar.isShowing() ) {
- ProductInformation.setFocusable(true);
+ ProductInformation.setFocusable(true);
} else {
ProductInformation.setFocusable(false);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java
index 6934308d6b47..18e841450f68 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationOngoing.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -47,7 +47,7 @@ public class UninstallationOngoing extends JPanel {
private PanelLabel currentProgress;
private JProgressBar progressBar;
private JButton mStopButton;
-
+
public UninstallationOngoing() {
InstallData data = InstallData.getInstance();
@@ -77,7 +77,7 @@ public class UninstallationOngoing extends JPanel {
String progressButtonText = ResourceManager.getString("String_InstallationOngoing3");
mStopButton.setText(progressButtonText);
mStopButton.setEnabled(true);
-
+
innerbox.add(progressBar);
innerbox.add(Box.createHorizontalStrut(10));
innerbox.add(mStopButton);
@@ -105,5 +105,5 @@ public class UninstallationOngoing extends JPanel {
public void addStopButtonActionListener(SetupActionListener actionListener) {
mStopButton.addActionListener(actionListener);
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationPrologue.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationPrologue.java
index d8ec108298b4..af6020119339 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationPrologue.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/UninstallationPrologue.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -41,22 +41,22 @@ public class UninstallationPrologue extends JPanel {
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_Prologue1");
PanelTitle titleBox = new PanelTitle(titleText);
add(titleBox, BorderLayout.NORTH);
-
+
JPanel contentPanel = new JPanel();
contentPanel.setLayout(new java.awt.BorderLayout());
-
+
String text1 = ResourceManager.getString("String_UninstallationPrologue2");
PanelLabel label1 = new PanelLabel(text1, true);
String text2 = ResourceManager.getString("String_Prologue3");
PanelLabel label2 = new PanelLabel(text2);
-
+
contentPanel.add(label1, BorderLayout.NORTH);
- contentPanel.add(label2, BorderLayout.CENTER);
-
- add(contentPanel, BorderLayout.CENTER);
+ contentPanel.add(label2, BorderLayout.CENTER);
+
+ add(contentPanel, BorderLayout.CENTER);
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java
index e34636da8d6f..00c1627da2dd 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Panel/installationCompleted.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,10 +51,10 @@ public class installationCompleted extends JPanel {
public installationCompleted() {
InstallData data = InstallData.getInstance();
-
+
setLayout(new java.awt.BorderLayout());
setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
-
+
String titleText = ResourceManager.getString("String_InstallationCompleted1");
titleBox = new PanelTitle(titleText);
add(titleBox, BorderLayout.NORTH);
@@ -64,7 +64,7 @@ public class installationCompleted extends JPanel {
if ( data.useRtl() ) { contentPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
String dialogText = ResourceManager.getString("String_InstallationCompleted2");
- varLabel = new PanelLabel(dialogText, true);
+ varLabel = new PanelLabel(dialogText, true);
String text2 = ResourceManager.getString("String_InstallationCompleted3");
PanelLabel label2 = new PanelLabel(text2);
if ( data.useRtl() ) { label2.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
@@ -77,18 +77,18 @@ public class installationCompleted extends JPanel {
JPanel ButtonPanel = new JPanel();
ButtonPanel.setLayout(new BorderLayout());
- ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
+ ButtonPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
ButtonPanel.setPreferredSize(new Dimension(120, 44));
ButtonPanel.add(mDetailsButton, BorderLayout.NORTH);
if ( data.useRtl() ) { ButtonPanel.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
contentPanel.add(varLabel, BorderLayout.NORTH);
contentPanel.add(ButtonPanel, BorderLayout.EAST);
- contentPanel.add(label2, BorderLayout.CENTER);
-
- add(contentPanel, BorderLayout.CENTER);
+ contentPanel.add(label2, BorderLayout.CENTER);
+
+ add(contentPanel, BorderLayout.CENTER);
}
-
+
public void setDetailsButtonActionCommand(String actionCommand) {
mDetailsButton.setActionCommand(actionCommand);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelController.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelController.java
index 51a063e9ebd4..af146077dd1e 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelController.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelController.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,35 +24,35 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
package org.openoffice.setup;
import javax.swing.JPanel;
public abstract class PanelController {
-
+
private SetupFrame frame;
private JPanel panel;
private String name;
private String next;
private String prev;
-
+
private PanelController () {
}
-
+
public PanelController (String name, JPanel panel) {
this.name = name;
this.panel = panel;
}
-
+
public final JPanel getPanel () {
return this.panel;
}
-
+
public final void setPanel (JPanel panel) {
this.panel = panel;
}
-
+
public final String getName () {
return this.name;
}
@@ -60,14 +60,14 @@ public abstract class PanelController {
public final void setName (String name) {
this.name = name;
}
-
+
final void setSetupFrame (SetupFrame frame) {
this.frame = frame;
}
-
+
public final SetupFrame getSetupFrame () {
return this.frame;
- }
+ }
public String getNext () {
return null;
@@ -80,18 +80,18 @@ public abstract class PanelController {
public String getPrevious () {
return null;
}
-
+
public void beforeShow () {
}
-
+
public void duringShow () {
}
-
+
public boolean afterShow (boolean nextButtonPressed) {
boolean repeatDialog = false;
return repeatDialog;
}
-
+
public abstract String getHelpFileName();
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java
index 4fec3cfdb1c5..f6b5977c23e6 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelLabel.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@ import javax.swing.UIManager;
import org.openoffice.setup.InstallData;
public class PanelLabel extends JTextArea {
-
+
static private Color BackgroundColor;
static private Color TextColor;
static private Font TextFont;
@@ -47,36 +47,36 @@ public class PanelLabel extends JTextArea {
super(text, rows, columns);
init(true);
}
-
+
public PanelLabel(String text, boolean multiline) {
super(text);
init(multiline);
}
-
+
public PanelLabel(String text) {
super(text);
init(false);
}
-
+
private void init(boolean multiline) {
setEditable(false);
setBackground(BackgroundColor);
setForeground(TextColor);
setFont(TextFont);
setFocusable(false);
-
+
InstallData data = InstallData.getInstance();
if ( data.useRtl() ) { setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT); }
-
+
if (multiline) {
setLineWrap(true);
setWrapStyleWord(true);
}
}
-
+
static {
BackgroundColor = (Color)UIManager.get("Label.background");
TextColor = (Color)UIManager.get("Label.foreground");
TextFont = ((Font)UIManager.get("Label.font")).deriveFont(Font.PLAIN);
- }
+ }
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java
index 6b383473e541..929a3fc3046b 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/PanelTitle.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,9 +37,9 @@ import javax.swing.JSeparator;
import org.openoffice.setup.InstallData;
public class PanelTitle extends Box {
-
+
private JLabel TitleLabel;
-
+
public PanelTitle() {
super(BoxLayout.PAGE_AXIS);
}
@@ -53,16 +53,16 @@ public class PanelTitle extends Box {
super(BoxLayout.PAGE_AXIS);
init(title, subtitle, 0, 0);
}
-
+
public PanelTitle(String title) {
super (BoxLayout.PAGE_AXIS);
init(title, null, 0, 0);
}
-
+
public void addVerticalStrut(int strut) {
add(createVerticalStrut(strut));
}
-
+
public void setTitle(String title) {
TitleLabel.setText(title);
}
@@ -70,9 +70,9 @@ public class PanelTitle extends Box {
// public void setSubtitle(String subtitle) {
// SubtitleLabel.setText(subtitle);
// }
-
+
private void init(String title, String subtitle, int rows, int columns) {
-
+
InstallData data = InstallData.getInstance();
TitleLabel = new JLabel(title);
@@ -85,19 +85,19 @@ public class PanelTitle extends Box {
TitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
}
TitlePanel.add(TitleLabel);
-
+
add(createVerticalStrut(10));
add(TitlePanel);
add(createVerticalStrut(10));
add(new JSeparator());
add(createVerticalStrut(20));
-
+
if (subtitle != null) {
PanelLabel SubtitleLabel = null;
if ( rows > 0 ) {
SubtitleLabel = new PanelLabel(subtitle, rows, columns );
} else {
- SubtitleLabel = new PanelLabel(subtitle);
+ SubtitleLabel = new PanelLabel(subtitle);
}
SubtitleLabel.setFocusable(false);
// PanelLabel SubtitleLabel = new PanelLabel(subtitle, true);
@@ -109,7 +109,7 @@ public class PanelTitle extends Box {
SubtitlePanel.setLayout(new FlowLayout(FlowLayout.LEFT, 0, 0));
}
SubtitlePanel.add(SubtitleLabel);
-
+
add(SubtitlePanel);
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java
index 7b9253d60ba8..914c6d9cc735 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/PanelHelper/TreeNodeRenderer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ import javax.swing.tree.DefaultMutableTreeNode;
import javax.swing.tree.DefaultTreeCellRenderer;
public class TreeNodeRenderer extends DefaultTreeCellRenderer {
-
+
ImageIcon InstallIcon;
ImageIcon InstalledIcon;
ImageIcon DontInstallIcon;
@@ -55,12 +55,12 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer {
public Component getTreeCellRendererComponent(
JTree tree, Object value, boolean sel, boolean expanded,
boolean leaf, int row, boolean hasFocus) {
-
+
super.getTreeCellRendererComponent(tree, value, sel, expanded, leaf, row, hasFocus);
DefaultMutableTreeNode node = (DefaultMutableTreeNode) value;
Object nodeObject = node.getUserObject();
-
+
if (DisplayPackageDescription.is(nodeObject)) {
DisplayPackageDescription nodeInfo = (DisplayPackageDescription)nodeObject;
@@ -75,7 +75,7 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer {
default: setIcon(InstalledIcon); break;
}
}
-
+
if (sel) {
setBackground(super.getBackgroundSelectionColor());
setForeground(textSelectionColor);
@@ -83,7 +83,7 @@ public class TreeNodeRenderer extends DefaultTreeCellRenderer {
setBackground(super.getBackgroundNonSelectionColor());
setForeground(textSelectionColor);
}
-
+
return this;
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/ResourceManager.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/ResourceManager.java
index e0c28b96b512..2e015ec13508 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/ResourceManager.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/ResourceManager.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,47 +40,47 @@ import java.util.ResourceBundle;
import javax.swing.ImageIcon;
public class ResourceManager {
-
+
static PropertyResourceBundle stringResourceBundle;
static PropertyResourceBundle fileNameResourceBundle;
static HashMap setupFiles = new HashMap(); // required, because it is not possible to set values in fileNameResourceBundle
-
+
private ResourceManager() {
}
-
+
static public void checkFileExistence(File htmlDirectory) {
for (Enumeration e = fileNameResourceBundle.getKeys(); e.hasMoreElements(); ) {
- String key = (String) e.nextElement();
+ String key = (String) e.nextElement();
String fileName = (String)(fileNameResourceBundle.getObject(key));
if ( ! fileName.endsWith("html") ) {
// no check of existence for non-html files
- setupFiles.put(key, fileName);
+ setupFiles.put(key, fileName);
// System.err.println("Using file: " + fileName);
}
if ( fileName.endsWith("html") ) {
boolean fileExists = true;
-
+
File file = new File(htmlDirectory, fileName);
File newFile = null;
if ( file.exists() ) {
- setupFiles.put(key, fileName);
+ setupFiles.put(key, fileName);
// System.err.println("Using file: " + fileName);
} else {
fileExists = false;
// try to use english version
int pos1 = fileName.lastIndexOf("_");
-
+
if ( pos1 > 0 ) {
int pos2 = fileName.lastIndexOf(".");
String newFileName = fileName.substring(0, pos1) + fileName.substring(pos2, fileName.length());
newFile = new File(htmlDirectory, newFileName);
if ( newFile.exists() ) {
fileExists = true;
- setupFiles.put(key, newFileName);
+ setupFiles.put(key, newFileName);
// System.err.println("Using file: " + fileName);
} else {
// Introducing fallback to a very special simple html page
@@ -90,11 +90,11 @@ public class ResourceManager {
fileExists = true;
setupFiles.put(key, simplePage);
// System.err.println("Using file: " + fileName);
- }
+ }
}
}
}
-
+
if ( ! fileExists ) {
if ( newFile != null ) {
System.err.println("ERROR: Neither file \"" + file.getPath() +
@@ -104,10 +104,10 @@ public class ResourceManager {
}
System.exit(1);
}
- }
- }
+ }
+ }
}
-
+
static public String getString(String key) {
String value = (String)(stringResourceBundle.getObject(key));
if (value != null && (value.indexOf('$') >= 0)) {
@@ -121,11 +121,11 @@ public class ResourceManager {
// String value = (String)(fileNameResourceBundle.getObject(key));
return value;
}
-
+
static public ImageIcon getIcon(String key) {
-
+
String name = getFileName(key);
-
+
try {
Class c = Class.forName("org.openoffice.setup.ResourceManager");
URL url = c.getResource(name);
@@ -133,7 +133,7 @@ public class ResourceManager {
return new ImageIcon(url);
} else {
System.err.println("Error: file not found: " + name);
- }
+ }
} catch (ClassNotFoundException e) {
System.err.println(e);
}
@@ -142,14 +142,14 @@ public class ResourceManager {
}
static public ImageIcon getIconFromPath(File file) {
-
+
try {
URL url = file.toURL();
if (url != null) {
return new ImageIcon(url);
} else {
System.err.println("Error: file not found: " + file.getPath());
- }
+ }
} catch (MalformedURLException e) {
System.err.println(e);
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupActionListener.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupActionListener.java
index 1fd8aa72ac2e..0be6672dd091 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupActionListener.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupActionListener.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -36,9 +36,9 @@ import javax.swing.JDialog;
import javax.swing.JOptionPane;
public class SetupActionListener implements ActionListener {
-
+
private SetupFrame setupFrame;
-
+
public SetupActionListener(SetupFrame setup) {
setupFrame = setup;
}
@@ -53,7 +53,7 @@ public class SetupActionListener implements ActionListener {
} else {
StringCancelDialog = ResourceManager.getString("String_Cancel_Dialog_Uninstallation");
}
- StringCancelDialogTitle = ResourceManager.getString("String_Cancel_Dialog_Title");
+ StringCancelDialogTitle = ResourceManager.getString("String_Cancel_Dialog_Title");
JDialog dialog = setupFrame.getDialog();
int n = JOptionPane.showConfirmDialog(dialog, StringCancelDialog, StringCancelDialogTitle,
JOptionPane.YES_NO_OPTION);
@@ -70,7 +70,7 @@ public class SetupActionListener implements ActionListener {
StringStopDialogTitle = ResourceManager.getString("String_Stop_Dialog_Title");
} else {
StringStopDialog = ResourceManager.getString("String_Stop_Dialog_Uninstallation");
- StringStopDialogTitle = ResourceManager.getString("String_Stop_Dialog_Title_Uninstallation");
+ StringStopDialogTitle = ResourceManager.getString("String_Stop_Dialog_Title_Uninstallation");
}
JDialog dialog = setupFrame.getDialog();
int n = JOptionPane.showConfirmDialog(dialog, StringStopDialog, StringStopDialogTitle,
@@ -84,14 +84,14 @@ public class SetupActionListener implements ActionListener {
// panel.setStopButtonSelected();
} else if (evt.getActionCommand().equals(SetupFrame.ACTION_PREVIOUS)) {
PanelController panel = setupFrame.getCurrentPanel();
- String previous = panel.getPrevious();
+ String previous = panel.getPrevious();
setupFrame.setCurrentPanel(previous, true, false);
} else if (evt.getActionCommand().equals(SetupFrame.ACTION_NEXT)) {
PanelController panel = setupFrame.getCurrentPanel();
- String next = panel.getNext();
- if (next == null) {
+ String next = panel.getNext();
+ if (next == null) {
setupFrame.close(SetupFrame.CODE_OK);
- } else {
+ } else {
setupFrame.setCurrentPanel(next, false, true);
}
} else if (evt.getActionCommand().equals(SetupFrame.ACTION_DETAILS)) {
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/DisplayPackageDescription.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/DisplayPackageDescription.java
index f7926c4fd314..76ddef130e8b 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/DisplayPackageDescription.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/DisplayPackageDescription.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,7 +37,7 @@ public class DisplayPackageDescription {
private PackageDescription data;
private int size = 0;
-
+
public DisplayPackageDescription(PackageDescription data) {
this.data = data;
// Setting default module settings for modules, that are not hidden
@@ -49,21 +49,21 @@ public class DisplayPackageDescription {
public String getDescription() {
return data.getDescription();
}
-
+
public int getSize() {
return size; // using local size
}
-
+
public int getState() {
return data.getSelectionState();
}
-
+
private int getSize(TreeNode peerNode) {
// return peerNode.isLeaf() ? data.getAccumulatedSize() : data.getSize();
// using size from PackageDescription, which is pkgSize (and that is defined in xpd file)
return data.getSize();
}
-
+
public void setState(TreeNode node, int newState) {
if ((data.getSelectionState() != PackageDescription.IGNORE) && data.isOptional()) {
data.setSelectionState(newState);
@@ -72,12 +72,12 @@ public class DisplayPackageDescription {
if (!node.isLeaf()) {
size = data.getSize(); // -> that is the value defined in xpd file
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+ for (Enumeration e = node.children(); e.hasMoreElements();) {
TreeNode child = (TreeNode)e.nextElement();
DisplayPackageDescription childInfo = getInfo(child);
-
+
childInfo.setState(child, newState);
-
+
if (childInfo.isSelected()) {
size += childInfo.getSize(child);
}
@@ -90,9 +90,9 @@ public class DisplayPackageDescription {
public void toggleState(TreeNode node) {
int state = data.getSelectionState();
-
+
if (state != PackageDescription.IGNORE) {
-
+
if (state == PackageDescription.REMOVE) {
setState(node, PackageDescription.DONT_REMOVE);
} else if ((state == PackageDescription.DONT_REMOVE) || (state == PackageDescription.REMOVE_SOME)) {
@@ -102,7 +102,7 @@ public class DisplayPackageDescription {
} else {
setState(node, PackageDescription.DONT_INSTALL);
}
-
+
if (!node.isLeaf()) {
updateState(node);
}
@@ -110,16 +110,16 @@ public class DisplayPackageDescription {
try {
TreeNode parent = node.getParent();
DisplayPackageDescription parentInfo = getInfo(parent);
-
+
parentInfo.updateState(parent);
try {
TreeNode grandpa = parent.getParent();
DisplayPackageDescription grandpaInfo = getInfo(grandpa);
-
+
grandpaInfo.updateState(grandpa);
} catch (java.lang.IllegalArgumentException e) {
/* ignore */
- }
+ }
} catch (java.lang.IllegalArgumentException e) {
/* ignore */
@@ -133,10 +133,10 @@ public class DisplayPackageDescription {
InstallData installdata = InstallData.getInstance();
size = data.getSize(); // -> that is the value defined in xpd file
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+ for (Enumeration e = node.children(); e.hasMoreElements();) {
TreeNode child = (TreeNode) e.nextElement();
DisplayPackageDescription childInfo = getInfo(child);
-
+
int childState = childInfo.getState();
if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
@@ -152,7 +152,7 @@ public class DisplayPackageDescription {
size += childInfo.getSize(child);
}
}
-
+
data.setSelectionState(state);
}
@@ -160,8 +160,8 @@ public class DisplayPackageDescription {
public void updateSize(TreeNode node)
{
size = data.getSize(); // -> that is the value defined in xpd file
-
- for (Enumeration e = node.children(); e.hasMoreElements();) {
+
+ for (Enumeration e = node.children(); e.hasMoreElements();) {
TreeNode child = (TreeNode) e.nextElement();
DisplayPackageDescription childInfo = getInfo(child);
if (childInfo.isSelected()) {
@@ -173,23 +173,23 @@ public class DisplayPackageDescription {
public String toString() {
return data.getName();
}
-
+
static public boolean is(Object o) {
- return (o != null)
+ return (o != null)
&& (o.getClass().getName().equals("org.openoffice.setup.SetupData.DisplayPackageDescription"));
}
-
+
public boolean isSelected() {
int state = data.getSelectionState();
- return (state == PackageDescription.INSTALL) || (state == PackageDescription.INSTALL_SOME)
+ return (state == PackageDescription.INSTALL) || (state == PackageDescription.INSTALL_SOME)
|| (state == PackageDescription.REMOVE) || (state == PackageDescription.REMOVE_SOME);
}
-
+
private DisplayPackageDescription getInfo(TreeNode node) throws java.lang.IllegalArgumentException {
if (node == null) {
throw new java.lang.IllegalArgumentException();
}
-
+
DisplayPackageDescription info = (DisplayPackageDescription)((DefaultMutableTreeNode)node).getUserObject();
if ((info != null) && is(info)) {
return info;
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java
index 4ed331bff2d7..aa6969750186 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/PackageDescription.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -24,7 +24,7 @@
* for a copy of the LGPLv3 License.
*
************************************************************************/
-
+
package org.openoffice.setup.SetupData;
import org.openoffice.setup.Util.Parser;
@@ -42,7 +42,7 @@ import javax.swing.tree.TreeNode;
* @author Ingo Schmidt
*/
public class PackageDescription implements TreeNode {
-
+
public final static int NOTA_UNIT= 0;
public final static int RPM_UNIT = 1;
public final static int PKG_UNIT = 2;
@@ -50,7 +50,7 @@ public class PackageDescription implements TreeNode {
* public final static int TAR_UNIT = 4;
* public final static int TGZ_UNIT = 5;
*/
-
+
public final static int DONT_INSTALL = 0;
public final static int INSTALL = 1;
public final static int INSTALL_SOME = 2;
@@ -59,14 +59,14 @@ public class PackageDescription implements TreeNode {
public final static int REMOVE_SOME = 5;
public final static int IGNORE = 6;
public final static int DONT_KNOW = 7;
-
+
/* hierarchy information */
private Vector children = null;
private PackageDescription parent = null;
-
+
/* did the user select this package */
private int usrSelectionState = DONT_KNOW;
-
+
/* display information */
private String dpyName = "";
private String dpyDescription = "";
@@ -80,7 +80,7 @@ public class PackageDescription implements TreeNode {
private boolean isOptional = true;
private boolean dontUninstall = false;
private boolean allChildrenHidden = false;
-
+
/* package information */
private String pkgMD5Sum = "";
private String pkgFileName = "";
@@ -106,41 +106,41 @@ public class PackageDescription implements TreeNode {
private boolean isNewInstalled = false;
private boolean wasAlreadyInstalled = false;
private boolean ignoreDependsForUninstall = false;
-
+
/* Saving the default selection state. This is necessary, if the user chooses
- * the custom installation type, makes changes, and then changes into
+ * the custom installation type, makes changes, and then changes into
* the typical installation set. Then all user settings have to be removed again.
* On the other hand, if the user then changes to the custom installation type
* again, he probably wants to see the settings he has done before.
*/
-
+
private int typicalSelectionState = DONT_KNOW; // Saving settings for typical installation
private int customSelectionState = DONT_KNOW; // Saving settings for custom installation
private int startSelectionState = DONT_KNOW; // Saving settings at start of installation
public PackageDescription() {}
-
- /**
- * construct only with package information to wrap
+
+ /**
+ * construct only with package information to wrap
*/
protected PackageDescription(XMLPackageDescription p) {
this(p, (PackageDescription)null);
}
-
+
private PackageDescription(XMLPackageDescription descriptionData, PackageDescription parent) {
-
+
this.parent = parent;
children = new Vector();
parse(descriptionData);
-
+
/* sort according to display sort key */
Collections.sort(children, new PackageComparator());
}
-
+
/**
* retrieve information about the package properties
*/
-
+
public String getName() {
return dpyName;
}
@@ -148,7 +148,7 @@ public class PackageDescription implements TreeNode {
public void setName(String name) {
dpyName = name;
}
-
+
public String getDescription() {
return dpyDescription;
}
@@ -156,11 +156,11 @@ public class PackageDescription implements TreeNode {
public String getCheckSolaris() {
return checkSolaris;
}
-
+
public int getSize() {
return pkgSize;
}
-
+
public void setSize(int size) {
pkgSize = size;
}
@@ -180,7 +180,7 @@ public class PackageDescription implements TreeNode {
// // Should only be accumulated for selected modules
// PackageDescription data = (PackageDescription) e.nextElement();
// size += data.getSize();
- // }
+ // }
//
// return size;
// }
@@ -188,7 +188,7 @@ public class PackageDescription implements TreeNode {
public boolean isOptional() {
return isOptional;
}
-
+
public boolean isHidden() {
return isHidden;
}
@@ -268,7 +268,7 @@ public class PackageDescription implements TreeNode {
public boolean isDefault() {
return isDefault;
}
-
+
public String getMD5() {
return pkgMD5Sum;
}
@@ -280,7 +280,7 @@ public class PackageDescription implements TreeNode {
public void setIsRelocatable(boolean relocatable) {
isRelocatable = relocatable;
}
-
+
public String getPackageName() {
return pkgFileName;
}
@@ -301,7 +301,7 @@ public class PackageDescription implements TreeNode {
public int getSelectionState() {
return usrSelectionState;
}
-
+
public void setSelectionState(int state) {
usrSelectionState = state;
}
@@ -309,15 +309,15 @@ public class PackageDescription implements TreeNode {
public int getCustomSelectionState() {
return customSelectionState;
}
-
+
public void setCustomSelectionState(int state) {
customSelectionState = state;
}
-
+
public int getTypicalSelectionState() {
return typicalSelectionState;
}
-
+
public void setTypicalSelectionState(int state) {
typicalSelectionState = state;
}
@@ -325,11 +325,11 @@ public class PackageDescription implements TreeNode {
public int getStartSelectionState() {
return startSelectionState;
}
-
+
public void setStartSelectionState(int state) {
startSelectionState = state;
}
-
+
public boolean isAllChildrenHidden() {
return allChildrenHidden;
}
@@ -341,11 +341,11 @@ public class PackageDescription implements TreeNode {
public void setIsHidden(boolean hidden) {
isHidden = hidden;
}
-
+
public boolean pkgExists() {
return pkgExists;
}
-
+
public void setPkgExists(boolean exists) {
pkgExists = exists;
}
@@ -395,11 +395,11 @@ public class PackageDescription implements TreeNode {
*/
private String getLocalizedValue(XMLPackageDescription packageData, String section, Locale l) {
String localizedValue = "";
-
+
String countryString = l.getCountry();
String languageString = l.getLanguage();
String localeString = languageString + "_" + countryString;
-
+
XMLPackageDescription subPackage = packageData.getElement(section, "lang", localeString);
if (subPackage == null) {
subPackage = packageData.getElement(section, "lang", languageString);
@@ -408,21 +408,21 @@ public class PackageDescription implements TreeNode {
}
}
if (subPackage != null) {
- localizedValue = subPackage.getValue();
+ localizedValue = subPackage.getValue();
}
-
+
return localizedValue;
}
-
+
/**
* parse the wrapped package description
*/
-
+
private void parse(XMLPackageDescription data) {
-
+
XMLPackageDescription section;
XMLPackageDescription subSection;
-
+
/* information about how to display the node */
section = data.getElement("display");
if (section != null) {
@@ -436,7 +436,7 @@ public class PackageDescription implements TreeNode {
Locale locale = Locale.getDefault();
dpyName = getLocalizedValue(section, "name", locale);
dpyDescription = getLocalizedValue(section, "description", locale);
-
+
subSection = section.getElement("sortkey");
if (subSection != null) {
String sort = subSection.getValue();
@@ -520,7 +520,7 @@ public class PackageDescription implements TreeNode {
}
}
-
+
/* query information about the physical (rpm/pkg/msi...) package itself */
section = data.getElement("installunit");
if (section != null) {
@@ -532,7 +532,7 @@ public class PackageDescription implements TreeNode {
pkgType = PKG_UNIT;
}
}
-
+
subSection = section.getElement("size");
if (subSection != null) {
String sz = subSection.getValue();
@@ -548,7 +548,7 @@ public class PackageDescription implements TreeNode {
}
subSection = section.getElement("md5");
if (subSection != null) {
- pkgMD5Sum = subSection.getValue();
+ pkgMD5Sum = subSection.getValue();
}
subSection = section.getElement("name");
if (subSection != null) {
@@ -578,7 +578,7 @@ public class PackageDescription implements TreeNode {
}
}
-
+
/* line up the subpackages */
for (Enumeration enumPackages = data.elements(); enumPackages.hasMoreElements(); ) {
XMLPackageDescription p = (XMLPackageDescription) enumPackages.nextElement();
@@ -586,44 +586,44 @@ public class PackageDescription implements TreeNode {
children.add(new PackageDescription(p, this));
}
}
- }
-
+ }
+
/**
* sort according to the display sortkey
*/
-
+
private class PackageComparator implements Comparator {
public int compare(Object w1, Object w2) {
return ((PackageDescription) w1).dpySortKey - ((PackageDescription) w2).dpySortKey;
}
}
-
+
/**
* implement a TreeNode interface for convenient travelling through the data
*/
-
+
private class PackageEnumeration implements Enumeration {
-
+
Enumeration e;
protected PackageEnumeration() {
e = children.elements();
- }
+ }
public boolean hasMoreElements() {
return e.hasMoreElements();
}
public Object nextElement() {
return e.nextElement();
- }
+ }
}
/**
- * TreeNode interface
+ * TreeNode interface
*/
public Enumeration children() {
return new PackageEnumeration();
}
-
+
public boolean getAllowsChildren() {
return true;
}
@@ -639,11 +639,11 @@ public class PackageDescription implements TreeNode {
public int getChildCount() {
return children.size();
}
-
+
public int getIndex(TreeNode node) {
return children.indexOf(node);
}
-
+
// public PackageDescription getParent() {
// return parent;
// }
@@ -655,5 +655,5 @@ public class PackageDescription implements TreeNode {
public boolean isLeaf() {
return children.size() == 0;
}
-
+
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java
index e5933a996834..f2bdc6161964 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/ProductDescription.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,31 +40,31 @@ import java.util.regex.Pattern;
* @author Christof Pintaske
*/
public class ProductDescription {
-
+
private class Pair {
public Pattern search;
public String replacement;
-
+
public Pair(Pattern key, String value) {
search = key;
replacement = value;
}
}
-
+
private Vector macro; /* macro list with precompiled regex patterns */
private HashMap map; /* conventional key-value pairs */
private String backslashText = "THIS_IS_A_BACKSLASH";
-
- /**
+
+ /**
* read properties from package description data
*/
-
+
protected ProductDescription(XMLPackageDescription descriptionData) {
macro = new Vector();
map = new HashMap();
parse(descriptionData);
}
-
+
/**
* retrieve information about general installation properties
*/
@@ -104,21 +104,21 @@ public class ProductDescription {
System.out.println("Key: " + pair.search.pattern() + " Value: " + pair.replacement );
}
}
-
+
public String get(String key) {
return (String) map.get(key);
}
private boolean doMaskBackslash(String[] arr) {
boolean changed = false;
-
+
int index = arr[0].indexOf('\\');
if ( index >= 0 ) {
arr[0] = arr[0].replaceAll("\\", backslashText);
// arr[0] = arr[0].replace("\\", backslashText);
changed = true;
}
-
+
return changed;
}
@@ -129,9 +129,9 @@ public class ProductDescription {
}
public String replaceMacros(String s) {
-
+
String result = s;
-
+
for (int i = 0; i < macro.size(); i++) {
Pair pair = (Pair) macro.get(i);
Pattern pattern = pair.search;
@@ -152,13 +152,13 @@ public class ProductDescription {
return result;
}
-
+
/**
* parse the wrapped package description
*/
-
+
private void parse(XMLPackageDescription data) {
-
+
XMLPackageDescription section;
/* product description is a leaf at the root */
@@ -167,7 +167,7 @@ public class ProductDescription {
if (section != null) {
parse(section);
}
- } else {
+ } else {
InstallData installData = InstallData.getInstance();
/* check for a default installation directory */
@@ -176,8 +176,8 @@ public class ProductDescription {
String value = section.getValue();
if (value != null) {
installData.setDefaultDir(value);
- // installData.setInstallDir(value);
- }
+ // installData.setInstallDir(value);
+ }
}
/* check for a default product directory */
@@ -186,7 +186,7 @@ public class ProductDescription {
String value = section.getValue();
if (value != null) {
installData.setProductDir(value);
- }
+ }
}
/* check for the package format of this installation set */
@@ -195,7 +195,7 @@ public class ProductDescription {
String value = section.getValue();
if (value != null) {
installData.setPackageFormat(value);
- }
+ }
}
/* check for the package directory of this installation set */
@@ -204,7 +204,7 @@ public class ProductDescription {
String value = section.getValue();
if ((value != null) && (! value.equals(""))) {
installData.setPackageSubdir(value);
- }
+ }
}
/* check for the architecture of this installation set */
@@ -213,7 +213,7 @@ public class ProductDescription {
String value = section.getValue();
if ((value != null) && (! value.equals(""))) {
installData.setArchitecture(value);
- }
+ }
}
section = data.getElement("multilingual");
@@ -222,7 +222,7 @@ public class ProductDescription {
if ((value != null) && (! value.equals(""))) {
boolean multilingualValue = Parser.parseBoolean(value);
installData.setIsMultiLingual(multilingualValue);
- }
+ }
}
/* check for the update behaviour of this installation set */
@@ -243,7 +243,7 @@ public class ProductDescription {
if (value != null) {
int intValue = Integer.parseInt(value);
installData.setProductMinor(intValue);
- }
+ }
}
section = data.getElement("hideeula");
@@ -252,7 +252,7 @@ public class ProductDescription {
if ((value != null) && (! value.equals(""))) {
boolean hideeulaValue = Parser.parseBoolean(value);
installData.setHideEula(hideeulaValue);
- }
+ }
}
/* check for any macro definitions */
@@ -261,7 +261,7 @@ public class ProductDescription {
if (p.getKey().equals("macro")) {
String key = p.getAttribute("key");
String value = p.getValue();
-
+
if ((key != null) && (value != null)) {
String match = "\\$\\{" + key + "\\}";
Pattern pattern = Pattern.compile(match, Pattern.CASE_INSENSITIVE);
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/SetupDataProvider.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/SetupDataProvider.java
index 55b6b06a86e0..f83657cd6b64 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/SetupDataProvider.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/SetupDataProvider.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -74,7 +74,7 @@ public class SetupDataProvider {
DefaultMutableTreeNode node = new DefaultMutableTreeNode();
node.setUserObject(new DisplayPackageDescription(data));
-
+
for (Enumeration e = data.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/XMLPackageDescription.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/XMLPackageDescription.java
index ab7aef57b526..c660e43d3454 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/XMLPackageDescription.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupData/XMLPackageDescription.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -48,25 +48,25 @@ public class XMLPackageDescription {
* fill the package description tree by handling the SAXParser events
*/
private class PackageDescriptionHandler extends DefaultHandler {
-
+
private XMLPackageDescription root;
private Stack stack;
-
+
public PackageDescriptionHandler(XMLPackageDescription base) {
root = base;
stack = new Stack();
}
-
+
private PackageDescriptionHandler() {
/* forbidden */
}
-
+
public XMLPackageDescription getDescription() {
return root;
}
-
+
/* implement the DefaultHandler interface */
-
+
public void characters(char[] ch, int start, int length) {
XMLPackageDescription entity = (XMLPackageDescription) stack.peek();
entity.value = entity.value == null ? new String(ch, start, length)
@@ -81,12 +81,12 @@ public class XMLPackageDescription {
public void startElement(String uri, String localName, String qName, Attributes attributes) {
XMLPackageDescription parent = (XMLPackageDescription) stack.peek();
XMLPackageDescription entity = new XMLPackageDescription();
-
+
entity.key = qName;
for (int i = 0; i < attributes.getLength(); i++) {
entity.attributes.put(attributes.getQName(i), attributes.getValue(i));
}
-
+
parent.add(entity);
stack.push(entity);
}
@@ -106,11 +106,11 @@ public class XMLPackageDescription {
System.err.println("Warning:" + e);
}
}
-
+
/**
* general storage for XML elements
*/
-
+
private String key; /* XML element name */
private String value; /* XML element characters */
private Hashtable attributes; /* XML element attributes */
@@ -122,11 +122,11 @@ public class XMLPackageDescription {
attributes = new Hashtable();
children = new Vector();
}
-
+
private void add(XMLPackageDescription p) {
children.add(p);
}
-
+
/**
* helper routines to find content information
*/
@@ -134,12 +134,12 @@ public class XMLPackageDescription {
return key;
}
protected String getAttribute(String key) {
- return (String) attributes.get(key);
+ return (String) attributes.get(key);
}
protected String getValue() {
return value;
}
- protected XMLPackageDescription getElement(String key) {
+ protected XMLPackageDescription getElement(String key) {
return getElement(key, null, null);
}
protected XMLPackageDescription getElement(String key, String attrKey, String attrValue) {
@@ -165,7 +165,7 @@ public class XMLPackageDescription {
if ((self != null) && self.equals(name))
return this;
-
+
XMLPackageDescription found = null;
for (Enumeration e = children.elements(); e.hasMoreElements();) {
XMLPackageDescription child = (XMLPackageDescription) e.nextElement();
@@ -175,24 +175,24 @@ public class XMLPackageDescription {
break;
}
}
- }
+ }
return found;
}
-
- /**
+
+ /**
* adjust the tree so that all children have a matching parent and not just
* the ones they got by reading files in random order
*/
- private void adjust(XMLPackageDescription root) {
+ private void adjust(XMLPackageDescription root) {
String self = (String) attributes.get("name");
-
+
for (int i = children.size() - 1; i >= 0; --i) {
XMLPackageDescription child = (XMLPackageDescription) children.elementAt(i);
String childParentName = child.getAttribute("parent");
if (childParentName != null) {
-
+
child.adjust(root);
-
+
if ((childParentName != null) && (childParentName.length() > 0) && (! childParentName.equals(self))) {
XMLPackageDescription newParent = root.findPackage(childParentName);
if (newParent != null) {
@@ -203,10 +203,10 @@ public class XMLPackageDescription {
}
}
}
-
+
protected void read() {
PackageDescriptionHandler handler = new PackageDescriptionHandler(this);
-
+
try {
SAXParserFactory factory = SAXParserFactory.newInstance();
SAXParser parser = factory.newSAXParser();
@@ -236,36 +236,36 @@ public class XMLPackageDescription {
} catch (SAXException ex) {
ex.printStackTrace();
}
-
+
adjust(this);
}
-
+
/* provide an iterator through the children */
protected class Elements implements Enumeration {
-
+
Enumeration e;
protected Elements() {
e = children.elements();
- }
+ }
public boolean hasMoreElements() {
return e.hasMoreElements();
}
public Object nextElement() {
return e.nextElement();
- }
+ }
}
-
+
protected Enumeration elements() {
return new Elements();
}
-
-
+
+
// FIXME: remove it, dump() is for testing only
public void dump() {
dump("");
}
-
+
// FIXME: remove it, dump(String) is for testing only
public void dump(String indent) {
final String space = " ";
@@ -280,7 +280,7 @@ public class XMLPackageDescription {
if (key != null) {
System.out.print(">");
}
-
+
if ((value != null) && (value.length() > 0)) {
String trimmedValue = value.trim();
if (trimmedValue.length() > 60) {
@@ -290,7 +290,7 @@ public class XMLPackageDescription {
System.out.print(trimmedValue);
}
}
-
+
for (Enumeration e = children.elements() ; e.hasMoreElements() ;) {
XMLPackageDescription current = (XMLPackageDescription) e.nextElement();
System.out.println();
@@ -301,7 +301,7 @@ public class XMLPackageDescription {
System.out.print(indent);
}
if (key != null) {
- System.out.print("</" + key + ">");
+ System.out.print("</" + key + ">");
}
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java
index 98b7e0a1b7fc..49467eb6c93a 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/SetupFrame.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -51,7 +51,7 @@ public class SetupFrame extends WindowAdapter {
String StringFinish;
String StringHelp;
String StringAppTitle;
-
+
Icon IconStarOffice;
public static final String ACTION_NEXT = "ActionNext";
@@ -64,7 +64,7 @@ public class SetupFrame extends WindowAdapter {
public static final int CODE_OK = 0;
public static final int CODE_CANCEL = 1;
public static final int CODE_ERROR = 2;
-
+
public static final int BUTTON_NEXT = 1;
public static final int BUTTON_PREVIOUS = 2;
public static final int BUTTON_CANCEL = 3;
@@ -79,9 +79,9 @@ public class SetupFrame extends WindowAdapter {
private JPanel mCardPanel;
private CardLayout mCardLayout;
-
+
private SetupActionListener mActionListener;
- private DeckOfPanels mDeck;
+ private DeckOfPanels mDeck;
public SetupFrame() {
@@ -90,41 +90,41 @@ public class SetupFrame extends WindowAdapter {
StringCancel = ResourceManager.getString("String_Cancel");
StringFinish = ResourceManager.getString("String_Finish");
StringHelp = ResourceManager.getString("String_Help");
-
+
InstallData data = InstallData.getInstance();
if ( data.isInstallationMode() ) {
- StringAppTitle = ResourceManager.getString("String_ApplicationTitle");
+ StringAppTitle = ResourceManager.getString("String_ApplicationTitle");
} else {
- StringAppTitle = ResourceManager.getString("String_ApplicationTitleUninstallation");
+ StringAppTitle = ResourceManager.getString("String_ApplicationTitleUninstallation");
}
-
+
// The setup icon has to be flexible for customization, not included into the jar file
File iconFile = data.getInfoRoot("images");
iconFile = new File(iconFile, "Setup.gif");
IconStarOffice = ResourceManager.getIconFromPath(iconFile);
-
+
mActionListener = new SetupActionListener(this);
- mDeck = new DeckOfPanels();
-
+ mDeck = new DeckOfPanels();
+
mDialog = new JDialog();
mDialog.setTitle(StringAppTitle);
initFrame();
}
-
+
public void addPanel(PanelController panel, String name) {
mCardPanel.add(panel.getPanel(), name);
panel.setSetupFrame(this);
mDeck.addPanel(panel, name);
- }
-
+ }
+
public PanelController getCurrentPanel() {
return mDeck.getCurrentPanel();
}
-
+
public void setCurrentPanel(String name, boolean ignoreRepeat, boolean isNext) {
if (name == null)
close(CODE_ERROR);
-
+
PanelController panel = mDeck.getCurrentPanel();
boolean repeatDialog = false;
if (panel != null) {
@@ -136,11 +136,11 @@ public class SetupFrame extends WindowAdapter {
repeatDialog = false;
}
}
-
+
if ( repeatDialog ) {
name = panel.getName();
}
-
+
panel = mDeck.setCurrentPanel(name);
if (panel != null)
{
@@ -158,7 +158,7 @@ public class SetupFrame extends WindowAdapter {
setButtonText(StringPrevious, BUTTON_PREVIOUS);
// setButtonEnabled((panel.getPrevious() != null), BUTTON_PREVIOUS);
// setButtonEnabled((panel.getNext() != null), BUTTON_CANCEL);
- if (panel.getNext() == null) {
+ if (panel.getNext() == null) {
setButtonText(StringFinish, BUTTON_NEXT);
} else {
setButtonText(StringNext, BUTTON_NEXT);
@@ -200,23 +200,23 @@ public class SetupFrame extends WindowAdapter {
case BUTTON_HELP: mHelpButton.setIcon(null); break;
}
}
-
+
public SetupActionListener getSetupActionListener() {
return mActionListener;
}
-
+
void close(int code) {
mDialog.dispose();
}
-
+
public JDialog getDialog() {
return mDialog;
}
-
+
public int showFrame() {
mDialog.pack();
mDialog.setLocationRelativeTo(null);
- mDialog.setModal(true);
+ mDialog.setModal(true);
mDialog.setResizable(false);
// mDialog.setMinimumSize(new Dimension(679, 459));
mDialog.setVisible(true);
@@ -224,27 +224,27 @@ public class SetupFrame extends WindowAdapter {
return 0;
}
-
+
private void initFrame() {
mDialog.getContentPane().setLayout(new BorderLayout());
-
- mCardLayout = new CardLayout();
+
+ mCardLayout = new CardLayout();
mCardPanel = new JPanel();
- mCardPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
+ mCardPanel.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
mCardPanel.setLayout(mCardLayout);
-
+
mPreviousButton = new JButton();
mNextButton = new JButton();
mCancelButton = new JButton();
- mHelpButton = new JButton();
-
+ mHelpButton = new JButton();
+
mPreviousButton.setHorizontalTextPosition(JButton.RIGHT);
mNextButton.setHorizontalTextPosition(JButton.LEFT);
-
+
mPreviousButton.setIcon(ResourceManager.getIcon("Icon_Previous"));
mNextButton.setIcon(ResourceManager.getIcon("Icon_Next"));
-
+
mPreviousButton.setActionCommand(ACTION_PREVIOUS);
mNextButton.setActionCommand(ACTION_NEXT);
mCancelButton.setActionCommand(ACTION_CANCEL);
@@ -254,7 +254,7 @@ public class SetupFrame extends WindowAdapter {
mNextButton.addActionListener(mActionListener);
mCancelButton.addActionListener(mActionListener);
mHelpButton.addActionListener(mActionListener);
-
+
InstallData data = InstallData.getInstance();
if (data.useRtl()) {
@@ -263,9 +263,9 @@ public class SetupFrame extends WindowAdapter {
mCancelButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
mHelpButton.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
}
-
+
Box ButtonBox = new Box(BoxLayout.X_AXIS);
- ButtonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
+ ButtonBox.setBorder(new EmptyBorder(new Insets(5, 10, 5, 10)));
ButtonBox.add(mPreviousButton);
ButtonBox.add(Box.createHorizontalStrut(10));
ButtonBox.add(mNextButton);
@@ -276,14 +276,14 @@ public class SetupFrame extends WindowAdapter {
if (data.useRtl()) {
ButtonBox.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
}
-
+
JPanel ButtonPanel = new JPanel();
JSeparator Separator = new JSeparator();
ButtonPanel.setLayout(new BorderLayout());
ButtonPanel.setPreferredSize(new Dimension(612, 44));
ButtonPanel.add(Separator, BorderLayout.NORTH);
ButtonPanel.add(ButtonBox, java.awt.BorderLayout.EAST);
-
+
JPanel IconPanel = new JPanel();
JLabel Icon = new JLabel();
Icon.setIcon(IconStarOffice);
@@ -291,10 +291,10 @@ public class SetupFrame extends WindowAdapter {
// IconPanel.setBorder(new EmptyBorder(new Insets(10, 10, 10, 10)));
IconPanel.setLayout(new BorderLayout());
IconPanel.add(Icon);
-
+
mDialog.getContentPane().add(ButtonPanel, java.awt.BorderLayout.SOUTH);
mDialog.getContentPane().add(mCardPanel, java.awt.BorderLayout.CENTER);
- mDialog.getContentPane().add(IconPanel, java.awt.BorderLayout.WEST);
+ mDialog.getContentPane().add(IconPanel, java.awt.BorderLayout.WEST);
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/AbortInstaller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/AbortInstaller.java
index 7df874a31fbc..88fe3e38255b 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/AbortInstaller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/AbortInstaller.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,13 +31,13 @@ import org.openoffice.setup.InstallData;
import java.util.Vector;
public class AbortInstaller {
-
+
private AbortInstaller() {
}
static public void abortInstallProcess() {
InstallData installData = InstallData.getInstance();
- installData.setIsAbortedInstallation(true);
+ installData.setIsAbortedInstallation(true);
if ( installData.isInstallationMode() ) {
String log = "<b>Installation was aborted</b><br>";
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Calculator.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Calculator.java
index 2042cc738c52..18726b4dde60 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Calculator.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Calculator.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@ import org.openoffice.setup.InstallData;
import org.openoffice.setup.ResourceManager;
public class Calculator {
-
+
private Calculator() {
}
@@ -46,7 +46,7 @@ public class Calculator {
int size = packageData.getSize();
value = value + size;
}
-
+
return value;
}
@@ -56,13 +56,13 @@ public class Calculator {
if ( required < available ) {
missingDiscSpace = false;
}
-
+
// missingDiscSpace = true; // for testing reasons
return missingDiscSpace;
}
static public boolean notEnoughDiscSpace(InstallData data) {
-
+
Vector installPackages = data.getInstallPackages();
// Calculate size of selected modules
int installationSize = calculateInstallSize(installPackages);
@@ -81,7 +81,7 @@ public class Calculator {
String title = ResourceManager.getString("String_Error");
Informer.showErrorMessage(message, title);
}
-
+
return insufficientDiscSpace;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java
index bbca464fd72a..37b56ca1eb90 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,7 +35,7 @@ import org.openoffice.setup.SetupData.SetupDataProvider;
import org.openoffice.setup.Util.LogManager;
public class Controller {
-
+
private Controller() {
}
@@ -52,12 +52,12 @@ public class Controller {
static public void checkPackageFormat(InstallData installData) {
String packageFormat = installData.getPackageFormat();
String os = installData.getOSType();
-
+
boolean notSupportedPackageFormat = true;
-
+
// Show warnings for currently not supported combinations of OS and package format.
// This has to be adapted if further OS or package formats are supported.
-
+
if (( os.equalsIgnoreCase("SunOS") ) && ( packageFormat.equalsIgnoreCase("pkg") )) {
notSupportedPackageFormat = false;
}
@@ -65,9 +65,9 @@ public class Controller {
if (( os.equalsIgnoreCase("Linux") ) && ( packageFormat.equalsIgnoreCase("rpm") )) {
notSupportedPackageFormat = false;
}
-
+
// Inform user about not supported package format and exit program
-
+
if ( notSupportedPackageFormat ) {
System.err.println("Error: Package format not supported by this OS!");
String mainmessage = ResourceManager.getString("String_Packageformat_Not_Supported");
@@ -94,16 +94,16 @@ public class Controller {
pkgCommandArray[0] = "locale";
pkgCommandArray[1] = "-a";
returnValue = ExecuteProcess.executeProcessReturnVector(pkgCommandArray, returnVector, returnErrorVector);
-
+
if ( returnValue == 0 ) {
log = pkgCommand + "<br><b>Returns: " + returnValue + " Successful command</b><br>";
- LogManager.addCommandsLogfileComment(log);
+ LogManager.addCommandsLogfileComment(log);
// System.err.println("Available languages 1: ");
// for (int i = 0; i < returnVector.size(); i++) {
// System.err.println(returnVector.get(i));
// }
-
+
// Collecting "en-US" instead of "en-US.UTF8"
Vector realVector = new Vector();
@@ -115,7 +115,7 @@ public class Controller {
}
if ( ! realVector.contains(oneLang)) {
realVector.add(oneLang);
- }
+ }
}
// System.err.println("Available languages 2: ");
@@ -124,7 +124,7 @@ public class Controller {
// }
installData.setSystemLanguages(realVector);
- } else { // an error occured
+ } else { // an error occured
log = pkgCommand + "<br><b>Returns: " + returnValue + " An error occured</b><br>";
LogManager.addCommandsLogfileComment(log);
System.err.println("Error in command: " + pkgCommand);
@@ -132,7 +132,7 @@ public class Controller {
LogManager.addCommandsLogfileComment((String)returnErrorVector.get(i));
System.err.println(returnErrorVector.get(i));
}
- }
+ }
}
static public boolean createdSubDirectory(String dir) {
@@ -156,11 +156,11 @@ public class Controller {
Informer.showErrorMessage(message, title);
errorShown = true;
}
-
+
if ( SystemManager.exists_directory(testDir.getPath()) ) {
testDir.delete();
}
-
+
return createdDirectory;
}
@@ -174,16 +174,16 @@ public class Controller {
// title = ResourceManager.getString("String_Error");
// Informer.showErrorMessage(message, title);
}
-
+
if ( ! createdDirectory ) {
String message = ResourceManager.getString("String_ChooseDirectory_No_Success") + ": " + dir;
String title = ResourceManager.getString("String_Error");
Informer.showErrorMessage(message, title);
}
-
+
return createdDirectory;
}
-
+
static public boolean reducedRootWritePrivileges() {
Vector vec = new Vector();
File dir = new File("/usr");
@@ -196,7 +196,7 @@ public class Controller {
// Check for zones. If "zonename" is successful and the name is not "global",
// this is a "sparse zone".
// Alternative: Simply always check, if root has write access in selected directories.
-
+
for (int i = 0; i < vec.size(); i++) {
File directory = (File)vec.get(i);
if ( directory.exists() ) {
@@ -210,32 +210,32 @@ public class Controller {
restrictedWritePrivilges = true;
System.err.println("Restricted Root privileges. No write access in " + directory.getPath());
break;
- }
+ }
}
}
-
+
return restrictedWritePrivilges;
}
-
+
static public void checkForNewerVersion(InstallData installData) {
LogManager.setCommandsHeaderLine("Checking change installation");
InstallChangeCtrl.checkInstallChange(installData);
-
+
if ( installData.newerVersionExists() ) {
// Inform user about a newer version installed
SetupDataProvider.setNewMacro("DIR", installData.getInstallDefaultDir()); // important for string replacement
System.err.println("Error: A newer version is already installed in " + installData.getInstallDefaultDir() + " !");
- String message1 = ResourceManager.getString("String_Newer_Version_Installed_Found")
+ String message1 = ResourceManager.getString("String_Newer_Version_Installed_Found")
+ "\n" + installData.getInstallDefaultDir() + "\n";
String message2 = ResourceManager.getString("String_Newer_Version_Installed_Remove");
String message = message1 + "\n" + message2;
String title = ResourceManager.getString("String_Error");
Informer.showErrorMessage(message, title);
- System.exit(1);
+ System.exit(1);
}
}
-
+
static public void checkForUidFile(InstallData installData) {
// check existence of getuid.so
File getuidFile = Controller.findUidFile(installData);
@@ -262,12 +262,12 @@ public class Controller {
if ( getuidpath != null ) {
getuidFile = new File(getuidpath);
-
+
if (( getuidFile.isDirectory() ) && ( ! getuidFile.isFile() )) {
// Testing, if GETUID_PATH only contains the path, not the filename
String defaultfilename = "getuid.so";
getuidFile = new File(getuidpath, defaultfilename);
-
+
if ( ! getuidFile.exists() ) {
getuidFile = null;
}
@@ -284,7 +284,7 @@ public class Controller {
} else {
getuidFile = new File(data.getGetUidPath());
}
-
+
return getuidFile;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Converter.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Converter.java
index 411351b1139d..d83499338a62 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Converter.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Converter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@ import java.util.Map;
import java.util.Vector;
public class Converter {
-
+
private Converter() {
}
@@ -44,7 +44,7 @@ public class Converter {
Iterator m = map.entrySet().iterator();
int counter = 0;
-
+
while ( m.hasNext() ) {
Map.Entry entry = (Map.Entry) m.next();
String env = entry.getKey() + "=" + entry.getValue();
@@ -54,14 +54,14 @@ public class Converter {
return myStringArray;
}
-
+
static public HashMap convertVectorToHashmap(Vector vec) {
HashMap map = new HashMap();
for (int i = 0; i < vec.size(); i++) {
String key = null;
String value = null;
-
+
String line = (String)vec.get(i);
int position = line.indexOf("=");
if ( position > -1 ) {
@@ -69,12 +69,12 @@ public class Converter {
value = line.substring(position + 1, line.length());
} else {
key = line;
- value = null;
+ value = null;
}
-
+
map.put(key, value);
}
-
+
return map;
}
@@ -82,7 +82,7 @@ public class Converter {
Vector vec = new Vector();
Iterator m = hash.entrySet().iterator();
-
+
while ( m.hasNext() ) {
Map.Entry entry = (Map.Entry) m.next();
String line = entry.getKey() + "=" + entry.getValue();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/DialogFocusTraversalPolicy.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/DialogFocusTraversalPolicy.java
index ae9950841968..8ab47a819a13 100644
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/DialogFocusTraversalPolicy.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/DialogFocusTraversalPolicy.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,30 +31,30 @@ import java.awt.FocusTraversalPolicy;
import javax.swing.JComponent;
public class DialogFocusTraversalPolicy extends FocusTraversalPolicy {
-
+
private JComponent order[];
private java.util.List list;
-
+
public DialogFocusTraversalPolicy(JComponent _order[]) {
order = _order;
list = java.util.Arrays.asList(order);
}
- public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot) {
+ public java.awt.Component getFirstComponent(java.awt.Container focusCycleRoot) {
return order[0];
- }
+ }
- public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot) {
+ public java.awt.Component getLastComponent(java.awt.Container focusCycleRoot) {
return order[order.length - 1];
}
public java.awt.Component getComponentAfter(java.awt.Container focusCycleRoot, java.awt.Component aComponent) {
- int index = 0,x = -1;
- index = list.indexOf(aComponent);
+ int index = 0,x = -1;
+ index = list.indexOf(aComponent);
index++; // increasing automatically
- if(!order[index % order.length].isEnabled() ||
+ if(!order[index % order.length].isEnabled() ||
!order[index % order.length].isVisible()) {
- x = index;
+ x = index;
index = -1;
for (; x != order.length; x++) {
if(order[x].isEnabled() && order[x].isVisible()) {
@@ -62,9 +62,9 @@ public class DialogFocusTraversalPolicy extends FocusTraversalPolicy {
break;
}
}
- if(index == -1) {
- x = list.indexOf(aComponent);
- for(int y = 0; y <= x; y++) {
+ if(index == -1) {
+ x = list.indexOf(aComponent);
+ for(int y = 0; y <= x; y++) {
if(order[y].isEnabled() && order[x].isVisible()) {
index = y;
break;
@@ -72,26 +72,26 @@ public class DialogFocusTraversalPolicy extends FocusTraversalPolicy {
}
}
}
- return order[ index % order.length];
+ return order[ index % order.length];
}
public java.awt.Component getComponentBefore(java.awt.Container focusCycleRoot, java.awt.Component aComponent) {
- int index = list.indexOf(aComponent), x = -1;
+ int index = list.indexOf(aComponent), x = -1;
index--;
if(!order[(index + order.length) % order.length].isEnabled() ||
!order[(index + order.length) % order.length].isVisible()) {
- x = index;
- index = -1;
- for(; x >= 0; x--) {
- if(order[x].isEnabled() && order[x].isVisible()) {
+ x = index;
+ index = -1;
+ for(; x >= 0; x--) {
+ if(order[x].isEnabled() && order[x].isVisible()) {
index = x;
break;
}
}
- // if nothing has changed
+ // if nothing has changed
if(index == -1) {
x = list.indexOf(aComponent);
- for(int y = order.length -1; y >= x; y--) {
+ for(int y = order.length -1; y >= x; y--) {
if(order[y].isEnabled() && order[x].isVisible()) {
index = y;
break;
@@ -99,14 +99,14 @@ public class DialogFocusTraversalPolicy extends FocusTraversalPolicy {
}
}
}
- return order[ (index + order.length) % order.length];
+ return order[ (index + order.length) % order.length];
}
- public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot) {
+ public java.awt.Component getDefaultComponent(java.awt.Container focusCycleRoot) {
return order[0];
}
- public java.awt.Component getInitialComponent(java.awt.Window window) {
+ public java.awt.Component getInitialComponent(java.awt.Window window) {
return order[0];
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java
index 3024b0f1a676..38027dd5826c 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Dumper.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -37,12 +37,12 @@ import java.util.Vector;
public class Dumper {
-
+
private Dumper() {
}
static public void dumpPackageSettings(PackageDescription packageData) {
-
+
if ( packageData.isLeaf() ) {
System.out.println("Name: " + packageData.getName() +
" State: " + packageData.getSelectionState() +
@@ -51,29 +51,29 @@ public class Dumper {
System.out.println("Nod-Name: " + packageData.getName() +
" State: " + packageData.getSelectionState());
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
dumpPackageSettings(child);
- }
+ }
}
static public void dumpModuleStates(PackageDescription packageData) {
- System.err.println("Name: " + packageData.getName() +
+ System.err.println("Name: " + packageData.getName() +
" State: " + packageData.getSelectionState() +
" " + packageData.getPackageName());
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
dumpModuleStates(child);
- }
+ }
}
-
+
static private String getStateString(int state) {
String stateString = null;
-
+
if ( state == 0 ) {
stateString = "DONT_INSTALL";
} else if ( state == 1 ) {
@@ -100,76 +100,76 @@ public class Dumper {
static private void logModuleStatesHelper(PackageDescription packageData) {
int state = packageData.getSelectionState();
String stateStr = getStateString(state);
-
- LogManager.addModulesLogfileComment("Name: " + packageData.getName() +
+
+ LogManager.addModulesLogfileComment("Name: " + packageData.getName() +
" State: " + stateStr +
" " + packageData.getPackageName());
- // System.err.println("Name: " + packageData.getName() +
+ // System.err.println("Name: " + packageData.getName() +
// " State: " + stateStr +
// " " + packageData.getPackageName());
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
logModuleStatesHelper(child);
- }
+ }
}
static public void logModuleStates(PackageDescription packageData, String text) {
LogManager.setModulesLogFileHeaderLine(text);
logModuleStatesHelper(packageData);
}
-
+
static public void logPackagesToInstall(Vector packages, String text) {
PackageDescription packageData = null;
LogManager.setModulesLogFileHeaderLine(text);
for (int i = 0; i < packages.size(); i++) {
packageData = (PackageDescription)packages.get(i);
- LogManager.addModulesLogfileComment("Name: " + packageData.getName() +
+ LogManager.addModulesLogfileComment("Name: " + packageData.getName() +
" " + packageData.getPackageName());
- }
+ }
}
static public void dumpInstallPackages(PackageDescription packageData) {
-
+
if (( packageData.isLeaf() ) && ( packageData.getSelectionState() == packageData.INSTALL )) {
System.out.println("Now installing: " + packageData.getPackageName());
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
dumpInstallPackages(child);
}
}
-
+
static public void dumpUninstallPackages(PackageDescription packageData) {
-
+
if (( packageData.isLeaf() ) && ( packageData.getSelectionState() == packageData.REMOVE )) {
System.out.println("Now uninstalling: " + packageData.getPackageName());
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
dumpUninstallPackages(child);
}
}
-
+
static public void dumpAllRpmInfo(PackageDescription packageData) {
if (( packageData.getPackageName() != null ) && ( ! packageData.getPackageName().equals(""))) {
if ( packageData.pkgExists() ) {
System.err.println("RPM data: " + packageData.getPkgRealName() + " : " +
packageData.getPkgVersion() + " : " +
- packageData.getPkgRelease() + " : " +
- packageData.getPackageName() );
+ packageData.getPkgRelease() + " : " +
+ packageData.getPackageName() );
}
}
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
dumpAllRpmInfo(child);
- }
-
+ }
+
}
static public void dumpNewInstallData() {
@@ -181,7 +181,7 @@ public class Dumper {
System.err.println("AdminFileNoRelocNoDepends: " + data.getAdminFileNameNoRelocNoDepends());
System.err.println("DatabasePath: " + data.getDatabasePath());
System.err.println("InstallDir: " + data.getInstallDir());
- System.err.println("Original privileges: " + data.getStoredInstallationPrivileges());
+ System.err.println("Original privileges: " + data.getStoredInstallationPrivileges());
System.err.println("getuid.so File: " + data.getGetUidPath());
}
@@ -191,12 +191,12 @@ public class Dumper {
int size = properties.size();
Iterator m = properties.entrySet().iterator();
int counter = 0;
-
+
while ( m.hasNext() ) {
Map.Entry entry = (Map.Entry) m.next();
String env = entry.getKey() + "=" + entry.getValue();
System.err.println(env);
- }
+ }
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ExecuteProcess.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ExecuteProcess.java
index c86d4204fcc1..4bf3e6164c60 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ExecuteProcess.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ExecuteProcess.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@ import java.io.InputStreamReader;
import java.util.Vector;
public class ExecuteProcess {
-
+
private ExecuteProcess() {
}
@@ -57,10 +57,10 @@ public class ExecuteProcess {
static public int executeProcessReturnVector(String[] command, Vector returnVector, Vector returnErrorVector) {
// usage of String arrays because of blanks in pathes
int returnValue = -3;
-
+
try {
Process p = Runtime.getRuntime().exec(command);
-
+
BufferedReader in = new BufferedReader(new InputStreamReader(p.getInputStream()));
BufferedReader errorIn = new BufferedReader(new InputStreamReader(p.getErrorStream()));
for ( String s; ( s = in.readLine()) != null; ) {
@@ -78,14 +78,14 @@ public class ExecuteProcess {
} catch ( IOException ioe ) {
System.err.println("IOError: " + ioe );
}
-
+
return returnValue;
- }
+ }
static public int executeProcessReturnVectorEnv(String[] command, String[] envP, Vector returnVector, Vector returnErrorVector) {
// usage of String arrays because of blanks in pathes
int returnValue = -3;
-
+
try {
Process p = Runtime.getRuntime().exec(command, envP);
@@ -98,16 +98,16 @@ public class ExecuteProcess {
for ( String t; ( t = errorIn.readLine()) != null; ) {
returnErrorVector.add(t);
}
-
+
p.waitFor();
returnValue = p.exitValue();
-
+
} catch ( InterruptedException ioe ) {
System.err.println("Interrupted Exception Error: " + ioe );
} catch ( IOException ioe ) {
System.err.println("IOError: " + ioe );
}
-
+
return returnValue;
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/FileExtensionFilter.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/FileExtensionFilter.java
index 35a7c0b6dcbc..b8b94f7fe3c0 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/FileExtensionFilter.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/FileExtensionFilter.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -31,7 +31,7 @@ import java.io.File;
import java.io.FilenameFilter;
public class FileExtensionFilter implements FilenameFilter {
-
+
private String fileExtension;
public FileExtensionFilter(String extension) {
@@ -40,7 +40,7 @@ public class FileExtensionFilter implements FilenameFilter {
fileExtension = "." + fileExtension;
}
}
-
+
public boolean accept(File dir, String name) {
if (name.endsWith(fileExtension)) {
File candidate = new File(dir, name);
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoCtrl.java
index d5e9023a821e..f24984e6600f 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -34,7 +34,7 @@ import java.util.Enumeration;
import java.util.Vector;
public class InfoCtrl {
-
+
private InfoCtrl() {
}
@@ -45,7 +45,7 @@ public class InfoCtrl {
else if ( position.equals("end")) {
htmlInfoText = htmlInfoText + "</FONT></BODY></HTML>";
}
-
+
return htmlInfoText;
}
@@ -58,12 +58,12 @@ public class InfoCtrl {
htmlInfoText = htmlInfoText + oneline + "<br>";
return htmlInfoText;
- }
-
+ }
+
static public String setReadyToInstallInfoText(PackageDescription packageData, String htmlInfoText) {
// setHtmlInfoText(packageData, 0);
InstallData data = InstallData.getInstance();
- if ( data.isInstallationMode() ) {
+ if ( data.isInstallationMode() ) {
htmlInfoText = setReadyToInstallInfoText(packageData, "", htmlInfoText);
} else {
htmlInfoText = setReadyToUninstallInfoText(packageData, "", htmlInfoText);
@@ -101,10 +101,10 @@ public class InfoCtrl {
htmlInfoText = setReadyToInstallInfoText(child, indent, htmlInfoText);
}
}
-
+
return htmlInfoText;
}
-
+
// private void setReadyToUninstallInfoText(PackageDescription packageData, Integer indent, String htmlInfoText) {
static private String setReadyToUninstallInfoText(PackageDescription packageData, String indent, String htmlInfoText) {
// String spacer = "<spacer type=horizontal size=" + indent.toString() + ">";
@@ -153,7 +153,7 @@ public class InfoCtrl {
}
htmlInfoText = htmlInfoText + separatorline + "<br>";
-
+
htmlInfoText = LogManager.publishLogfileContent(htmlInfoText, separatorline);
htmlInfoText = LogManager.publishCommandsLogfileContent(htmlInfoText);
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java
index 97b3073c3c32..1c27e6c97206 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InfoDir.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,7 +33,7 @@ import java.io.File;
import java.util.Vector;
public class InfoDir {
-
+
private InfoDir() {
}
@@ -41,12 +41,12 @@ public class InfoDir {
InstallData data = InstallData.getInstance();
File jarFile = data.getJarFilePath();
String destFile = null;
-
+
if ( jarFile != null ) {
String sourceDir = jarFile.getParent();
File sourceFileFile = new File(sourceDir, fileName);
String sourceFile = sourceFileFile.getPath();
-
+
// String jarFileName = jarFile.getName();
File destDir = new File(data.getInstallDefaultDir(), data.getProductDir());
File destFileFile = new File(destDir, fileName);
@@ -54,7 +54,7 @@ public class InfoDir {
boolean success = SystemManager.copy(sourceFile, destFile);
}
-
+
return destFile;
}
@@ -76,14 +76,14 @@ public class InfoDir {
destDir.mkdir();
SystemManager.copyAllFiles(sourceDir, destDir, fileExtension);
SystemManager.setUnixPrivilegesDirectory(destDir, fileExtension, unixRights);
- }
+ }
}
static private void copyInstallDirectoryDoubleSubdir(File destBaseDir, String dir1, String dir2) {
InstallData data = InstallData.getInstance();
File sourceDir1 = data.getInfoRoot(dir1);
File sourceDir = new File(sourceDir1, dir2);
-
+
destBaseDir.mkdir();
File destDir1 = new File(destBaseDir, dir1);
destDir1.mkdir();
@@ -92,7 +92,7 @@ public class InfoDir {
SystemManager.copyAllFiles(sourceDir, destDir);
}
-
+
static private File createUninstallDir() {
InstallData data = InstallData.getInstance();
File baseDir = new File(data.getInstallDefaultDir(), data.getProductDir());
@@ -100,7 +100,7 @@ public class InfoDir {
baseDir.mkdir();
return baseDir;
}
-
+
static private void copyGetUidSoFile(File dir) {
InstallData data = InstallData.getInstance();
String uidFileSource = data.getGetUidPath();
@@ -111,9 +111,9 @@ public class InfoDir {
String uidFileDest = destFile.getPath();
boolean success = SystemManager.copy(uidFileSource, uidFileDest);
data.setGetUidPath(uidFileDest);
- }
+ }
}
-
+
static private void copyJreFile(File dir) {
InstallData data = InstallData.getInstance();
String jrefilename = System.getProperty("JRE_FILE");
@@ -122,9 +122,9 @@ public class InfoDir {
// For Solaris, JRE_FILE can already contain the complete path.
// Otherwise it contains only the filename
File jreFile = new File(jrefilename);
-
+
if ( ! jreFile.exists()) {
- jreFile = new File(data.getPackagePath(), jrefilename);
+ jreFile = new File(data.getPackagePath(), jrefilename);
}
if ( jreFile.exists() ) {
@@ -133,16 +133,16 @@ public class InfoDir {
destDir.mkdir();
String onlyFileName = jreFile.getName();
File destFile = new File(destDir, onlyFileName);
-
+
// In maintenance mode the file already exists
if ( ! destFile.exists() ) {
String jreFileDest = destFile.getPath();
- boolean success = SystemManager.copy(jreFileSource, jreFileDest);
+ boolean success = SystemManager.copy(jreFileSource, jreFileDest);
}
}
- }
+ }
}
-
+
static private void moveAdminFiles(File dir) {
InstallData data = InstallData.getInstance();
@@ -163,7 +163,7 @@ public class InfoDir {
data.setAdminFileNameRelocNoDepends(destFile.getPath());
sourceFile.delete();
}
-
+
if ( data.getAdminFileNameNoReloc() != null ) {
File sourceFile = new File(data.getAdminFileNameNoReloc());
String fileName = sourceFile.getName();
@@ -182,31 +182,31 @@ public class InfoDir {
sourceFile.delete();
}
}
-
+
static private void createInfoFile(File dir) {
Vector fileContent = new Vector();
String line = null;
InstallData data = InstallData.getInstance();
-
+
line = "PackagePath=" + data.getPackagePath();
fileContent.add(line);
line = "InstallationPrivileges=" + data.getInstallationPrivileges();
fileContent.add(line);
- line = "AdminFileReloc=" + data.getAdminFileNameReloc();
+ line = "AdminFileReloc=" + data.getAdminFileNameReloc();
fileContent.add(line);
- line = "AdminFileRelocNoDepends=" + data.getAdminFileNameRelocNoDepends();
+ line = "AdminFileRelocNoDepends=" + data.getAdminFileNameRelocNoDepends();
fileContent.add(line);
- line = "AdminFileNoReloc=" + data.getAdminFileNameNoReloc();
+ line = "AdminFileNoReloc=" + data.getAdminFileNameNoReloc();
fileContent.add(line);
- line = "AdminFileNoRelocNoDepends=" + data.getAdminFileNameNoRelocNoDepends();
+ line = "AdminFileNoRelocNoDepends=" + data.getAdminFileNameNoRelocNoDepends();
fileContent.add(line);
- line = "InstallationDir=" + data.getInstallDir();
+ line = "InstallationDir=" + data.getInstallDir();
fileContent.add(line);
line = "DatabasePath=" + data.getDatabasePath();
fileContent.add(line);
line = "GetUidFile=" + data.getGetUidPath();
fileContent.add(line);
-
+
String infoFileName = "infoFile";
File infoFile = new File(dir, infoFileName);
SystemManager.saveCharFileVector(infoFile.getPath(), fileContent);
@@ -216,7 +216,7 @@ public class InfoDir {
InstallData data = InstallData.getInstance();
File jarFile = data.getJarFilePath();
SystemManager.deleteFile(jarFile);
-
+
String jarFilePath = jarFile.getParent();
File setupFile = new File(jarFilePath, "setup");
SystemManager.deleteFile(setupFile);
@@ -238,7 +238,7 @@ public class InfoDir {
}
if ( ! data.getGetUidPath().equals("null") ) {
- SystemManager.deleteFile(new File(data.getGetUidPath()));
+ SystemManager.deleteFile(new File(data.getGetUidPath()));
}
}
@@ -262,7 +262,7 @@ public class InfoDir {
}
}
}
-
+
static private void removeInforoot() {
InstallData data = InstallData.getInstance();
SystemManager.removeDirectory(data.getInfoRoot());
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Informer.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Informer.java
index 7a3046a1dda0..918d459626d3 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Informer.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Informer.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -30,7 +30,7 @@ package org.openoffice.setup.Util;
import javax.swing.JOptionPane;
public class Informer {
-
+
private Informer() {
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java
index 55d2c0a8d0cb..c00f6a6e1d7d 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/InstallChangeCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -38,7 +38,7 @@ import java.util.Enumeration;
public class InstallChangeCtrl {
-
+
private InstallChangeCtrl() {
}
@@ -52,7 +52,7 @@ public class InstallChangeCtrl {
}
}
}
-
+
static private void setChangeInstallDir(InstallData installData, Installer installer) {
// setting the new install dir after analyzing the installation directory
// of the installed update package.
@@ -68,7 +68,7 @@ public class InstallChangeCtrl {
// static public void checkInstallChange(InstallData data, ChooseDirectory panel) {
static public void checkInstallChange(InstallData data) {
- Installer installer = InstallerFactory.getInstance();
+ Installer installer = InstallerFactory.getInstance();
PackageDescription packageData = SetupDataProvider.getPackageDescription();
if ( data.getUpdatePackage() == null ) {
@@ -80,7 +80,7 @@ public class InstallChangeCtrl {
// resetting values, if database was changed during user installation
data.setOlderVersionExists(false);
data.setNewerVersionExists(false);
- data.setSameVersionExists(false);
+ data.setSameVersionExists(false);
boolean packageIsInstalled = installer.isPackageInstalled(data.getUpdatePackage(), data);
if ( packageIsInstalled ) {
@@ -101,12 +101,12 @@ public class InstallChangeCtrl {
{
data.setMajorUpgrade(true);
System.err.println("Major Upgrade");
- }
+ }
} else if ( installer.isInstallSetPackageOlder(data.getUpdatePackage(), data) ) {
data.setNewerVersionExists(true);
System.err.println("A newer product is installed");
} else {
- data.setSameVersionExists(true);
+ data.setSameVersionExists(true);
System.err.println("Same product is installed");
}
@@ -122,7 +122,7 @@ public class InstallChangeCtrl {
// directory (ChooseDirectoryCtrl.java).
if ( data.isRootInstallation() && data.dontUpdate() && data.olderVersionExists() ) {
System.err.println("Error: An older version is already installed in directory " + data.getInstallDir() + "!");
- String message1 = ResourceManager.getString("String_Older_Version_Installed_Found")
+ String message1 = ResourceManager.getString("String_Older_Version_Installed_Found")
+ "\n" + data.getInstallDir() + "\n";
String message2 = ResourceManager.getString("String_Older_Version_Installed_Remove");
String message = message1 + "\n" + message2;
@@ -131,7 +131,7 @@ public class InstallChangeCtrl {
System.exit(1);
}
}
- }
+ }
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/LogManager.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/LogManager.java
index 3be95469b532..fcafd5aaaf9f 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/LogManager.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/LogManager.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -35,14 +35,14 @@ public class LogManager {
static private Vector commandsLogFile; /* collects all system commands information during installation */
static private Vector saveLogFile; /* contains the content of the saved log file */
static private Vector modulesLogFile;
-
+
private LogManager() {
}
static public Vector getSaveLogfile() {
return saveLogFile;
}
-
+
static public void addLogfileComment(String text) {
logfile.add(text);
}
@@ -54,7 +54,7 @@ public class LogManager {
static public void addModulesLogfileComment(String text) {
modulesLogFile.add(text);
}
-
+
static public void setCommandsHeaderLine(String text) {
String line = "*************************************";
commandsLogFile.add("");
@@ -70,16 +70,16 @@ public class LogManager {
modulesLogFile.add(text);
modulesLogFile.add(line);
}
-
+
static public String publishLogfileContent(String text, String separatorline) {
for (int i = 0; i < logfile.size(); i++) {
text = text + logfile.get(i) + "<br>";
- }
+ }
if ( ! logfile.isEmpty() ) {
- text = text + separatorline + "<br>";
+ text = text + separatorline + "<br>";
}
-
+
return text;
}
@@ -90,11 +90,11 @@ public class LogManager {
return text;
}
-
+
static public Vector getModulesLogFile() {
return modulesLogFile;
}
-
+
static {
logfile = new Vector();
commandsLogFile = new Vector();
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
index 8d43fb4d01f1..e869254f4bda 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -40,10 +40,10 @@ import org.openoffice.setup.SetupData.SetupDataProvider;
import org.openoffice.setup.Util.Informer;
public class ModuleCtrl {
-
+
private ModuleCtrl() {
}
-
+
static public void setModuleSize(PackageDescription packageData) {
// Setting the package size for visible node modules, that have hidden children
// -> Java module has three hidden children and 0 byte size
@@ -51,7 +51,7 @@ public class ModuleCtrl {
if (( ! packageData.isLeaf() ) && ( ! packageData.isHidden() )) {
boolean setNewSize = false;
int size = packageData.getSize();
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
// if (( child.isHidden() ) && ( child.getSelectionState() == PackageDescription.DONT_KNOW )) {
@@ -60,7 +60,7 @@ public class ModuleCtrl {
size = size + child.getSize();
}
}
-
+
if ( setNewSize ) {
packageData.setSize(size);
}
@@ -72,14 +72,14 @@ public class ModuleCtrl {
}
}
-
+
static public void setDefaultModuleSettings(PackageDescription data) {
// Setting default module settings for modules, that are not hidden
// Hidden modules do not get a defined state now
boolean isInstalled = false;
InstallData installdata = InstallData.getInstance();
boolean isUninstall = installdata.isUninstallationMode();
-
+
if (isUninstall) {
isInstalled = true;
}
@@ -97,24 +97,24 @@ public class ModuleCtrl {
System.err.println("NEVER");
} else if (data.isDefault()) {
data.setSelectionState(PackageDescription.INSTALL);
- } else if ( ! data.isDefault()) {
+ } else if ( ! data.isDefault()) {
data.setSelectionState(PackageDescription.DONT_INSTALL);
} else {
data.setSelectionState(PackageDescription.DONT_INSTALL);
}
}
}
-
+
static public void setParentDefaultModuleSettings(PackageDescription packageData) {
// Setting the module states of parent modules.
// Called after ChooseDirectoryCtrl.java, because
- // the database has to be known. In user installation it is important,
+ // the database has to be known. In user installation it is important,
// that the installation directory is known, to find the database.
// Called during uninstallation in UninstallationPrologueCtrl.java
// Iteration before setting the module states. Because of this, all children
// get their final setting before the parent.
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setParentDefaultModuleSettings(child);
@@ -130,12 +130,12 @@ public class ModuleCtrl {
// System.err.println(" STATE before iterating over children: " + state);
- for (Enumeration e = packageData.children(); e.hasMoreElements();) {
+ for (Enumeration e = packageData.children(); e.hasMoreElements();) {
PackageDescription child = (PackageDescription) e.nextElement();
int childState = child.getSelectionState();
// System.err.println(" Child: " + child.getName() + " : " + childState);
-
+
if ( childState != PackageDescription.IGNORE) {
allChildrenIgnored = false;
}
@@ -147,9 +147,9 @@ public class ModuleCtrl {
if ( ! child.isHidden() ) {
allChildrenHidden = false;
}
-
+
if ((state == PackageDescription.DONT_KNOW) || (state == PackageDescription.IGNORE)) {
- state = childState;
+ state = childState;
// } else if ((state != childState) && (childState != PackageDescription.IGNORE)) {
} else if ((state != childState) && (childState != PackageDescription.IGNORE) && (childState != PackageDescription.DONT_KNOW)) {
if ( installdata.isUninstallationMode() ) {
@@ -158,14 +158,14 @@ public class ModuleCtrl {
state = PackageDescription.INSTALL_SOME;
}
}
-
+
// System.err.println(" NEW state after child: " + state);
}
if ( allChildrenIgnored ) {
state = PackageDescription.IGNORE;
}
-
+
if ( installdata.isInstallationMode() ) {
if (( state == PackageDescription.INSTALL_SOME ) && ( ! atLeastOneInstalled )) {
state = PackageDescription.DONT_INSTALL;
@@ -177,7 +177,7 @@ public class ModuleCtrl {
// System.err.println("Setting allChildrenHidden for module " + packageData.getName() );
}
- // If older version exist, only modules without packages shall be updated,
+ // If older version exist, only modules without packages shall be updated,
// because all packages are already determined by querying the database.
if ( installdata.olderVersionExists() ) {
if ( packageData.getPackageName().equals("") ) {
@@ -201,14 +201,14 @@ public class ModuleCtrl {
// System.err.println("Setting 1 INSTALL flag to: " + packageData.getName());
}
}
-
+
// INSTALL_SOME is not valid for leaves
if (( packageData.getSelectionState() == packageData.INSTALL_SOME ) && ( packageData.isLeaf() )) {
packageData.setSelectionState(packageData.INSTALL);
// System.err.println("Setting 2 INSTALL flag to: " + packageData.getName());
}
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setHiddenModuleSettingsInstall(child);
@@ -216,19 +216,19 @@ public class ModuleCtrl {
}
static public void setHiddenModuleSettingsUninstall(PackageDescription packageData) {
- InstallData data = InstallData.getInstance();
+ InstallData data = InstallData.getInstance();
// update selection states for hidden modules during uninstallation
if (( packageData.isHidden() ) && ( packageData.getSelectionState() != packageData.IGNORE )) {
// System.err.println("Package name: " + packageData.getName());
// System.err.println("Selection: " + packageData.getSelectionState());
-
+
PackageDescription parent = (PackageDescription)packageData.getParent();
if ( parent != null ) {
packageData.setSelectionState(parent.getSelectionState());
// Hidden modules at root module have to be uninstalled at complete uninstallation
// In Uninstallation the complete is the typical installation type
if (( parent.getName() == "" ) && ( data.isTypicalInstallation() )) {
- packageData.setSelectionState(packageData.REMOVE);
+ packageData.setSelectionState(packageData.REMOVE);
}
// Hidden modules at root module must not be uninstalled at custom uninstallation
// But if all visible modules are selected for uninstallation, this shall be handled
@@ -240,7 +240,7 @@ public class ModuleCtrl {
}
}
}
-
+
// REMOVE_SOME is not valid for leaves
// if ( data.isTypicalInstallation() ) {
if (( packageData.getSelectionState() == packageData.REMOVE_SOME ) && ( packageData.isLeaf() )) {
@@ -249,7 +249,7 @@ public class ModuleCtrl {
// }
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setHiddenModuleSettingsUninstall(child);
@@ -258,7 +258,7 @@ public class ModuleCtrl {
static private boolean checkRequiredCoreModule(PackageDescription packageData) {
- // This function uses a similar mechanism to determine
+ // This function uses a similar mechanism to determine
// core modules as function "setHiddenModuleSettingsInstall"
// -> only hidden parents, until there is a module without name (getName)
// Only searching until grandpa.
@@ -280,26 +280,26 @@ public class ModuleCtrl {
if ( grandpa != null ) {
if (( grandpa.getName().equals("") ) || ( grandpa.getName() == null )) {
requiredCoreModule = true;
- }
+ }
}
}
}
}
}
-
+
return requiredCoreModule;
}
-
+
static public void setDatabaseSettings(PackageDescription packageData, InstallData installData, Installer installer) {
// Analyzing the system database and setting the module states.
// Called during installation in ChooseInstallationTypeCtrl.java, because
- // the database has to be known. In user installation it is important,
+ // the database has to be known. In user installation it is important,
// the the installation directory is known, to find the database.
// Called during uninstallation in UninstallationPrologueCtrl.java
boolean isUninstall = installData.isUninstallationMode();
boolean isInstalled = installer.isPackageInstalled(packageData, installData);
-
+
if (isUninstall) {
if (isInstalled) {
packageData.setSelectionState(PackageDescription.REMOVE);
@@ -319,16 +319,16 @@ public class ModuleCtrl {
packageData.setSelectionState(PackageDescription.IGNORE);
}
} else {
- boolean goodDepends = true;
+ boolean goodDepends = true;
if ( installData.getOSType().equalsIgnoreCase("SunOS") ) {
if (( installData.isRootInstallation() ) && ( packageData.getCheckSolaris() != null ) && ( ! packageData.getCheckSolaris().equals("") )) {
// the package has to be installed. Creating a new package with only packagename
if ( ! installer.isPackageNameInstalled(packageData.getCheckSolaris(), installData) ) {
- goodDepends = false;
+ goodDepends = false;
}
}
}
-
+
if ( ! goodDepends ) {
// The package dependencies are not valid -> ignoring package.
packageData.setSelectionState(PackageDescription.IGNORE);
@@ -344,14 +344,14 @@ public class ModuleCtrl {
packageData.setSelectionState(PackageDescription.IGNORE);
} else {
// This is also something like migrating feature states
- packageData.setSelectionState(PackageDescription.INSTALL);
+ packageData.setSelectionState(PackageDescription.INSTALL);
}
} else { // no version check done -> so what is a good setting for already installed packages?
if ( installData.olderVersionExists() ) { // should never be the case in this function
- packageData.setSelectionState(PackageDescription.INSTALL);
+ packageData.setSelectionState(PackageDescription.INSTALL);
} else {
- packageData.setSelectionState(PackageDescription.IGNORE);
- }
+ packageData.setSelectionState(PackageDescription.IGNORE);
+ }
}
}
else {
@@ -383,22 +383,22 @@ public class ModuleCtrl {
}
}
}
- }
- }
+ }
+ }
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setDatabaseSettings(child, installData, installer);
- }
+ }
}
static public void setShowInUserInstallFlags(PackageDescription packageData) {
// This function is not needed during deinstallation, because a
- // module that could not be selected during installation, is always
+ // module that could not be selected during installation, is always
// not installed during deinstallation and therefore gets "IGNORE"
// in function setDatabaseSettings
-
+
if ( ! packageData.showInUserInstall() ) {
packageData.setSelectionState(PackageDescription.IGNORE);
// too late to hide the module
@@ -427,10 +427,10 @@ public class ModuleCtrl {
static public void setShowInUserInstallOnlyFlags(PackageDescription packageData) {
// This function is not needed during deinstallation, because a
- // module that could not be selected during installation, is always
+ // module that could not be selected during installation, is always
// not installed during deinstallation and therefore gets "IGNORE"
// in function setDatabaseSettings
-
+
if ( packageData.showInUserInstallOnly() ) {
packageData.setSelectionState(PackageDescription.IGNORE);
// too late to hide the module
@@ -460,17 +460,17 @@ public class ModuleCtrl {
// This function is needed during installation for the language modules,
// if there is only one language in the installation set. In this case the language
- // modules are hidden (no selection possible) and therefore get no value in
- // setDefaultModuleSettings(). This default value is set now.
+ // modules are hidden (no selection possible) and therefore get no value in
+ // setDefaultModuleSettings(). This default value is set now.
if ( packageData.showMultiLingualOnly() ) {
packageData.setSelectionState(PackageDescription.INSTALL);
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setHiddenLanguageModuleDefaultSettings(child);
- }
+ }
}
static private boolean packageExists(PackageDescription packageData, InstallData installData) {
@@ -493,11 +493,11 @@ public class ModuleCtrl {
}
static public void disableNonExistingPackages(PackageDescription packageData, InstallData installData) {
- if ((( packageData.getPackageName() == null ) || ( packageData.getPackageName().equals("") ))
+ if ((( packageData.getPackageName() == null ) || ( packageData.getPackageName().equals("") ))
&& packageData.isLeaf() ) {
- packageData.setSelectionState(PackageDescription.IGNORE);
+ packageData.setSelectionState(PackageDescription.IGNORE);
} else if ( ! packageExists(packageData, installData) ) {
- packageData.setSelectionState(PackageDescription.IGNORE);
+ packageData.setSelectionState(PackageDescription.IGNORE);
}
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
@@ -525,11 +525,11 @@ public class ModuleCtrl {
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setDontUninstallUserInstallOnylFlags(child);
- }
+ }
}
- static public void checkVisibleModulesInstall(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
+ static public void checkVisibleModulesInstall(PackageDescription packageData, InstallData data) {
+ boolean setToTrue = false;
if (( ! packageData.isHidden() ) && ( packageData.getSelectionState() == packageData.INSTALL )) {
setToTrue = true;
@@ -541,11 +541,11 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkVisibleModulesInstall(child, data);
}
- }
+ }
}
static public void checkApplicationSelection(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
+ boolean setToTrue = false;
if (( packageData.isApplicationPackage() ) &&
( ! packageData.isHidden() ) &&
@@ -559,11 +559,11 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkApplicationSelection(child, data);
}
- }
+ }
}
static public void checkLanguageSelection(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
+ boolean setToTrue = false;
if (( packageData.showMultiLingualOnly() ) &&
( ! packageData.isHidden() ) &&
@@ -577,12 +577,12 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkLanguageSelection(child, data);
}
- }
+ }
}
- static public void checkVisibleModulesUninstall(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
-
+ static public void checkVisibleModulesUninstall(PackageDescription packageData, InstallData data) {
+ boolean setToTrue = false;
+
if (( ! packageData.isHidden() ) && ( packageData.getSelectionState() == packageData.REMOVE )) {
// ignoring the top level module, that has the state REMOVE (but no name)
if (( packageData.getName() != null ) && ( ! packageData.getName().equals("") )) {
@@ -596,11 +596,11 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkVisibleModulesUninstall(child, data);
}
- }
+ }
}
- static public void checkApplicationModulesUninstall(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
+ static public void checkApplicationModulesUninstall(PackageDescription packageData, InstallData data) {
+ boolean setToTrue = false;
// At least one language module should not be uninstalled. Then this function returns true.
// An exeption is the complete uninstallation or the masked complete uninstallation.
@@ -618,11 +618,11 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkApplicationModulesUninstall(child, data);
}
- }
+ }
}
- static public void checkLanguageModulesUninstall(PackageDescription packageData, InstallData data) {
- boolean setToTrue = false;
+ static public void checkLanguageModulesUninstall(PackageDescription packageData, InstallData data) {
+ boolean setToTrue = false;
// At least one language module should not be uninstalled. Then this function returns true.
// An exeption is the complete uninstallation or the masked complete uninstallation.
@@ -640,16 +640,16 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkLanguageModulesUninstall(child, data);
}
- }
+ }
}
-
+
static public void checkMaskedCompleteUninstallation(PackageDescription packageData, InstallData data) {
- boolean setToFalse = false;
+ boolean setToFalse = false;
// If there is at least one visible module, that is not selected for removal
// this is no masked complete uninstallation
-
- if (( ! packageData.isHidden() )
+
+ if (( ! packageData.isHidden() )
&& ( packageData.getSelectionState() != packageData.REMOVE )
&& ( packageData.getSelectionState() != packageData.IGNORE )) {
// ignoring the top level module, that has no name
@@ -660,7 +660,7 @@ public class ModuleCtrl {
// System.err.println("Caused by: " + packageData.getName() + " with " + packageData.getSelectionState());
}
}
-
+
if ( ! setToFalse ) {
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
@@ -668,7 +668,7 @@ public class ModuleCtrl {
}
}
}
-
+
static public void saveTypicalSelectionStates(PackageDescription packageData) {
packageData.setTypicalSelectionState(packageData.getSelectionState());
@@ -704,14 +704,14 @@ public class ModuleCtrl {
restoreTypicalSelectionStates(child);
}
}
-
+
static public void restoreCustomSelectionStates(PackageDescription packageData) {
packageData.setSelectionState(packageData.getCustomSelectionState());
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
restoreCustomSelectionStates(child);
- }
+ }
}
static public void restoreStartSelectionStates(PackageDescription packageData) {
@@ -720,14 +720,14 @@ public class ModuleCtrl {
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
restoreStartSelectionStates(child);
- }
+ }
}
-
- static public void setUpdateOlderProductSettings(PackageDescription packageData, InstallData data, Installer installer) {
+
+ static public void setUpdateOlderProductSettings(PackageDescription packageData, InstallData data, Installer installer) {
if (( packageData.getPackageName() != null ) && ( ! packageData.getPackageName().equals(""))) {
if ( installer.isPackageInstalled(packageData, data) ) {
packageData.setSelectionState(PackageDescription.INSTALL);
-
+
// Special handling for jre package, because this is not necessarily older, if an older product is updated.
if ( packageData.isJavaPackage() ) {
if ( ! installer.isInstalledPackageOlder(packageData, data) ) {
@@ -777,16 +777,16 @@ public class ModuleCtrl {
Vector oldPackages = data.getOldPackages();
oldPackages.add(localPackage);
data.setOldPackages(oldPackages);
- }
+ }
}
}
}
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
setUpdateOlderProductSettings(child, data, installer);
- }
+ }
}
static public void checkLanguagesPackages(PackageDescription packageData, InstallData installData) {
@@ -820,7 +820,7 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
checkLanguagesPackages(child, installData);
}
- }
+ }
static public void setLanguagesPackages(PackageDescription packageData) {
if (( packageData.getPkgLanguage() != null ) && ( ! packageData.getPkgLanguage().equals(""))) {
@@ -832,8 +832,8 @@ public class ModuleCtrl {
PackageDescription child = (PackageDescription) e.nextElement();
setLanguagesPackages(child);
}
- }
-
+ }
+
static public void setRequiredNewCoreModules(PackageDescription packageData, InstallData installData) {
// Special handling for core modules, which are required, but not installed.
boolean isRequiredCoreModule = checkRequiredCoreModule(packageData);
@@ -867,11 +867,11 @@ public class ModuleCtrl {
setRequiredNewCoreModules(child, installData);
}
}
-
+
static public void defaultDatabaseAnalysis(InstallData data) {
PackageDescription packageData = SetupDataProvider.getPackageDescription();
- Installer installer = InstallerFactory.getInstance();
+ Installer installer = InstallerFactory.getInstance();
// restore default settings
if ( data.startSelectionStateSaved() ) {
@@ -924,17 +924,17 @@ public class ModuleCtrl {
// disable packages, that are not valid in user installation
if ( data.isUserInstallation() ) {
ModuleCtrl.setShowInUserInstallFlags(packageData);
-
+
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setShowInUserInstallFlags");
- }
+ }
}
else { // disable packages, that are not valid in root installation
ModuleCtrl.setShowInUserInstallOnlyFlags(packageData);
-
+
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setShowInUserInstallOnlyFlags");
- }
+ }
}
// Setting parent module settings. Only required for displaying correct module settings before starting installation.
@@ -943,7 +943,7 @@ public class ModuleCtrl {
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setParentDefaultModuleSettings");
}
-
+
// Collecting packages to install
// This has to be done here, because "ChooseInstallationType" and "ChooseComponents"
// are not called.
@@ -971,7 +971,7 @@ public class ModuleCtrl {
// ModuleCtrl.analyzeDatabase();
ModuleCtrl.disableNonExistingPackages(packageData, data);
-
+
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After disableNonExistingPackages");
}
@@ -979,16 +979,16 @@ public class ModuleCtrl {
// disable packages, that are not valid in user installation
if ( data.isUserInstallation() ) {
ModuleCtrl.setShowInUserInstallFlags(packageData);
-
+
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setShowInUserInstallFlags");
- }
+ }
} else { // disable packages, that are not valid in root installation
ModuleCtrl.setShowInUserInstallOnlyFlags(packageData);
-
+
if ( data.logModuleStates() ) {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setShowInUserInstallOnlyFlags");
- }
+ }
}
// Problem: If all submodules have flag IGNORE, the parent can also get IGNORE
@@ -999,6 +999,6 @@ public class ModuleCtrl {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setParentDefaultModuleSettings");
}
}
- }
+ }
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java
index 4e1c4d5866e2..0f915d65a504 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/PackageCollector.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -33,55 +33,55 @@ import java.util.Enumeration;
import java.util.Vector;
public class PackageCollector {
-
+
private PackageCollector() {
}
static public void collectInstallPackages(PackageDescription packageData, Vector allPackages) {
-
+
if (( packageData.isLeaf() ) && ( packageData.getSelectionState() == packageData.INSTALL )) {
allPackages.add(packageData);
// System.err.println("Adding to collector 1: " + packageData.getPackageName());
}
-
- // also allowing packages at nodes!
+
+ // also allowing packages at nodes!
if (( ! packageData.isLeaf() ) &&
( packageData.getPackageName() != null ) &&
( ! packageData.getPackageName().equals("")) &&
(( packageData.getSelectionState() == packageData.INSTALL ) ||
( packageData.getSelectionState() == packageData.INSTALL_SOME ))) {
- allPackages.add(packageData);
+ allPackages.add(packageData);
// System.err.println("Adding to collector 2: " + packageData.getPackageName());
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
collectInstallPackages(child, allPackages);
}
-
+
}
static public void collectUninstallPackages(PackageDescription packageData, Vector allPackages) {
if (( packageData.isLeaf() ) && ( packageData.getSelectionState() == packageData.REMOVE )) {
allPackages.add(0, packageData);
}
-
- // also allowing packages at nodes!
+
+ // also allowing packages at nodes!
if (( ! packageData.isLeaf() ) &&
( packageData.getPackageName() != null ) &&
( ! packageData.getPackageName().equals("")) &&
( packageData.getSelectionState() == packageData.REMOVE )) {
allPackages.add(0, packageData);
}
-
+
for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
PackageDescription child = (PackageDescription) e.nextElement();
collectUninstallPackages(child, allPackages);
- }
+ }
}
// Special handling for packages, that change their name, and therefore need to be uninstalled
-
+
// static public void findOldPackages( InstallData installData ) {
//
// String basis = "ooobasis3";
@@ -118,12 +118,12 @@ public class PackageCollector {
// localName = localName.replace(search, replace);
// localPackage.setName(localName);
// }
-
+
// oldPackages.add(localPackage);
// }
// }
// }
-
+
// // reverse order for uninstallation
// int number = oldPackages.size();
// for (int i = 0; i < number; i++) {
@@ -131,7 +131,7 @@ public class PackageCollector {
// PackageDescription oldPackageData = (PackageDescription) oldPackages.remove(i);
// oldPackages.add(0,oldPackageData);
// }
- // }
+ // }
// installData.setOldPackages(oldPackages);
// }
@@ -140,7 +140,7 @@ public class PackageCollector {
for (int i = 0; i < allPackages.size(); i++) {
boolean integrated = false;
PackageDescription packageData = (PackageDescription) allPackages.get(i);
-
+
if ( i == 0 ) {
sortedPackages.add(packageData);
integrated = true;
@@ -149,21 +149,21 @@ public class PackageCollector {
for (int j = 0; j < sortedPackages.size(); j++) {
PackageDescription sortedPackageData = (PackageDescription) sortedPackages.get(j);
int compare = sortedPackageData.getOrder();
-
+
if ( position < compare ) {
sortedPackages.add(j, packageData);
integrated = true;
break;
}
}
-
+
// no break used -> adding at the end
if ( ! integrated ) {
sortedPackages.add(packageData);
}
}
}
-
+
// reverse order for uninstallation
if ( mode.equalsIgnoreCase("uninstall")) {
int number = sortedPackages.size();
@@ -173,7 +173,7 @@ public class PackageCollector {
sortedPackages.add(0,sortPackageData);
}
}
- }
+ }
}
}
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Parser.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Parser.java
index 6c22222fa27d..f7cd60660679 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Parser.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Parser.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -28,14 +28,14 @@
package org.openoffice.setup.Util;
public class Parser {
-
+
private Parser() {
}
static public boolean parseBoolean(String input) {
boolean value;
if ( input.equalsIgnoreCase("true")) {
- value = true;
+ value = true;
} else if ( input.equalsIgnoreCase("false")) {
value = false;
} else {
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/SystemManager.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/SystemManager.java
index f0a3619054bb..65e184f79603 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/SystemManager.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/SystemManager.java
@@ -1,7 +1,7 @@
/*************************************************************************
*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
+ *
* Copyright 2000, 2010 Oracle and/or its affiliates.
*
* OpenOffice.org - a multi-platform office productivity suite
@@ -44,13 +44,13 @@ import java.util.Properties;
import java.util.Vector;
public class SystemManager {
-
+
private SystemManager() {
}
-
+
/* the installation root is where the classes reside */
static public File getJarFilePath() {
-
+
File jarFile = null;
try {
@@ -74,7 +74,7 @@ public class SystemManager {
if ( jarFile != null ) {
System.err.println("Jar file: " + jarFile.getPath());
} else {
- System.err.println("No jar file used for installation!");
+ System.err.println("No jar file used for installation!");
}
return jarFile;
@@ -82,7 +82,7 @@ public class SystemManager {
/* the installation root is where the classes reside */
static public File getResourceRoot() {
-
+
File dir = null;
try {
@@ -112,14 +112,14 @@ public class SystemManager {
if ( dir != null ) {
// System.err.println("Resource Root: " + dir.getPath());
} else {
- System.err.println("No resource root found!");
+ System.err.println("No resource root found!");
}
-
+
return dir;
}
-
+
static public String getPackagePath(String subdir) {
-
+
String path = null;
File dir = getResourceRoot();
@@ -132,7 +132,7 @@ public class SystemManager {
path = dir.getPath();
}
}
-
+
if ( path != null ) {
if ( ! path.endsWith("/")) {
path = path + "/";
@@ -142,9 +142,9 @@ public class SystemManager {
if ( path != null ) {
System.err.println("Path to packages: " + path);
} else {
- System.err.println("No path to packages found!");
+ System.err.println("No path to packages found!");
}
-
+
return path;
}
@@ -154,7 +154,7 @@ public class SystemManager {
found = file.exists();
return found;
}
-
+
static public boolean exists_directory(String directory) {
File dir = new File(directory);
return dir.exists();
@@ -168,12 +168,12 @@ public class SystemManager {
}
catch (SecurityException ex) {
throw ex;
- }
-
+ }
+
return created;
}
- static public String getParentDirectory(String dir) {
+ static public String getParentDirectory(String dir) {
File installFile = new File(dir);
String parentDir = installFile.getParent();
if ( parentDir == null ) {
@@ -183,11 +183,11 @@ public class SystemManager {
}
static public String getInstallationPrivileges() {
-
+
String type = "";
String user = java.lang.System.getProperty("user.name");
// System.out.println("UserHome: " + java.lang.System.getProperty("user.home"));
-
+
if ( user.equalsIgnoreCase("root")) {
type = "root";
System.err.println("Root privileges");
@@ -195,15 +195,15 @@ public class SystemManager {
type = "user";
System.err.println("User privileges");
}
-
+
return type;
}
static public boolean isUserInstallation() {
-
+
boolean isUserInstallation = false;
String user = java.lang.System.getProperty("user.name");
-
+
if ( user.equalsIgnoreCase("root")) {
isUserInstallation = false;
System.err.println("Root privileges");
@@ -211,21 +211,21 @@ public class SystemManager {
isUserInstallation = true;
System.err.println("User privileges");
}
-
+
return isUserInstallation;
}
static public boolean isRootInstallation() {
-
+
boolean isRootInstallation = false;
String user = java.lang.System.getProperty("user.name");
-
+
if ( user.equalsIgnoreCase("root")) {
isRootInstallation = true;
} else {
isRootInstallation = false;
}
-
+
return isRootInstallation;
}
@@ -234,7 +234,7 @@ public class SystemManager {
System.err.println("OS: " + osVersion);
return osVersion;
}
-
+
static public String getOSArchitecture() {
String osArchitecture = java.lang.System.getProperty("os.arch");
System.out.println("OSArchitecture: " + osArchitecture);
@@ -256,7 +256,7 @@ public class SystemManager {
HashMap myMap = new HashMap(props);
return myMap;
}
-
+
static public void dumpStringArray(String[] myStringArray) {
for (int i = 0; i < myStringArray.length; i++) {
System.out.println(myStringArray[i]);
@@ -267,7 +267,7 @@ public class SystemManager {
Vector fileContent = readCharFileVector(baseFileName);
saveCharFileVector(dumpFileName, fileContent);
}
-
+
static public Vector readCharFileVector(String fileName) {
Vector fileContent = new Vector();
@@ -290,8 +290,8 @@ public class SystemManager {
return fileContent;
}
-
-
+
+
static public void saveCharFileVector(String fileName, Vector fileContent) {
FileWriter fw = null;
try
@@ -311,7 +311,7 @@ public class SystemManager {
try {
if ( fw != null ) fw.close();
} catch (IOException e) {}
- }
+ }
}
static public void copyAllFiles(File source, File dest) {
@@ -322,7 +322,7 @@ public class SystemManager {
}
}
}
-
+
static public void copyAllFiles(File source, File dest, String ext) {
File[] file = source.listFiles(new FileExtensionFilter(ext));
if (file != null) {
@@ -334,7 +334,7 @@ public class SystemManager {
// second parameter can be a complete file name or an existing directory
static public boolean copy(String source, String dest) {
-
+
// is the second parameter a file name or a directory?
File dir = new File(dest);
if ( dir.isDirectory() ) {
@@ -343,7 +343,7 @@ public class SystemManager {
File destFile = new File(dest, fileName);
dest = destFile.getPath();
}
-
+
boolean file_copied = false;
FileInputStream fis;
BufferedInputStream bis;
@@ -369,7 +369,7 @@ public class SystemManager {
} catch (IOException e) {
System.out.println("Dateien wurden nicht kopiert!");
}
-
+
return file_copied;
}
@@ -377,7 +377,7 @@ public class SystemManager {
boolean success = false;
if ( file.exists() && file != null ) {
success = file.delete();
- }
+ }
return success;
}
@@ -388,8 +388,8 @@ public class SystemManager {
}
catch (SecurityException ex) {
throw ex;
- }
-
+ }
+
return created;
}
@@ -397,7 +397,7 @@ public class SystemManager {
if ( dir.exists() && dir.isDirectory() ) {
File[] file = dir.listFiles();
if (file != null) {
- for (int i = 0; i < file.length; i++) {
+ for (int i = 0; i < file.length; i++) {
deleteFile(file[i]);
}
}
@@ -413,8 +413,8 @@ public class SystemManager {
if ( logStatesEnv != null ) {
logStates = true;
- }
-
+ }
+
return logStates;
}
@@ -435,7 +435,7 @@ public class SystemManager {
}
}
}
-
+
static public int calculateDiscSpace(String directory) {
String command = "df -k " + directory;
String[] commandArray = new String[3];
@@ -455,18 +455,18 @@ public class SystemManager {
// The fourth value is the available disc space (if the first value is a path)
// Otherwise it can also be the third value, if the first is not a path.
// If the first value is not a path, the string starts with white spaces.
-
+
int position = 3;
if ( returnLine.startsWith(" ")) {
position = 2;
}
-
+
returnLine = returnLine.trim();
String[] returnArray = returnLine.split("\\s+");
if ( returnArray.length > 3 ) {
String sizeString = returnArray[position];
-
+
// Special handling for very large hard discs that cannot be converted to int
if ( sizeString.length() >= Integer.toString(Integer.MAX_VALUE).length() ) {
sizeString = Integer.toString(Integer.MAX_VALUE);
@@ -480,5 +480,5 @@ public class SystemManager {
return size;
}
-
+
}