This article is intended for the NautDrafter maintainer and explains how to generate the installer for each platform.

Setup

The installer files are hosted on Bitbucket in the nautdrafter-installer repo, which you'll need to clone to your local machine. You will need to be a member of the NautDrafter team to access the repo.

Once the repo has been cloned, there are a few more files that must be added:

 

Configuring the Installers

In the root of the repo is a file called nautdrafter-installer-tidy.xml - this is the BitRock Install Builder config file that all the installers are generated from. While the file can be edited with the Install Builder GUI, it is usually best to do it by hand (the file also contains comments explaining what several of the section are for).

Changing the version number

Changing the value within the <version> tag in the config file will change the installer version. This is used in the installer file name and in the Windows registry. NautDrafter itself does not use this value in any way - it gets its version information from the Constants.java file in the NautDrafter_Common project.

Generating the Installers

For every NautDrafter release 10 installers must be generated - each platform has a main installer and an updater. The main difference between these two installers is that the updater does not bundle Java. The updater also performs some extra actions to check whether the user has Java 8 installed and (if they don't have Java 8) if a previous version of NautDrafter is installed (this is done by checking the selected installation directory for the NautDrafter.jar file. On Windows the registry is used to automatically find the previous install location).

Auotmation

If on linux, the scripts directory allows for automation in build and uploading to bitbucket.    See the following commands.

scripts/build.bash
scripts/upload.bash <username> <password>

 

Manual

The table below gives the command to run in order to generate the installer for each platform

PlatformInstaller TypeCommand


Windows

Full<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml windows
Updater<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml windows --setvars project.installationType=upgrade

Windows 64 bit
Full<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml windows --setvars project.windows64bitMode=1
Updater<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml windows --setvars project.installationType=upgrade project.windows64bitMode=1

Linux
Full<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml linux
Updater<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml linux --setvars project.installationType=upgrade

Linux 64 bit
Full<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml linux-x64
Updater<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml linux-x64 --setvars project.installationType=upgrade

Mac OSX
Full<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml osx
Updater<path-to-installbuilder>/bin/builder build ./nautdrafter-installer-tidy.xml osx --setvars project.installationType=upgrade

The generated installers will be output to <path-to-installbuilder>/output/ and named in the format NautDrafter-<version>-<platform>-<installer|updater>.<exe|run|app>

Before distributing/uploading the OSX installers, they should be zipped (e.g. zip -r NautDrafter-0.2.0-osx-updater.app.zip NautDrafter-0.2.0-osx-updater.app/). Once this is done, all the installers are ready to upload.