Skip to content
Jan T. Sott edited this page Nov 6, 2016 · 5 revisions

Concatenating constants with strings

Unlike variables, constants cannot be concatenated with strings

Example #1:

File(${NSISDIR} . "\\Includes\\LogicLib.nsh");
// => File "$${NSISDIR}\Includes\LogicLib.nsh"

Example #2:

#define NSISDIR "${NSISDIR}"

File(NSISDIR . "\\Includes\\LogicLib.nsh");
// => File "$${NSISDIR}\Includes\LogicLib.nsh"

Unfortunately, constants can't be mixed with strings either

Example #3:

File("${NSISDIR}\\Includes\\LogicLib.nsh");
// => File "$${NSISDIR}\Includes\LogicLib.nsh"

Workaround:

Use vanilla NSIS in an #nsis block

#nsis
  File "${NSISDIR}\Includes\LogicLib.nsh"
#nsisend
Clone this wiki locally