Introduction
This page describes some notes on the GumTree NSIS installer.
The technology we use for creating installers is called NSIS. It is free and provides a nice development environment under Eclipse (EclipseNSIS).
The installation strategies are follow:
- Copy complete instrument specific artefacts to the install directory
- Create shortcut on desktop and start menu
- Replace <instrument>.ini depending on installation type
The installation type is about which <instrument>.ini needs to be installed for configurating runtime workspace location and potentially other parameters. In the installer, you we supply the command line argument "-type bragg", for example, to run the installer in bragg type. In this case, the installer will look for a file /ini/quokka.bragg.ini and replace /quokka.ini.
Setup
You need to install NSIS (for example, under D:\build\app for Bragg's continuous build system) and AccessControl plugin from http://nsis.sourceforge.net/AccessControl_plug-in
Script and Customisation
The installer is compiled by NSIS with the following script:
You can use the EclipseNSIS template dialog to help you to create the basis of above script, but you need to modify and add the following code:
When compile, you need to addtional symbols:
INSTRUMENT |
quokka |
INSTRUMENT_LABEL |
Quokka |
APP_VERSION |
1.4.1 |
SOURCE |
X:\gumtree\releases\apps |
Automation
The installer generation is automated in the CruiseControl build system. The automation needs to go through the following steps:
- Clean "export" folder and use it as the temporary space
- Copy all necessary artifacts
- Copy the generic GumTree runtime except the .exe and .ini file (ie configuration, features, p2, plugins, artifacts.xml)
- Copy instrument specific artifacts (ie ini, xxx.exe, xxx.ini, splash.bmp)
- Copy GumTree common features
- Copy instrument specific feature
- Copy properties and scripts
- Run makensis to compile nsi script
- Create custom batch for running the installer in different mode
- Clear all temporary files except the installers and batches
- Repeat Step 1 - 5 for all instruments
- Copy all installers and batches to the CruiseControl artifacts folder
This automation process should be run manually during the deployment time. However, due to the restriction in CruiseControl (where all build job must be scheduled to run in a fixed period of time), this process is set to repeat every week.
Bragg Specific Setup
A convenience way to install under Bragg's environment is to use the preconfigured setup batch, and they are in the name of "Bragg <instrument> <version> Install.bat". This batch contains a command:
It makes the installer to use Bragg's setting to launch GumTree.
