Archive: Syntax in a NSIS script file


Syntax in a NSIS script file
Due to usage of the NSIS Logic Library (implemented by the command
"!include LogicLib.nsh" in the *.nsi sript file) I often encountered constructs, which contain the 3 characters "$", "{" and "}".

Typical examples are:


But in which cases is it necessary to use these characters and why I can omit these characters in connection with the following instructions:

It just means insert the content of a define

!define xyz "OhCrap"
!error ${xyz}
A common way to create helper functions is
!define MyFunc "!insertmacro MyFuncImplementation"
!macro MyFuncImplementation
DetailPrint "Performing myfunc"
Exec '"myfunc.exe" /w00t'
!macroend
..and call it with ${MyFunc}. Other functions like CopyFiles are native functions that makensis.exe knows about and they are documented in the main helpfile...