![]() |
#1 |
Junior Member
Join Date: Mar 2007
Location: Glendale, CA
Posts: 5
|
conditional file inclusion
I'm having a bit of difficulty figuring out how to include a file in my installer based on a command line define....
for example, we have 3 versions of the product: DEV, QA, and LIVE When compiling the installer, I run something like: for dev: >makensis.exe /V3 /DVERSION=DEV my_script.nsi for qa: >makensis.exe /V3 /DVERSION=QA my_script.nsi for live: >makensis.exe /V3 /DVERSION="" my_script.nsi Now, in my installer, I only want to include a file for the DEV and QA installations....pseudocode: code: I'm having difficulty queuing off of whether or not ${VERSION} is an empty string. Last edited by jsnby; 20th April 2007 at 18:30. |
![]() |
![]() |
![]() |
#2 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#3 |
Junior Member
Join Date: Mar 2007
Location: Glendale, CA
Posts: 5
|
Here's what I did:
code: The script compiles fine when VERSION is defined as "DEV" or "QA", but fails when defined as "" : Usage: !if [!] value [(==,!=,<=,<,>,>=,&&,||) value2] [...] Error in script "my_script.nsi" on line 75 -- aborting creation process |
![]() |
![]() |
![]() |
#4 |
M.I.A.
[NSIS Dev, Mod] Join Date: Oct 2001
Location: Israel
Posts: 11,343
|
Right, it must be quoted if it can be empty.
code: NSIS FAQ | NSIS Home Page | Donate $ "I hear and I forget. I see and I remember. I do and I understand." -- Confucius |
![]() |
![]() |
![]() |
#5 |
Junior Member
Join Date: Mar 2007
Location: Glendale, CA
Posts: 5
|
It worked. Thanks man...you're a lifesaver.
|
![]() |
![]() |
![]() |
|
Thread Tools | Search this Thread |
Display Modes | |
|
|