Getting started using the installer plugin is simple:
griffon install-plugin installer
This will fetch the plugin and install it into your Griffon app. The plugin adds several new targets. All of the launcher-related targets are broken into two steps: a prepare step that copies all of the configuration files for that particular launcher into your application, and a create step that actually generates the native launcher. The prepare targets only need to be run once for your project. They give you a chance to tweak the launcher configuration files. The create targets are run every time you want to make a release.
The plugin provides launchers for the following platforms:
- Executable Jar
create-all-launcherswhich invoke the
create-targets for the four platforms above.
We'll use these convenience targets to create launchers for all platforms:
This will create several new files for you:
- installer/jar - the executable JAR launcher directory
- installer/jsmooth - the Windows launcher directory
- installer/linux - the Linux launcher directory
- installer/mac - the Mac launcher directory
- installer/jar/MANIFEST.MF - customize the manifest of the executable JAR
- installer/jsmooth/$appName-icon.png - customize the .exe icon
- installer/jsmooth/$appName.jsmooth - customize the .exe options
- installer/mac/$appName.icns - customize the Mac icon
griffon create-all-launcherstarget to actually create the launchers. This will create all of the launchers in the
installer/$platform/distdirectories and create archives of the launchers:
- installer/jar/dist/$appName-$version.jar - the executable jar
- installer/linux/dist/bin/$appName - the Linux launcher shell script
- installer/linux/dist/$appName-linux-$version.zip - a zip of the Linux launcher
- installer/mac/dist/$appName-$version.dmg - a disk image of the Mac launcher [only created if on a Mac]
- installer/mac/dist/$appName.app - the Mac application bundle
- installer/jsmooth/dist/$appName-windows-$version.zip - a zip of the Windows launcher
- installer/jsmooth/dist/$appName.exe - the Windows launcher
- installer/windows/dist/$appName-windows-$version.zip - copied from the JSmooth directory
- installer/windows/dist/$appName.exe - copied from the JSmooth directory
griffon create-all-launchersand your latest changes will be packaged up. If you increment the version number of your app, the created artifacts will be updated to match.
Hopefully the Installer plugin makes it easy to distribute your Griffon applications to users on various platforms. In a future blog post, I'll cover creating installers for when a simple zip file is not enough.