Skip to content
⌘ NSIS Forum Archive

/D switch woo's

7 posts

azerger#

/D switch woo's

all was fine till i tried getting fancy!!

i envoke the nsi file from the command line normally passing something like

/Ddebug or /Dbeta or /Dwertv

in the nsi i have compile defines

!ifdef debug
!define REG_DIR xxx
!define REG_OWNER abcd
!define REG_VAL debug
!endif

!ifdef wertv
!define REG_DIR yyyy
!define REG_OWNER wxyz
!define REG_VAL wertv
!endif

I had decided it would be nice not to have to redefine the REG_VAL each time.

So I tried

passing /DREG_VAL=wertv

!ifdef REG_VAL = wertv
!define REG_DIR
!define REG_OWNER
!endif

however as you can see, the command syntax for !ifdef REG_VAL does not work?
1) What does?
2) Can you assign the /D command line value to a variable.. like !define REG_VAL ${/D}

Thanks,
Art
azerger#
nope, that does not work.. doing a ifdef REG_VAL only says that its defined but you cannot compare to its value which is what I need.
kichik#
Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.
azerger#
kichik,

I looked at this thread and yes we are trying to do the same thing? However, it was never resolved.

Has this feature ever been added to nsis? It was posted over a year ago and I am trying to do the same thing.

Are you a developer who uses NSIS to distribute your application? Are you a Winamp plug-in developer who wants to use NSIS to distribute your plug-in? Have suggestions for other people like you? This is the place.


Its seems straight forward to add just a binary compare equals to the compile time !ifdef APP_COMP == "sdfsd" to nsis. Can this be done?
Was it done?
Thanks,
art