Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2015-02-16 22:19:15 +0000
committerPascal Rapicault2015-02-16 22:19:15 +0000
commit2c73306fc02a649f2bea26ecb5f351ca3e14999a (patch)
tree63e3ec9deab989ee4fc85078a200d6da64f338ce /bundles/org.eclipse.equinox.frameworkadmin.equinox
parent0fdb03cf79ad3493245ba7f37b6fda5775dbd836 (diff)
downloadrt.equinox.p2-2c73306fc02a649f2bea26ecb5f351ca3e14999a.tar.gz
rt.equinox.p2-2c73306fc02a649f2bea26ecb5f351ca3e14999a.tar.xz
rt.equinox.p2-2c73306fc02a649f2bea26ecb5f351ca3e14999a.zip
Revert "WIP mac"I20150217-0800
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.java15
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java5
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/ParserUtils.java12
-rw-r--r--bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java8
4 files changed, 18 insertions, 22 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 89f486dd4..1154b6bbb 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
@@ -27,8 +27,7 @@ import org.osgi.service.log.LogService;
public class EclipseLauncherParser {
public static final String MAC_OS_APP_FOLDER = ".app/Contents/MacOS"; //$NON-NLS-1$
private static final String CONFIGURATION_FOLDER = "configuration"; //$NON-NLS-1$
-
- // public static final String MACOSX_BUNDLED = "macosx-bundled"; //$NON-NLS-1$
+ public static final String MACOSX_BUNDLED = "macosx-bundled"; //$NON-NLS-1$
//this figures out the location of the data area on partial data read from the <eclipse>.ini
private URI getOSGiInstallArea(List<String> lines, URI base, LauncherData launcherData) {
@@ -49,12 +48,12 @@ public class EclipseLauncherParser {
return;
}
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();
- // if (!launcherData.getOS().endsWith(MACOSX_BUNDLED))
- // launcherFolder = launcherFolder.getParentFile();
- // }
+ if (launcherString.endsWith(MAC_OS_APP_FOLDER)) {
+ //We can do 3 calls to getParentFile without checking because
+ launcherFolder = launcherFolder.getParentFile().getParentFile();
+ if (!launcherData.getOS().endsWith(MACOSX_BUNDLED))
+ launcherFolder = launcherFolder.getParentFile();
+ }
if (!ParserUtils.fromOSGiJarToOSGiInstallArea(launcherData.getFwJar().getAbsolutePath()).equals(launcherFolder)) {
ParserUtils.setValueForArgument(EquinoxConstants.OPTION_INSTALL, launcherFolder.getAbsolutePath().replace('\\', '/'), lines);
}
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
index baf343caf..f516d4da7 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/EquinoxManipulatorImpl.java
@@ -93,10 +93,7 @@ public class EquinoxManipulatorImpl implements Manipulator {
int dotLocation = launcherName.lastIndexOf('.');
if (dotLocation != -1)
launcherName = launcherName.substring(0, dotLocation);
- File launcherFolder = launcher.getParentFile();
- if (org.eclipse.osgi.service.environment.Constants.OS_MACOSX.equals(launcherData.getOS()))
- launcherFolder = new File(launcherData.getFwConfigLocation(), "../");
- File result = new File(launcherFolder, launcherName + EquinoxConstants.INI_EXTENSION);
+ File result = new File(launcher.getParentFile(), launcherName + EquinoxConstants.INI_EXTENSION);
return result;
}
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 0279d4ac5..4080ffcb6 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
@@ -48,19 +48,19 @@ public class ParserUtils {
File launcherFile = launcherData.getLauncher();
if (launcherFile != null) {
- if (Constants.OS_MACOSX.equals(launcherData.getOS())) { //
+ if (Constants.OS_MACOSX.equals(launcherData.getOS())) {
//the equinox launcher will look 3 levels up on the mac when going from executable to launcher.jar
//see org.eclipse.equinox.executable/library/eclipse.c : findStartupJar();
IPath launcherPath = new Path(launcherFile.getAbsolutePath());
- if (launcherPath.segmentCount() > 1) {
+ if (launcherPath.segmentCount() > 4) {
//removing "Eclipse.app/Contents/MacOS/eclipse"
- launcherPath = launcherPath.removeLastSegments(1).append("Eclipse"); //$NON-NLS-1$
+ launcherPath = launcherPath.removeLastSegments(4);
return launcherPath.toFile();
}
}
- // if (EclipseLauncherParser.MACOSX_BUNDLED.equals(launcherData.getOS())) {
- // Log.log(LogService.LOG_WARNING, "Problem figuring out the osgi install area. The bundled mode of macosx requires a -startup argument to be specified."); //$NON-NLS-1$
- // }
+ if (EclipseLauncherParser.MACOSX_BUNDLED.equals(launcherData.getOS())) {
+ Log.log(LogService.LOG_WARNING, "Problem figuring out the osgi install area. The bundled mode of macosx requires a -startup argument to be specified."); //$NON-NLS-1$
+ }
return launcherFile.getParentFile();
}
return null;
diff --git a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
index 481714f1e..7eed2d207 100644
--- a/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
+++ b/bundles/org.eclipse.equinox.frameworkadmin.equinox/src/org/eclipse/equinox/internal/frameworkadmin/equinox/utils/FileUtils.java
@@ -15,12 +15,12 @@ import java.io.*;
import java.net.*;
import java.util.*;
import org.eclipse.core.runtime.*;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.EquinoxConstants;
-import org.eclipse.equinox.internal.frameworkadmin.equinox.ParserUtils;
+import org.eclipse.equinox.internal.frameworkadmin.equinox.*;
import org.eclipse.equinox.internal.provisional.frameworkadmin.LauncherData;
import org.eclipse.equinox.internal.provisional.frameworkadmin.Manipulator;
import org.eclipse.osgi.service.environment.Constants;
import org.osgi.framework.Version;
+import org.osgi.service.log.LogService;
public class FileUtils {
private static String FILE_SCHEME = "file"; //$NON-NLS-1$
@@ -80,8 +80,8 @@ public class FileUtils {
launcherPath = launcherPath.removeLastSegments(4);
launcherDir = launcherPath.toFile();
}
- //} //else if (EclipseLauncherParser.MACOSX_BUNDLED.equals(launcherData.getOS())) {
- // Log.log(LogService.LOG_WARNING, "Problem figuring out the osgi install area. The bundled mode of macosx requires a -startup argument to be specified."); //$NON-NLS-1$
+ } else if (EclipseLauncherParser.MACOSX_BUNDLED.equals(launcherData.getOS())) {
+ Log.log(LogService.LOG_WARNING, "Problem figuring out the osgi install area. The bundled mode of macosx requires a -startup argument to be specified."); //$NON-NLS-1$
} else
launcherDir = launcherData.getLauncher().getParentFile();
pluginsDir = new File(launcherDir, EquinoxConstants.PLUGINS_DIR);

Back to the top