Windows

This is an easy one. All you need to do is download and install NSIS from here. You will then need to configure the location of makensis in your personal maven settings.xml file which is at ~/.m2/settings.xml.

More information on the maven settings.xml file can be found here.

Linux

The NSIS installer compiler will work under Linux and MacOSX but you will have to download the source and compile it yourself. If you do not have makensis configured properly, the build of server-installers will not fail, but will print a warning and then complete the rest of the installers that are configured.

Some of the plugins and other files for NSIS will not compile on non Windows operating systems, but this isn't necessary since NSIS jsut packages them up in the compiled installers. Therefore all we need is a precompiled Windows distribution and then we overlay the Linux compiled makensis into that directory.

The installation of NSIS is mainly based on the tutorial How to Install the Nullsoft Installer - NSIS on Linux

Install SCons

  1. Download the source from http://www.scons.org/download.php to your preferred folder
  2. Untar it
  3. Run the installation script as root from the untared source folder

    $ python setup.py install

Make sure having installed gcc

Installation sample for CentOS

$ yum install gcc.i386

Make sure having installed lisbstdc++

Installation sample for CentOS

$ yum install libstdc++-devel.i386

Make sure having installed g++

Installation sample for CentOS

$ yum install gcc-c++.i386

Compile Steps

Note
I know that it's bad practice to compile packages as user root, so don't do this! (I was just too lazy to do it the way it should be done ...)

  1. Download the source (nsis-2.xx-src.tar.bz2) and a pre-compiled binary release (nsis-2.xx.zip) from here.
  2. Untar/Unzip the packages to /root/packages
  3. cd to the src package location and build the binary with these commands:

    $ cd /root/packages
    $ tar xvfj nsis-2.xx-src.tar.bz2
    $ unzip nsis-2.xx.zip
    $ cd nsis-2.xx-src
    $ scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/root/packages/nsis-2.xx install-compiler
    $ cp build/release/makensis/makensis /root/packages/nsis-2.xx

  4. Delete existing older nsis and copy the new nsis binaries to final location

    rm -rf /usr/local/nsis
    cp -r /root/packages/nsis-2.xx /usr/local/nsis

  5. Adapt to existing configuration of installer package and create /usr/local/nsis/bin ....

    $ cd /usr/local/nsis
    $ ln -s . bin

The default location that the project expects to find makensis is /usr/local/nsis/makensis, so if you do not want to configure settings.xml as outlined below, you can just copy the files exactly like the examples above and skip the next step.

  1. Now you can configure the location of makensis in your maven settings.xml and you are all set to build Windows installers on your non Windows build server or workstation.

More information on the maven settings.xml file can be found here.

  • No labels