Building on POSIX

Nullsoft Scriptable Install System

Previous | Contents | Next

G.3 Building on POSIX

As of NSIS 2.01, the compiler, makensis, also compiles on POSIX platforms. POSIX platforms include Linux, *BSD, Mac OS X and others. Since the generated installer will eventually run on Windows, a cross-compiler is needed in order to compile them.

The command line option XGCC_W32_PREFIX could be used to explicitly select a specific win32 targeted cross compiler. The value of XGCC_W32_PREFIX has to be the prefix of the toolchain. For example XGCC_W32_PREFIX=i686-w64-mingw32- would deploy the win32 targeted MinGW-w64 cross compiler if it is available on the build system.

If no cross-compiler is available, use the following:

scons SKIPSTUBS=all SKIPPLUGINS=all SKIPUTILS=all SKIPMISC=all
      NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
      install-compiler

scons NSIS_CONFIG_CONST_DATA_PATH=no PREFIX=/path/to/extracted/zip
      /path/to/extracted/zip/LibraryLocal

This should only build makensis and install it to the directory where a precompiled package, such as the nightly build or a zipped release version (nsis-x.xx.zip), is extracted. Note that the in order for this to work, the precompiled package must be compiled using the exact same sources as makensis. In particular, Source\exehead\config.h, the options passed to scons and Source\exehead\fileform.h must be identical. Nightly builds and zipped release versions are built with the default options.

To build a native version of NSIS Menu, install wxWidgets 2.8 and build as usual. wx-config must be in the path.

Previous | Contents | Next