Skip to content

The app installer

The app image still isn’t distribution-ready and needs to be packaged to become easily distributable and downloadable. An app installer is a distributable package that contains the app and maybe guides through the installation process. Each operating system has its specific app installer formats:

  • Windows: self-extracting .exe or .msi installer file
  • macOS: .dmg archive or .pkg installation package
  • Linux: .deb or .rpm package

It is jpackage again that packages an app image into an app installer. Actually, jpackage can combine all three steps in one single shell command. But splitting them into build steps improves caching, avoids work, and the app image can be examined without installation.

The plugin adds an appInstaller task that runs jpackage with the app image as an input and puts the resulting installer under build/jpackage/installer.

Creating an app installer
gradlew.bat appInstaller

The app installer step requires native build tools being installed and configured correctly. It is more fragile than the app image step and might fail on the first try. This is one more reason for splitting up the build process.

The installer can also get some customization options, but most work is done in the app image.