magefree / Launcher

Launcher to install and start XMage
11 stars 14 forks source link

Initial Packaging (Installer) Effort #9

Closed multimeric closed 7 years ago

multimeric commented 7 years ago

Further to issue #8. This PR introduces msi and deb builds for Windows and Debian-derivative Linux. It is excepted that users of all other OSes will continue to use the jar file.

Please note that I haven't fully tested this. It shouldn't be merged until I'm happy that it's stable. I know the MSI installer works on Windows, and that the deb installer works on Ubuntu, but I still need to test if the debs generated on Windows work on Linux. I'll update this when I'm certain.

Explanation of Solution

The JDK includes the javabundler utility, and related ant tasks that package a Java application into native installers for all main operating systems (including Linux!). This utility can be accessed as a maven build task using the javafx-maven-plugin.

This is a very promising solution. However, using the javabundler means that each installer must be generated on the platform it is an installer for. For instance, the dmg installer can only be generated on OSX, the msi installer on Windows etc. This is a problem, since the current deployment is performed on Windows only, meaning only the msi installer will work.

For this reason, I have decided to use the javabundler approach for the Windows installer in conjunction with another maven plugin called jdeb. jdeb is able to generate deb installers (for Debian derivatives of Linux, I suspect the majority of desktop Linux users), even on Windows. Unfortunately I can't find any similar plugins that will generate installers for Mac, using Windows.

Future Steps

  1. We setup a system for building installers for all platforms using javabundler, perhaps, using a free continuous integration server
  2. Once we have packages for all OSes, we can start phasing out the XMage-specific Java, and instead use the JRE that can be included with javabundler installers
  3. Once this is done, we can actually stop using the javabundler installer for Linux, and instead build packages that depend on the relevant jre package, meaning that Linux users can install the JRE using their OS-native methods