Qbs Manual

Qbs 1.14.0

# nsis

Provides Nullsoft Scriptable Install System support. More...

Since: | Qbs 1.2

- List of all members, including inherited members

## Properties

- compilerFlags : stringList
- compilerName : string
- compilerPath : string
- compressor : string
- defines : stringList
- disableConfig : bool
- enableQbsDefines : bool
- toolchainInstallPath : path
- version : string
- versionBuild : int
- versionMajor : int
- versionMinor : int
- versionParts : list
- versionPatch : int
- warningLevel : string

## Detailed Description

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

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 product.targetName property to set the filename.

### Relevant File Tags

Tag | Auto-tagged File Names | Since | Description
--- | --- | --- | ---
`"nsh"` | `*.nsh` | 1.2 | This tag is attached to NSIS header files.
`"nsi"` | `*.nsi` | 1.2 | This tag is attached to NSIS script files.
`"nsissetup"` | - | 1.2 | The rule that creates the NSIS setup executable attaches this tag to its output artifact.

## Property Documentation

compilerFlags : stringList

A list of additional flags for the NSIS compiler.

Default: Undefined

compilerName : string

The name of the compiler binary.

This property should not normally need to be changed.

Default: `"makensis"`

compilerPath : string

The directory where the compiler binary is located.

This property should not normally need to be changed.

Default: compilerName

compressor : string

The 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"`.

Default: `"default"`

defines : stringList

A 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"']

Default: Undefined

disableConfig : bool

Whether to exclude `nsisconf.nsh`.

Generally, you do not need to set this property.

Default: `false`

enableQbsDefines : bool

Whether to define preprocessor macros corresponding to the values from the project and product objects.

When building a 64-bit package, the preprocessor variable `Win64` will also be defined.

Default: `true`

toolchainInstallPath : path

The NSIS installation directory.

Determined by searching from the known registry keys and known installation paths until a match is found.

This property should not normally need to be changed.

Default: Determined automatically.

version : string

The NSIS version. Consists of four numbers separated by dots. For example, `"2.46.0.0"`.

Default: Undefined

versionBuild : int

The fourth NSIS version number component.

Default: `versionParts[3]`

versionMajor : int

The NSIS major version.

Default: `versionParts[0]`

versionMinor : int

The NSIS minor version.

Default: `versionParts[1]`

versionParts : list

The NSIS version as a list.

For example, the NSIS version 2.46.0.0 would correspond to a value of `[2, 46, 0, 0]`.

Default: `[]`

versionPatch : int

The NSIS patch level.

Default: `versionParts[2]`

warningLevel : string

The severity of the warnings to emit. The higher the level, the more warnings will be shown.

The levels `none`, `errors`, `warnings`, `info`, and `all` correspond to the NSIS verbosity levels 0 through 4, inclusive. `normal` corresponds to the default level.

Default: `"normal"`