Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Added commands for generating each installer

...

  • In the /install-files/ folder, create a folder called jre1.8.0_20. This will hold the Java Runtime for each platform.
    • Download the latest JREs zips from the BitRock website. You'll need:
      • JRE Windows
      • JRE Windows x64
      • JRE Linux
      • JRE Linux x64
      • JRE Mac OS X
    • Each of these zips will be structured like:

      Code Block
      languagebash
      jre1.8.0_20-<platform>/
      └── java-<platform>/
          ├── bin/
          │   ...
          └── lib/
              ...
    • From each of the zips, copy the the java-<platform>folder <platform> folder into /install-files/jre1.8.0_20/
      Your folder structure should look like:

      Code Block
      .
      └── install-files/
          ├── icons/
          ├── images/
          └── jre1.8.0_20/
              ├── java-linux/
              │   ├── bin/
              │   └   ...
              ├── java-linux-x64/
              ├── java-osx/
              ├── java-windows/
              └── java-windows-x64/
  •  The NautDrafter compiled distributable must also be added.
    • In the main NautDrafter repo (cloned from https://bitbucket.org/nautdrafter/nautdrafter), run ./gradlew distZip (in the root directory). This will generate zip files in <project>/build/distributions/<project>.zip.
    • Extract <main-nautdrafter-repo>/NautDrafter/build/distributions/NautDrafter.zip to the root of the installer repo.
      You should now have the following folder structure:

      Code Block
      .
      ├── install-files/
      │   ├── icons/
      │   ├── images/
      │   └── jre1.8.0_20/
      └── NautDrafter/
          ├── assets/
          ├── bin/
          ├── bundles/
          ├── lib/
          └── style/
  • You are now ready to generate an installer!

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.

Changing the version number

 

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).

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.