# 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

### defines

Type: | `stringList`
Default: | `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

Type: | `bool`
Default: | `false`

Whether to disable inclusion of nsisconf.nsh. Generally you do not need to set this property.

### enableQbsDefines

Type: | `bool`
Default: | `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

Type: | `string`
Allowed Values: | `"none"`, `"normal"`, `"errors"`, `"warnings"`, `"info"`, `"all"`
Default: | `"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

Type: | `stringList`
Default: | undefined

Additional flags for the NSIS compiler.

### compressor

Type: | `string`
Allowed Values: | `"default"`, `"zlib"`, `"zlib-solid"`, `"bzip2"`, `"bzip2-solid"`, `"lzma"`, `"lzma-solid"`
Default: | `"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.

### version

Type: | `string`
Default: | `undefined`

The NSIS version. Consists of four numbers separated by dots, for instance "2.46.0.0".

### versionMajor

Type: | `int`
Default: | `versionParts[0]`

The NSIS major version.

### versionMinor

Type: | `int`
Default: | `versionParts[1]`

The NSIS minor version.

### versionParts

Type: | `list`
Default: | `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

Type: | `int`
Default: | `versionParts[2]`

The NSIS patch level.

### versionBuild

Type: | `int`
Default: | `versionParts[3]`

The fourth NSIS version number component.

### toolchainInstallPath

Type: | `path`
Default: | 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

Type: | `string`
Default: | `"makensis"`

Name of the compiler binary. This should not normally need to be changed.

### compilerPath

Type: | `string`
Default: | `compilerName`

Directory where the compiler binary is located. This should not normally need to be changed.