From ab368797daa09aa96304e4a50224dbaec66dcc45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Timm?= Date: Wed, 27 Aug 2008 10:47:50 +0000 Subject: [PATCH] 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 --- .../org/openoffice/setup/Util/ModuleCtrl.java | 43 ++++++++++++++++++- 1 file changed, 42 insertions(+), 1 deletion(-) 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("Adding required package: " + packageData.getPackageName() + "
"); + } + // 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 = "Error: Missing required package " + packageFile.getPath() + "
"; + 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);