How can I let the compiled script depend on something dynamic?
From NSIS Wiki
Jump to navigationJump to search
Compile your script with /DNAME=value or /X"nsis command" passed on to makensis.exe as command line arguments. The /D switch of the compiler will define NAME as value in the script. The /X switch will add "nsis command" to the top of the script.
Example:
In the compiling script:
ExecWait "makensis.exe /DVERSION=1.2 myscript.nsi"
In the compiled dynamic script:
OutFile myprog${VERSION}.exe
Note - These flags *must* be specified on a makensis command line before you specify the script name. If you have "makensis.exe myscript.nsi /DVERSION=1.2 " then VERSION will not be set.