Update JPackage Windows authored by Devin's avatar Devin
...@@ -2,6 +2,20 @@ ...@@ -2,6 +2,20 @@
Our current method of deploying the game involves packaging the jar into an executable. Normally, this is done using `launch4j`, but that requires distributing a copy of the Java Virtual Machine along with the new executable. This requires us to put everything in zip file, which isn't as intuitive as it could be for a typical user. To solve this, we will use a tool that comes included with java versions 14 and higher, called `jpackage`. This will not only package the program into an executable, but it will be in the form of an installer. Our current method of deploying the game involves packaging the jar into an executable. Normally, this is done using `launch4j`, but that requires distributing a copy of the Java Virtual Machine along with the new executable. This requires us to put everything in zip file, which isn't as intuitive as it could be for a typical user. To solve this, we will use a tool that comes included with java versions 14 and higher, called `jpackage`. This will not only package the program into an executable, but it will be in the form of an installer.
<br>
# Installing Dependencies
To use jpackage, you will need the WiX toolset. At the time of writing this, the current version is WiX v4, but jpackage relies on WiX v3, and there are important changes that break jpackage if WiX v3 is not the version installed, so you'll need to install that version.
1. Download the WiX toolset v3 from [this link](https://wixtoolset.org/docs/wix3/).
2. Install it
3. Make sure to restart any open command prompts or shells, so they recognize the new command.
<br>
# Creating the Jar File
To start, you will want to export the FreshmanRPG client to a Jar file. To start, you will want to export the FreshmanRPG client to a Jar file.
### If using IntelliJ... ### If using IntelliJ...
... ...
......