Andreas Pakulat
2018-08-24 19:57:18 UTC
Hi,
I'm building an RCP application and recently updated from Eclipse 4.4 as base
to 4.7, along with it comes shipment as a plain app bundle on macOS. I'm also
integrating a JRE installation into the RCP application such that users don't
need to have Java installed. This is done through root-files and worked fine
with Eclipse 4.4.
With Eclipse 4.7 it appears I'm hitting an incompatibility between tycho's
idea where the 'root' of an rcp app is and Eclipse' own idea. The launcher
shipped with Eclipse 4.7-based applications looks for a shipped Java runtime
in the folder '../../jre/Contents/Home/bin' (based on
http://git.eclipse.org/c/equinox/rt.equinox.framework.git/tree/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c?h=R4_7_maintenance#n46),
where this path is relative to the 'launcher'. It appears 'launcher' here
means the actual binary inside eclipse.app/Contents/MacOS, which makes sense.
In turn that means the 'jre' folder needs to be placed directly inside
eclipse.app, next to the Contents folder there. So the app bundle would look
like this:
myrcp.app/
+- Contents/
| +- Eclipse/
| +- MacOS/
| + myrcp
+- jre/
+- Contents
Unfortunately tycho, when being told to place a 'jre' folder into the 'root'
using this:
root.macosx.cocoa.x86_64=absolute:/Users/andreas/dependencies/JREs/macosx64
root.macosx.cocoa.x86_64.permissions.755=jre/Contents/Home/bin/java
root.macosx.cocoa.x86_64.link=../Home/lib/jli/libjli.dylib,jre/Contents/MacOS/libjli.dylib
puts the jre folder into myrcp.app/Contents/Eclipse. Thus Eclipse won't find
the JRE and won't start on systems that have no java runtime installed.
I'm mostly wondering if I'm missing something here that I need to tell tycho
now that I've switched the Eclipse version or bundling jre's should be done
differently now?
I saw https://bugs.eclipse.org/bugs/show_bug.cgi?id=519280 where it appears
that using a relative path pointing outside the 'normal' root that tycho uses
may work, but I'm not quite sure how to apply this to my example above - in
particular the link and permissions line.
I'm using the latest tycho release 1.1.0 already.
Andreas
I'm building an RCP application and recently updated from Eclipse 4.4 as base
to 4.7, along with it comes shipment as a plain app bundle on macOS. I'm also
integrating a JRE installation into the RCP application such that users don't
need to have Java installed. This is done through root-files and worked fine
with Eclipse 4.4.
With Eclipse 4.7 it appears I'm hitting an incompatibility between tycho's
idea where the 'root' of an rcp app is and Eclipse' own idea. The launcher
shipped with Eclipse 4.7-based applications looks for a shipped Java runtime
in the folder '../../jre/Contents/Home/bin' (based on
http://git.eclipse.org/c/equinox/rt.equinox.framework.git/tree/features/org.eclipse.equinox.executable.feature/library/cocoa/eclipseCocoa.c?h=R4_7_maintenance#n46),
where this path is relative to the 'launcher'. It appears 'launcher' here
means the actual binary inside eclipse.app/Contents/MacOS, which makes sense.
In turn that means the 'jre' folder needs to be placed directly inside
eclipse.app, next to the Contents folder there. So the app bundle would look
like this:
myrcp.app/
+- Contents/
| +- Eclipse/
| +- MacOS/
| + myrcp
+- jre/
+- Contents
Unfortunately tycho, when being told to place a 'jre' folder into the 'root'
using this:
root.macosx.cocoa.x86_64=absolute:/Users/andreas/dependencies/JREs/macosx64
root.macosx.cocoa.x86_64.permissions.755=jre/Contents/Home/bin/java
root.macosx.cocoa.x86_64.link=../Home/lib/jli/libjli.dylib,jre/Contents/MacOS/libjli.dylib
puts the jre folder into myrcp.app/Contents/Eclipse. Thus Eclipse won't find
the JRE and won't start on systems that have no java runtime installed.
I'm mostly wondering if I'm missing something here that I need to tell tycho
now that I've switched the Eclipse version or bundling jre's should be done
differently now?
I saw https://bugs.eclipse.org/bugs/show_bug.cgi?id=519280 where it appears
that using a relative path pointing outside the 'normal' root that tycho uses
may work, but I'm not quite sure how to apply this to my example above - in
particular the link and permissions line.
I'm using the latest tycho release 1.1.0 already.
Andreas
--
Andreas Pakulat ***@froglogic.com
froglogic GmbH - Automated UI and Web Testing
Andreas Pakulat ***@froglogic.com
froglogic GmbH - Automated UI and Web Testing