These commands are similar to the C preprocessor in terms of purpose and functionality. They allow file inclusion, conditional compilation, executable header packing and process execution during the build process. Note: None of these commands allow the use of \R{variables}{variables}.
Number literals support the \c{0b}, \c{0o}, \c{0n} and \c{0x} radix prefixes (base 2, 8, 10 and 16 respectively). Note: The deprecated plain \c{0} octal prefix is also supported in some places but its usage is discouraged.
This command will include 'file' as if it was part of the original script. Note that if a file is included in another directory, the current directory is still where the script was compiled from (not where the included file resides). If the compiler can't find the file it will look for it in every include directory. See \R{addincludedir}{!addincludedir} for more information. If the /nonfatal switch is used and no files are found, a warning will be issued instead of an error. /charset can be used to specify a codepage for plain text files without a BOM.
Adds another include directory to the include directories list. This list is searched when \R{include}{!include} is used. This list's initial value is $\{NSISDIR\}\\Include.
Causes the NSIS compiler to scan the given directory for plug-in DLLs. If you don't specify the plug-in architecture it is assumed to match the current target architecture. If the architecture does not match the installer will probably crash!
Appends \e{text} to \e{file}. The text is written as ANSI (ACP) unless the file already has a BOM. Using /CHARSET will force a specific character encoding. \c{$\\n} will be translated to \c{$\\r$\\n} on Windows unless you specify /RawNL.
This command will execute 'command' using a call to CreateProcess(). Unlike \R{system}{!system}, it does not use the command line processor, so input/output redirection and commands like 'cd', 'dir' and 'type' can not be used. Currently, the only known advantage of \R{execute}{!execute} over \R{system}{!system} is that it does not give trouble when the current working directory is specified using UNC.
This option makes the compiler use an external EXE packer (such as \W{http://www.un4seen.com/petite/}{Petite} or \W{http://upx.sourceforge.net/}{UPX}) to compress the executable header. Specify a temporary file name (such as "temp.dat") and a command line (such as "C:\\program files\\upx\\upx -9 temp.dat") to compress the header.
This option will execute 'command' using a call to system() after the installer EXE has been generated. You can typically use it to sign (Authenticode) your installer. If 'command' contains a '%1' it will be replaced by the executables filename.
This option will execute 'command' using a call to system() after the uninstaller EXE has been generated. You can typically use it to sign (Authenticode) your uninstaller. If 'command' contains a '%1' it will be replaced by the executables filename.
This command will execute 'command' using a call to system(). You can store the return value in a define ('symbol') or halt execution if the return value compared (using 'compare') to 'comparevalue' is false. 'compare' can be '<' or '>' or '<>' or '='.
This is similar to \R{getdllversionlocal}{GetDLLVersionLocal}, only it stores the version number in defines and can therefore be used anywhere, not just inside functions and sections. /packed returns the information in two DWORDs.
Passing push will cause !verbose to push the current verbosity level on a special stack. Passing pop will cause !verbose to pop the current verbosity level from the same stack and use it.
You can use these standard predefines to automatically add the build time to the title of development versions, add the date to the version number, etc.
The size of a character code unit (in bytes). 1 in ANSI installers and 2 in Unicode installers.
A \W{http://unicode.org/glossary/#grapheme}{grapheme} cluster consists of a base character plus optional combining characters and diacritics and is defined as one or more code points. One or more code units is required to encode a single code point.
\S1{prensisptrsize} $\{NSIS_PTR_SIZE\}
The size of a pointer (in bytes) in the generated installer.