Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Include documentation for application distribution in guide? #120

Open
shnplr opened this issue Oct 18, 2015 · 2 comments
Open

Include documentation for application distribution in guide? #120

shnplr opened this issue Oct 18, 2015 · 2 comments

Comments

@shnplr
Copy link

shnplr commented Oct 18, 2015

Nearly finished my first Griffon/JavaFX application and looking in the guide for info on packaging & distribution...but not finding much.

So far I figured out Griffon supports packaging & distribution using Gradle javafx + izpack plugins.

javafx plugin provides

  1. Windows .zip file containing griffon app, jfxrt and windows batch file starter
  2. Linux .tar file as above with linux bash script starter
  3. Folder structure containing griffon app, JRE/jfxrt and a windows executable starter

izpack plugin provides
4. An installer (yay) - as an executable .jar (huh?)

Being able to distribute/run JavaFX application without user ever needing to install JDK/JRE is a major selling point, so distributions that require user to install a JRE seems to me rather odd -
the plugin also created a JNLP for me .... Oh Gradle plugin! - where were you when I needed you 10 years ago?

IMO default distributions for Griffon/JavaFX should be:

  1. windows .msi installer (perhaps in the Griffon flavour but easily tweakable, shortcuts, programs&features etc)
  2. linux .deb .rpg
  3. mac.dmg
@aalmiray
Copy link
Member

indeed, we need to document these features in the guide. AFAIK the javapackager can create a Windows executable with the application and the JRE bundled together. The javapackager is reachable from the gradle-javafx-plugin, so we just need to figure out the right settings to configure it.

RPM and Debian packages can be created using the gradle-osspackage plugin. We didn't apply to the project templates because this plugin had trouble with Gradle 2.x some months ago. I guess is time to revisit this decision and update the templates.

IzPack is a very popular choice that can create universla installers, but as you saw, it requires Java. It's possible to bundle a JRE for the installer itself, but this won't bundle a JRE for the application automatically. I believe you can configure this with IzPack too. The configuraiton we provide is very simple for now.

Launch4J, Install4J and JSmooth are other options that can be used to create Windows ready executables/bundles.

Regarding the gradle-jnlp plugin, you can thank @tschulte for that one 😉

@shnplr
Copy link
Author

shnplr commented Oct 21, 2015

Looking at plugin code it calls internal ant-javafx class method which loads all installers. Running gradle assemble --debug reveals the problem:

[INFO] [org.gradle.api.Task] Skipping MSI Installer because of configuration error Version string is not compatible with MSI rules [0.1.0-SNAPSHOT].
Advice to Fix: Set the bundler argument "win.msi.productVersion" according to these rules: http://msdn.microsoft.com/en-us/library/aa370859%28v=VS.85%29.aspx

changing version in gradle.properties to 0.1.0 resolved the issue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants