How to check env-var on compile time
HELP. I'd like to check whether an environment variable is defined when compiling an nsi file(because which files to pack relies on that env-var).
To check env-var UTBS, I tried :
!if "$%UTBS%" == ""
!echo "Env-var UTBS is not defined. I cannot continue."
!else
!echo "Env-var UTBS is defined to $%UTBS%"
!endif
If UTBS is defined, NSIS compiler outputs what we expect, i.e. %UTBS% is replaced with what UTBS's value is.
But if UTBS is not defined, it outputs
Processing script file: "checkenv.nsi"That is not I'm expecting.
Env-var UTBS is defined to $%UTBS% (checkenv.nsi:5)
What can I do? (using NSIS v2.31)