Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Rapicault2015-03-09 02:16:45 +0000
committerPascal Rapicault2015-03-09 02:16:45 +0000
commit955cbb81dd65c921de5121a14f1178c449e4636d (patch)
tree7f06fdfdae016c3cda6b72cbf7deab38986fae26
parent025ca5529ced196ed37091198976820e63180e1d (diff)
downloadrt.equinox.framework-955cbb81dd65c921de5121a14f1178c449e4636d.tar.gz
rt.equinox.framework-955cbb81dd65c921de5121a14f1178c449e4636d.tar.xz
rt.equinox.framework-955cbb81dd65c921de5121a14f1178c449e4636d.zip
Bug 461674 - [Mac] Look for eclipse.ini in new place
Change-Id: I99a0b1ccfad3fe1b8374893fc0795b4ac1094b43 Signed-off-by: Pascal Rapicault <pascal@rapicorp.com>
-rw-r--r--features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c18
1 files changed, 18 insertions, 0 deletions
diff --git a/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c b/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c
index bc7a5cdc0..40c024c23 100644
--- a/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c
+++ b/features/org.eclipse.equinox.executable.feature/library/eclipseConfig.c
@@ -13,6 +13,9 @@
#include "eclipseOS.h"
#include "eclipseConfig.h"
+#ifdef MACOSX
+#include <libgen.h>
+#endif
#ifdef _WIN32
#include <stdio.h>
@@ -76,6 +79,21 @@ _TCHAR* getIniFile(_TCHAR* program, int consoleLauncher){
}
}
}
+#elif MACOSX
+ //On MacOSX, the eclipse.ini is not a sibling of the executable.
+ //It is in ../Eclipse/<launcherName>.ini relatively to the executable.
+ char *dirc, *basec, *bname, *dname;
+ dirc = strdup(program);
+ basec = strdup(program);
+ dname = dirname(dirname(dirc));
+ bname = basename(basec);
+ config_file = realloc(config_file, strlen(dname) + strlen(bname) + 16 * sizeof(char));
+ sprintf(config_file, "%s/Eclipse/%s.ini", dname, bname);
+ printf("ini location is %s", config_file);
+ free(dirc);
+ free(basec);
+ free(dname);
+ free(bname);
#else
/* Append the extension */
strcat(config_file, ".ini");

Back to the top