akhikhl / wuff

Gradle plugin for automating assembly of OSGi/Eclipse bundles and applications
MIT License
152 stars 51 forks source link

Fix #44 Allow generation of native launcher for products #53

Closed ylemoigne closed 9 years ago

ylemoigne commented 9 years ago

Hi

Please, can you review my work on generation of native launcher. At this stage, it is not complete, but I would like to know if I'm on the good way and what refactor you would like to see before merging.

Note :

ylemoigne commented 9 years ago

Note change :

akhikhl commented 9 years ago

Hi Yann,

Thanks a lot for your great contributions!

There were some little bugs, which I fixed:

  1. issue #63: incorrect passing of jvmargs in EquinoxProductConfigurer.customizeIniFile.
  2. issue #64: getEclipseBundleSymbolicName is invoked "too early" for rcp apps.
  3. issue #65: EquinoxProductConfigurer generates eclipse.ini, although it should be ${project.name}.ini

please update your fork and do your tests/builds. If everything works with you, I'll make a release.

ylemoigne commented 9 years ago

As I said on twitter, It's a pleasure to try to improve Wuff.

I saw your fixes. Thanks to you for spotting 'my' bugs. Hard to think about all usecases. I'll check with your version of the repository tomorrow evening and I come back to you.

ylemoigne commented 9 years ago

Nope there is problem. (I test your master + my pending PR). The "companion library" can't be found. The native counterpart of org.equinox.launch is not in plugins dir after product creation. I'll investigate tonight.

akhikhl commented 9 years ago

I just tried to reproduce this, without success. Could you, please try:

git clone git@github.com:akhikhl/wuff.git
cd wuff
gradle build
cd examples/RcpApp-1/MyRcpApp
gradle build

Expected result: MyRcpApp/build/output/MyRcpApp-1.0.0.0-xxx/plugins contains unpacked org.eclipse.equinox.launcher with os-specific part (dll, so, ...).

ylemoigne commented 9 years ago

Ok, I reproduce my problem. If you add a name to the product : products { product name: "foo", platform: 'windows', arch: 'x86_64' }

Then the platform specific launcher is not there.

ylemoigne commented 9 years ago

I used the product name to build different "flavored" version. Maybe it was not intended for this usage.

If it's a correct usage, It seem there is a missmatch, in EquinoxProductConfigurer:60 configName = "${productConfigPrefix}${productNamePrefix}${platform}_${arch}${languageSuffix}"

And defaultConfig.groovy (which don't include productNamePrefix)

akhikhl commented 9 years ago

I confirm: adding "name" attribute removes native launcher. Will have a look.

akhikhl commented 9 years ago

I fixed the issue with native launchers and named products. Could you, please, test the fix on snapshot?

ylemoigne commented 9 years ago

Good news. I made the test, it work for me :)