|multi-platform RCP build: from the PDE and headless [message #799389]
||Wed, 15 February 2012 20:45
| Edward Pershwitz
Registered: February 2012
Disclaimer: After beating my head against the wall for days trying to set up what would seem to be a standard use case I feel like a Skinner box rat conditioned into the state of learned helplessness, so please take any inappropriate sarcasm as a sign of being overwhelmed rather than disrespect.|
My ultimate goal is to set up a headless multi-platform multi-target build of an RCP product with additional pre-build and post-build tasks like running a regression on a test target and javadoc generation.
My immediate goal (that I'm miserably failing at) is to build and publish from the PDE using Buckminster and generate launchers for at least the three most common platforms: linux, windows, and macos-cocoa.
The BuckyBook reads exceptionally well and I diligently plowed through most of it. But the devil is in the details and "little technicalities" that have to be "figured out" by endless mindless trial and error are making this journey daunting to say the least.
So here goes:
Eclipse version: Indigo 3.7.0
Buckminster version: 1.4.0
Platforms: linux, windows, and mac
Build server: linux
Version control: Git
Following the BuckyBook "Building RCP products" chapter, one of the prerequisites says: "you must have the Eclipse Delta Pack installed in your IDE." I'm not sure I understand why it needs to be in my IDE when I really want it in my target (other than using my IDE installation in my target definition) especially since ultimately I want to build headlessly, but in the end I do need platform-specific fragments so the Delta Pack is one way of getting them.
The Delta Pack seems to be the best kept Eclipse secret: having the equinox.executable feature on the Indigo release p2 site would have been way too easy. But after much production and reading numerous forums I've located the download here: download.eclipse.org/eclipse/downloads/drops/R-3.7-201106131736/index.php. Adding the Delta pack to the target platform didn't work (and could not work really because the equinox.executable feature included there needs more fragments/plugins than the plugins directory has) so Eclipse only reports 16 available plugins (the rest are jars) and Buckminster naturally can't find them either and generates either "not known to Buckminster" or "<path>.jar is not a directory" error - I've tried this so many different ways that I can't remember the exact circumstances for each.
So, short of pulling the delta pack into my development environment and editing the equinox.executable feature to only include available platforms, or better yet the three platforms that I need and pruning extra plugins/fragments (an exercise that I'm still trying to avoid) I'm at a loss with the Delta Pack. I'm sure numerous people have successfully used it and my experience is due to my ignorance, but I have not been able to locate any consistent description of how to deal with it anywhere, and boy have I tried.
Luckily some other posts somewhere suggested to "include all environments" while building the target (apparently the modern way of mutli-platform build as compared to the Delta Pack) which did the trick of pulling in the required plugins/fragments except it didn't pull in the equinox.executable feature itself. Buckminster happily built and published the site (with os=*, ws=*, and arch=*) except no launchers were created. Testing the install from linux using a p2 installer from download.eclipse.org/equinox/drops/R-3.7-201106131736/index.php with properties appropriately tweaked installed everything except the binary launcher. If the launcher was borrowed from the installer itself (just copied over to the RCP installation) the installed RCP came up and ran beautifully.
As a side note the Equinox download page quoted above only has p2 installers for linux and windows under its p2 Provisioning Tools, but not for the mac. I wonder if this will become yet another tilting at windmills exercise when (and if) I manage to create a sane multi-platform build.
So back to creating the launchers... in this thread: www.eclipse.org/forums/index.php/t/237823/ Thomas Hallgren suggests that the equinox.executable feature can be had from this download site: download.eclipse.org/eclipse/updates/3.7, which does not appear to be the case... or at least I wasn't able to find it there. The "Add Software Site" wizard conveniently does not show component IDs but only component names, and none of these names suggest that they are this feature. I also looked at the properties page for most of them one by one (!!!) - apparently the only way you can human-speed-linear-search for a component with a known ID - and still no luck. So I resorted again to trying to pull the feature from the Delta Pack - bad idea. Not only did it still try to resolve components it didn't have (I was naively hoping that maybe "include all environments" would pull them in), it would mess up the target platform even after being removed from it, so that it had to be redefined from scratch to work again.
Additionally, defining the target platform to pull the rcp feature from the Indigo release site had an annoying side effect of Eclipse re-resolving the feature every time you want to look at the target platform apparently downloading the whole thing every time and freezing for minutes at a time. Is there a way to make it download once and use the local copy instead? It's not like the last year's release rcp feature would be changing too terribly often.
So here I am back at square one. Can someone help or at least point me to a source of consistent information on how to set up a multi-platform RCP build, preferably with reusable metadata managed by an Eclipse project so that it can then become the basis for a headless build? If I ever graduate to setting up a headless build, that is, since so far I'm miserably failing the class.
--Buckminster Community Member Wannabe
Powered by FUDForum
. Page generated in 0.01777 seconds