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

definesstringList1.2undefinedList 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"']
disableConfigbool1.2falseWhether to disable inclusion of nsisconf.nsh. Generally you do not need to set this property.
enableQbsDefinesbool1.2trueWhether 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.
warningLevelstring1.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.
compilerFlagsstringList1.2undefinedAdditional flags for the NSIS compiler.
compressorstring1.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"
versionstring1.2undefinedThe NSIS version. Consists of four numbers separated by dots, for instance "".
versionMajorint1.2versionParts[0]The NSIS major version.
versionMinorint1.2versionParts[1]The NSIS minor version.
versionPartslist1.2emptyThe NSIS version as a list. For instance, NSIS version would correspond to a value of [2, 46, 0, 0].
versionPatchint1.2versionParts[2]The NSIS patch level.
versionBuildint1.2versionParts[3]The fourth NSIS version number component.
toolchainInstallPathpath1.2determined automaticallyNSIS 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.
compilerNamestring1.2"makensis"Name of the compiler binary. This should not normally need to be changed.
compilerPathstring1.2compilerNameDirectory where the compiler binary is located. This should not normally need to be changed.

Relevant File Tags

TagAuto-tagged File NamesSinceDescription
"nsh"*.nsh1.2This tag is attached to NSIS header files.
"nsi"*.nsi1.2This tag is attached to NSIS script files.
"nsissetup"-1.2The rule that creates the NSIS setup executable attaches this tag to its output artifact.
"nsis.input"-1.10The rule that creates the NSIS setup executable will be dependent on artifacts with this tag.

© 2017 The Qt Company Ltd. Documentation contributions included herein are the copyrights of their respective owners. The documentation provided herein is licensed under the terms of the GNU Free Documentation License version 1.3 as published by the Free Software Foundation. Qt and respective logos are trademarks of The Qt Company Ltd in Finland and/or other countries worldwide. All other trademarks are property of their respective owners.