Archive: /D switch woo's


/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


Try

!ifdef REG_VAL
!define REG_DIR
!define REG_OWNER
!endif

-Stu


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.


http://forums.winamp.com/showthread....ghlight=eccles


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.

http://forums.winamp.com/showthread....61#post1477361

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


It was, see the post by eccles.


Ooops...missed it... yes that does work.

thanks