diff options
author | Tobias Oberlies | 2012-03-02 16:24:35 +0000 |
---|---|---|
committer | Tobias Oberlies | 2012-03-02 16:24:35 +0000 |
commit | 91384a5355b53e448aa8e09b48800f10e6e49f36 (patch) | |
tree | b2adf9788c9ee0e2d809c701b1c679f44de15f2d | |
parent | 67105df97422275a005e73abbd9f825615a11fc9 (diff) | |
download | rt.equinox.p2-91384a5355b53e448aa8e09b48800f10e6e49f36.tar.gz rt.equinox.p2-91384a5355b53e448aa8e09b48800f10e6e49f36.tar.xz rt.equinox.p2-91384a5355b53e448aa8e09b48800f10e6e49f36.zip |
352457 Fix chmod instruction for Eclipse.app/Contents/MacOS/eclipse
- This is a quick fix for bug 352457: When writing the chmod action,
just repeat the magic capitalization of the .app folder in case of
launchers called "launcher" or "eclipse" (as it is done in the
BrandingIron).
Bug 352457: [publisher] Unbranded Mac OS X Product cannot be installed on case sensitive file system
-rw-r--r-- | bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java index 36f1af68e..459d53105 100644 --- a/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java +++ b/bundles/org.eclipse.equinox.p2.publisher.eclipse/src/org/eclipse/equinox/p2/publisher/eclipse/EquinoxExecutableAction.java @@ -175,7 +175,8 @@ public class EquinoxExecutableAction extends AbstractPublisherAction { String configurationData = "unzip(source:@artifact, target:${installFolder});"; //$NON-NLS-1$ if (Constants.OS_MACOSX.equals(os)) { String execName = execDescriptor.getExecutableName(); - configurationData += " chmod(targetDir:${installFolder}/" + execName + ".app/Contents/MacOS/, targetFile:" + execName + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ + String appName = guessMacAppName(execName); + configurationData += " chmod(targetDir:${installFolder}/" + appName + ".app/Contents/MacOS/, targetFile:" + execName + ", permissions:755);"; //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$ } else if (!Constants.OS_WIN32.equals(os)) { // We are on linux/unix. by default set all of the files to be executable. File[] fileList = execDescriptor.getFiles(); @@ -188,6 +189,17 @@ public class EquinoxExecutableAction extends AbstractPublisherAction { return touchpointData; } + private String guessMacAppName(String execName) { + // repeat magic from org.eclipse.equinox.internal.p2.publisher.eclipse.BrandingIron.brandMac to fix bug 352457 + // TODO the application name for Mac really should be a parameter of the product configuration + String appName = execName; + if (appName.equals("eclipse")) //$NON-NLS-1$ + appName = "Eclipse"; //$NON-NLS-1$ + else if (appName.equals("launcher")) //$NON-NLS-1$ + appName = "Launcher"; //$NON-NLS-1$ + return appName; + } + /** * Brands a copy of the given executable descriptor with the information in the * current product definition. The files described in the descriptor are also copied |