summaryrefslogtreecommitdiff
path: root/javainstaller2/src
diff options
context:
space:
mode:
authorRĂ¼diger Timm <rt@openoffice.org>2008-08-27 10:47:50 +0000
committerRĂ¼diger Timm <rt@openoffice.org>2008-08-27 10:47:50 +0000
commitab368797daa09aa96304e4a50224dbaec66dcc45 (patch)
treefc6d2047062a0c68288dd95667ddaceadde3b87c /javainstaller2/src
parent218841ef353e384665ca19dabfd8b254787b61c9 (diff)
INTEGRATION: CWS native188_DEV300 (1.8.18.1.8); FILE MERGED
2008/08/22 15:12:33 is 1.8.18.1.8.1: #i92954# update with Java GUI Installer
Diffstat (limited to 'javainstaller2/src')
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java43
1 files changed, 42 insertions, 1 deletions
diff --git a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
index 6348d40dd928..d91f8b4e9aae 100755
--- a/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
+++ b/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/ModuleCtrl.java
@@ -7,7 +7,7 @@
* OpenOffice.org - a multi-platform office productivity suite
*
* $RCSfile: ModuleCtrl.java,v $
- * $Revision: 1.10 $
+ * $Revision: 1.11 $
*
* This file is part of OpenOffice.org.
*
@@ -765,6 +765,40 @@ public class ModuleCtrl {
}
}
+ static public void setRequiredNewCoreModules(PackageDescription packageData, InstallData installData) {
+ // Special handling for core modules, which are required, but not installed.
+ boolean isRequiredCoreModule = checkRequiredCoreModule(packageData);
+ if ( isRequiredCoreModule ) {
+ if ( packageData.getSelectionState() != PackageDescription.INSTALL ) {
+ packageData.setSelectionState(PackageDescription.INSTALL);
+ LogManager.addLogfileComment("<b>Adding required package:</b> " + packageData.getPackageName() + "</br>");
+ }
+ // This package has to exist!
+ if ( ! packageExists(packageData, installData) ) {
+
+ String packagePath = installData.getPackagePath();
+ if (( packageData.getPkgSubdir() != null ) && ( ! packageData.getPkgSubdir().equals("") )) {
+ File completePackageFile = new File(packagePath, packageData.getPkgSubdir());
+ packagePath = completePackageFile.getPath();
+ }
+ String packageName = packageData.getPackageName();
+ File packageFile = new File(packagePath, packageName);
+
+ String log = "<b>Error: Missing required package " + packageFile.getPath() + "</b><br>";
+ System.err.println(log);
+ String message = ResourceManager.getString("String_File_Not_Found") + ": " + packageFile.getPath();
+ String title = ResourceManager.getString("String_Error");
+ Informer.showErrorMessage(message, title);
+ System.exit(1);
+ }
+ }
+
+ for (Enumeration e = packageData.children(); e.hasMoreElements(); ) {
+ PackageDescription child = (PackageDescription) e.nextElement();
+ setRequiredNewCoreModules(child, installData);
+ }
+ }
+
static public void defaultDatabaseAnalysis(InstallData data) {
PackageDescription packageData = SetupDataProvider.getPackageDescription();
@@ -797,6 +831,13 @@ public class ModuleCtrl {
Dumper.logModuleStates(packageData, "ChooseDirectory: After setUpdateOlderProductSettings");
}
+ // Setting required root module packages (that are new in the update product).
+ ModuleCtrl.setRequiredNewCoreModules(packageData, data);
+
+ if ( data.logModuleStates() ) {
+ Dumper.logModuleStates(packageData, "ChooseDirectory: After setRequiredNewCoreModules");
+ }
+
// Checking, if all packages are available
ModuleCtrl.disableNonExistingPackages(packageData, data);