wiki:NSISonUnix
Last modified 8 months ago Last modified on 09/28/11 11:18:59

Autobuild machinery for NSIS Windows Installer (for Unix)

The following changes must be done to ensure that the "installer" target will work properly on running "buildggb40". Our aim is to get a properly working Windows installer (under Unix).

Note that Wine must be installed first for both the ant machinery to detect that Unix is present, and also for running the uninstaller.exe.

You may be interested how these preparations are done on a Gentoo Linux at ServerLinzDev.

Signing

Downloading and compiling osslsigncode

osslsigncode is an open source project at SourceForge.net. Version 1.3.1 should work.

Before compilation, the libssl-dev libcurl4-openssl-dev packages are needed on Debian/Ubuntu. libcurl4-openssl-dev is needed for timestamping.

Now copy the osslsigncode binary to the installer/ directory. You may probably find another executable with the same name, which is for the Mac based signing. You can safely rename the original executable to osslsigncode.mac.

Creating certificates for osslsigncode

openssl pkcs12 -in igi-keystore.p12 -nokeys -clcerts -out igi-keystore-CL.crt.pem
openssl pkcs12 -in igi-keystore.p12 -nokeys -cacerts -out igi-keystore-CA.crt.pem
openssl pkcs12 -in igi-keystore.p12 -nocerts -nodes -out igi-keystore-CL.key.pem
openssl crl2pkcs7 -certfile igi-keystore-CL.crt.pem -certfile \
 igi-keystore-CA.crt.pem -nocrl -outform DER -out igi-keystore-CL.spc.der
openssl rsa -in igi-keystore-CL.key.pem -outform DER -out igi-keystore-CL.key.der

Preparing NSIS

The nsis Linux package is to be installed. Then the /usr/share/nsis directory must be changed (rename the original one to /usr/share/nsis.orig, for example).

Now the NSIS_2.46_UltraModernUI_1.00_2009-12-25.exe package must be installed under Wine. After successful installation the entire ~/.wine/drive_c/Program Files/NSIS/ directory must be copied to /usr/share/nsis/.

The ant machinery uses the installer/nsis/makensis binary to run nsis. To ensure its proper working, you must rename the existing makensis executable to makensis.mac and make a symbolic link to the Unix version:

makensis -> /usr/bin/makensis

launch4j

First the mingw32-binutils package must be installed. Now the following executables must be linked into the installer/launch4j/bin/ directory:

ld -> /usr/bin/i586-mingw32msvc-ld
windres -> /usr/bin/i586-mingw32msvc-windres

Here you may also find executables with the same name. As mentioned above, these are for Mac compilation. You can safely rename both executables to have .mac extension.