[ooo-build-commit] ooeclipse: Branch 'master' - 2 commits
Cédric Bosdonnat
cbosdo at kemper.freedesktop.org
Tue Nov 30 14:39:29 PST 2010
core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java | 1
core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java | 6 -
core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java | 39 ----------
3 files changed, 4 insertions(+), 42 deletions(-)
New commits:
commit e4b13b0bc6619a0596cbde854c4ac36e10361e4d
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Tue Nov 30 23:38:48 2010 +0100
[core] export SAL_ALLOW_LINKOO_SYMLINKS=1 in case of linked install
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
index 09f1254..9480f68 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/AbstractOOo.java
@@ -379,6 +379,7 @@ public abstract class AbstractOOo implements IOOo, ITableElement {
String command = "soffice.bin";
env = SystemHelper.addEnv(env, "PATH", sPathValue.toString(), pathSeparator);
+ env = SystemHelper.addEnv(env, "SAL_ALLOW_LINKOO_SYMLINKS", "1", null );
env = addUserProfile(pUserInstallation, env);
env = pExtraOptionsProvider.addEnv(env);
diff --git a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
index 89b12b3..bde505f 100644
--- a/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
+++ b/core/source/org/openoffice/ide/eclipse/core/launch/office/OfficeLaunchDelegate.java
@@ -105,9 +105,6 @@ public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
List<IResource> resources = PackageConfigTab.getResources( pConfiguration );
File destFile = exportComponent( prj, resources );
pMonitor.worked(1);
-
- // Try to source ooenv if it exists
- sourceOOEnv(prj);
// Deploy the component
deployComponent(prj, userInstallation, destFile);
@@ -138,41 +135,7 @@ public class OfficeLaunchDelegate extends LaunchConfigurationDelegate {
}
/**
- * Tries to source ooenv if it exists and if we are on alinux OS.
- *
- * @param pPrj the target project.
- * @throws IOException if we were unable to start the command
- */
- private void sourceOOEnv(IUnoidlProject pPrj) throws IOException {
- if (Platform.getOS().equals(Platform.OS_LINUX)) {
- IOOo oo = pPrj.getOOo();
- String home = oo.getHome();
- File homeFolder = new File(home);
- File programFolder = new File(homeFolder, "program");
- File oooenvFile = new File(programFolder, "ooenv");
-
- if (oooenvFile.isFile()) {
- String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
- String shellCommand = "source ooenv"; //$NON-NLS-1$
- String[] env = SystemHelper.getSystemEnvironement();
- env = SystemHelper.addEnv(env, "PATH",
- programFolder.getAbsolutePath(), pathsep); //$NON-NLS-1$
-
- PluginLogger.info("Sourcing: " + shellCommand);
- PluginLogger.info("Sourcing.env: " + Arrays.toString(env));
-
- Process process = SystemHelper.runTool(shellCommand, env, null);
- try {
- process.waitFor();
- } catch (InterruptedException e) {
- PluginLogger.error("Interrupted while waiting for the source command to complete.", e);
- }
- }
- }
- }
-
- /**
- * Deploys the .oxt component in an OpenOffice installation.
+ * Deploys the .oxt component in a LibreOffice installation.
*
* @param pPrj
* target project
commit 8438f9f678fd49c0f5264dc23fb5f7eccb88ffe0
Author: Cédric Bosdonnat <cedricbosdo at openoffice.org>
Date: Tue Nov 30 23:38:08 2010 +0100
[core] Fix deploying an extension with spaces in the path on Linux
diff --git a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
index ffa39d7..b217e05 100644
--- a/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
+++ b/core/source/org/openoffice/ide/eclipse/core/internal/model/OOo.java
@@ -47,6 +47,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.InputStreamReader;
import java.io.LineNumberReader;
+import java.text.MessageFormat;
import java.util.Properties;
import org.eclipse.core.runtime.IPath;
@@ -413,10 +414,7 @@ public class OOo extends AbstractOOo {
*/
private void addPackage(File pPackageFile, IPath pUserInstallation) throws Exception {
String path = pPackageFile.getAbsolutePath();
- if (getPlatform().equals(Platform.OS_WIN32)) {
- path = "\"" + path + "\""; //$NON-NLS-1$ //$NON-NLS-2$
- }
- String shellCommand = "unopkg gui -f " + path; //$NON-NLS-1$
+ String shellCommand = MessageFormat.format( "unopkg gui -f \"{0}\"", path ); //$NON-NLS-1$
String[] env = SystemHelper.getSystemEnvironement();
String pathsep = System.getProperty("path.separator"); //$NON-NLS-1$
More information about the ooo-build-commit
mailing list