|
|
#1 | |
|
Junior Member
Join Date: Feb 2007
Posts: 13
|
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 : code: 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 Quote:
What can I do? (using NSIS v2.31) |
|
|
|
|
|
|
#2 |
|
Senior Member
Join Date: Dec 2005
Location: Glow
Posts: 285
|
Edit: My workaround... It didn't work.
![]() Edit 2: Okay this one should work... code: In compile time $$ constants doesn't work in front of the environment variable. So using !if "$%UTBS%" == "$$%UTBS%" didn't work. Last edited by {_trueparuex^}; 20th December 2007 at 12:29. |
|
|
|
|
|
#3 |
|
Junior Member
Join Date: Feb 2007
Posts: 13
|
Thank you very much. Your trick really works.
|
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|