Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2008-12-08 18:03:47 +0000
committerPascal Rapicault2008-12-08 18:03:47 +0000
commitd2b1de9a0a318cc7dbf9cd961b8a84b59488716b (patch)
tree15962973798e95caac965656e8fdb39f591c746c /bundles/org.eclipse.equinox.frameworkadmin.equinox
parent137a0f158360f945bcc59befe2efb395c88d64e8 (diff)
downloadrt.equinox.p2-d2b1de9a0a318cc7dbf9cd961b8a84b59488716b.tar.gz
rt.equinox.p2-d2b1de9a0a318cc7dbf9cd961b8a84b59488716b.tar.xz
rt.equinox.p2-d2b1de9a0a318cc7dbf9cd961b8a84b59488716b.zip
Bug 257948 - [fwkAdmin] -install not set properly for Mac buildsv20081208-1313
Diffstat (limited to 'bundles/org.eclipse.equinox.frameworkadmin.equinox')
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java10
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java2
2 files changed, 9 insertions, 3 deletions
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
index 021af389f..2d12eeb92 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EclipseLauncherParser.java
@@ -23,6 +23,7 @@ import org.eclipse.osgi.util.NLS;
import org.osgi.service.log.LogService;
public class EclipseLauncherParser {
+ private static final String MAC_OS_APP_FOLDER = ".app/Contents/MacOS"; //$NON-NLS-1$
private static final String CONFIGURATION_FOLDER = "configuration"; //$NON-NLS-1$
//this figures out the location of the data area on partial data read from the <eclipse>.ini
@@ -38,7 +39,12 @@ public class EclipseLauncherParser {
ParserUtils.removeArgument(EquinoxConstants.OPTION_INSTALL, lines);
return;
}
- if (!launcherData.getFwJar().getParentFile().equals(launcherFolder)) {
+ String launcherString = launcherFolder.getAbsolutePath().replace('\\', '/');
+ if (launcherString.endsWith(MAC_OS_APP_FOLDER)) {
+ //We can do 3 calls to getParentFile without checking because
+ launcherFolder = launcherFolder.getParentFile().getParentFile().getParentFile();
+ }
+ if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getParentFile().getAbsolutePath()).equals(launcherFolder)) {
ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath(), lines);
}
}
@@ -51,7 +57,7 @@ public class EclipseLauncherParser {
URI launcherFolder = launcherData.getLauncher().getParentFile().toURI();
getStartup(lines, launcherFolder);
- // getFrameworkJar(lines, launcherFolder, launcherData);
+ // getFrameworkJar(lines, launcherFolder, laubncherData);
URI osgiInstallArea = getOSGiInstallArea(lines, launcherFolder);
if (osgiInstallArea == null) {
osgiInstallArea = launcherData.getFwJar() != null ? launcherData.getFwJar().getParentFile().toURI() : launcherFolder;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
index 93efb3a0d..93adb059a 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java
@@ -93,7 +93,7 @@ public class ParserUtils {
return null;
}
- private static File fromOSGiJarToOSGiInstallArea(String path) {
+ public static File fromOSGiJarToOSGiInstallArea(String path) {
IPath parentFolder = new Path(path).removeLastSegments(1);
if (parentFolder.lastSegment().equalsIgnoreCase("plugins")) //$NON-NLS-1$
return parentFolder.removeLastSegments(1).toFile();

Back to the top