Skip to content
⌘ NSIS Forum Archive

!ifdef with multiple arguments

9 posts

Larsen#

!ifdef with multiple arguments

Hello,

I´ve read in the helpfile that I can use !ifdef with boolean operators to check for multiple defines.

How can I check one define for TRUE and the other for FALSE?
kichik#
You can use:
!ifdef define1
!ifndef define2
# code if define1 is set, but define2 is not
!endif
!endif
Larsen#
Ok, but when I want to use boolean OR this workaround gets too big.

I solved my problem by negating one define (the one where I could do that), but for other cases this could not be possible.

Do you think I should post a feature request?
Comm@nder21#
do not ask whether to post a request, just do it 🙂

kichik then just decides whether he'll implement the feature or not.

maybe even i'll try to do so.
Afrow UK#
No need.
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.


-Stu
Comm@nder21#
nope, afrow, !if does something different.

he wants to have:
!ifdef define1
!ifndef define2
# code if define1 is set, but define2 is not
!endif
!endif
but with just one line, like
!ifdef define1 AND NOT define2
# code if define1 is set, but define2 is not
!endif
got it? 🙂

you can't do that with !if
Larsen#
@Comm@nder21: thanks for explaining =)

I just posted a feature request:


I thought I better asked before posting this time, so I wouldn´t creat unnecessary entries as I did before =)