summaryrefslogtreecommitdiff
path: root/javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java
diff options
context:
space:
mode:
authorBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:03 +0200
committerBjoern Michaelsen <bjoern.michaelsen@canonical.com>2011-08-23 15:06:03 +0200
commitd8b6cc3b44ddcf9647653dc8ee88f3d9024feebf (patch)
tree3d395e7313279565a46774ac2921b987e24b9fc5 /javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java
parentb52ec9a4fa9b8eb93a181fac3613f1de7d1d0825 (diff)
recreated tag libreoffice-3.3.0.4 which had these commits:
commit 04144eede67d986878496224a1bfec8b5666f1fe (tag: refs/tags/libreoffice-3.3.0.4, refs/remotes/origin/libreoffice-3-3-0) Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 18 19:01:16 2011 +0100 Version 3.3.0.4, tag libreoffice-3.3.0.4 (3.3-rc4) commit c2d496a993f9643bc8a737c505f070246fcf6fad Author: Kohei Yoshida <kyoshida@novell.com> Date: Fri Jan 14 11:53:12 2011 -0500 Remove pesky on-line registration menu entry. (fdo#33112) .../uiconfig/sbibliography/menubar/menubar.xml | 1 - 1 files changed, 0 insertions(+), 1 deletions(-) commit da172d85638baf1bcc1dd2bdc985f1a50d308bc3 Author: Petr Mladek <pmladek@suse.cz> Date: Tue Jan 11 22:59:36 2011 +0100 Branch libreoffice-3-3-0 This is 'libreoffice-3-3-0' - the stable branch for the 3.3.0 release. Only very safe changes, reviewed by three people are allowed. If you want to commit more complicated fix for the next 3.3.x release, please use the 'libreoffice-3-3' branch. If you want to build something cool, unstable, and risky, use master.
Notes
Notes: split repo tag: components_libreoffice-3.3.0.4
Diffstat (limited to 'javainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java')
-rwxr-xr-xjavainstaller2/src/JavaSetup/org/openoffice/setup/Util/Controller.java58
1 files changed, 29 insertions, 29 deletions
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;
}