summaryrefslogtreecommitdiff
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
commit13e0e55c82c7951aa5393d30b41d261911636ded (patch)
tree7637129577d1b543a3165c876635f65b539bd0d8
parent918f3689d44b2206378905e1a4ea4256d5315f50 (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
-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 b55bebb11..3d6f0e631 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);