- Qbs Manual
- Module nsis
- Qt Build Suite 1.4.3

# Module nsis

The `nsis` module contains properties and rules for building EXE installers for Windows using the Nullsoft Scriptable Install System.

This module is available on all platforms.

Note: A typical NSIS script includes an OutFile command to set the filename of the generated installer executable. However, Qbs overrides any OutFile commands found in the script, and therefore, you must use the targetName property to set the filename.

## General Properties

Property | Type | Since | Default | Description
--- | --- | --- | --- | ---
defines | stringList | 1.2 | `undefined` | List of preprocessor macros that get passed to the compiler. To set macro values, use the following syntax: `cpp.defines: ["USE_COLORS=1", 'COLOR_STR="blanched almond"']`
disableConfig | bool | 1.2 | `false` | Whether to disable inclusion of nsisconf.nsh. Generally you do not need to set this property.
enableQbsDefines | bool | 1.2 | `true` | Whether to define preprocessor macros corresponding to values from the project and product objects. When building a 64-bit package, the preprocessor variable `Win64` will also be defined.
warningLevel | string | 1.2 | `"normal"` | Severity of warnings to emit. The higher the level, the more warnings will be shown. The levels `none`, `errors`, `warnings`, `info` and `all` correspond to NSIS verbosity levels 0 through 4, inclusive. `normal` corresponds to the default level.
compilerFlags | stringList | 1.2 | undefined | Additional flags for the NSIS compiler.
compressor | string | 1.2 | `"default"` | Compression algorithm used to compress files and data in the installer. Setting this property overrides any SetCompressor command in the NSI file being compiled. Possible values include: `"default"`, `"zlib"`, `"zlib-solid"`, `"bzip2"`, `"bzip2-solid"`, `"lzma"`, `"lzma-solid"`
version | string | 1.2 | `undefined` | The NSIS version. Consists of four numbers separated by dots, for instance "2.46.0.0".
versionMajor | int | 1.2 | `versionParts[0]` | The NSIS major version.
versionMinor | int | 1.2 | `versionParts[1]` | The NSIS minor version.
versionParts | list | 1.2 | `empty` | The NSIS version as a list. For instance, NSIS version 2.46.0.0 would correspond to a value of `[2, 46, 0, 0]`.
versionPatch | int | 1.2 | `versionParts[2]` | The NSIS patch level.
versionBuild | int | 1.2 | `versionParts[3]` | The fourth NSIS version number component.
toolchainInstallPath | path | 1.2 | determined automatically | NSIS installation directory. Determined by searching known registry keys and known installation paths until a match is found. This should not normally need to be changed.
compilerName | string | 1.2 | `"makensis"` | Name of the compiler binary. This should not normally need to be changed.
compilerPath | string | 1.2 | `compilerName` | Directory where the compiler binary is located. This should not normally need to be changed.