From e4b13b0bc6619a0596cbde854c4ac36e10361e4d Mon Sep 17 00:00:00 2001 From: Cédric Bosdonnat Date: Tue, 30 Nov 2010 23:38:48 +0100 Subject: [core] export SAL_ALLOW_LINKOO_SYMLINKS=1 in case of linked install --- .../eclipse/core/internal/model/AbstractOOo.java | 1 + .../core/launch/office/OfficeLaunchDelegate.java | 39 +--------------------- 2 files changed, 2 insertions(+), 38 deletions(-) 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 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 -- cgit v1.2.3