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.

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.

Currently, the Call, Get and Debug functions of the System plug-in can't be built using GCC, but only with MSVC. When building with GCC, either download a MSVC-compiled version or write your own plugin that calls the functions you need. You can skip building the System plugin using the following flags:

    scons SKIPPLUGINS=System

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