Old 3rd March 2006, 09:35   #1
Larsen
Junior Member
 
Larsen's Avatar
 
Join Date: Feb 2006
Posts: 30
Question !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?
Larsen is offline   Reply With Quote
Old 3rd March 2006, 09:45   #2
kichik
M.I.A.
[NSIS Dev, Mod]
 
kichik's Avatar
 
Join Date: Oct 2001
Location: Israel
Posts: 11,343
You can use:
code:
!ifdef define1
!ifndef define2
# code if define1 is set, but define2 is not
!endif
!endif


NSIS FAQ | NSIS Home Page | Donate $
"I hear and I forget. I see and I remember. I do and I understand." -- Confucius
kichik is offline   Reply With Quote
Old 3rd March 2006, 09:55   #3
Larsen
Junior Member
 
Larsen's Avatar
 
Join Date: Feb 2006
Posts: 30
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?
Larsen is offline   Reply With Quote
Old 3rd March 2006, 14:15   #4
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to 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.
Comm@nder21 is offline   Reply With Quote
Old 3rd March 2006, 16:52   #5
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
No need.
http://forums.winamp.com/showthread....26#post1879369

-Stu
Afrow UK is offline   Reply With Quote
Old 4th March 2006, 11:36   #6
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
nope, afrow, !if does something different.

he wants to have:
code:
!ifdef define1
!ifndef define2
# code if define1 is set, but define2 is not
!endif
!endif


but with just one line, like
code:
!ifdef define1 AND NOT define2
# code if define1 is set, but define2 is not
!endif


got it?

you can't do that with !if
Comm@nder21 is offline   Reply With Quote
Old 4th March 2006, 12:01   #7
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
Ah I see

-Stu
Afrow UK is offline   Reply With Quote
Old 6th March 2006, 07:46   #8
Larsen
Junior Member
 
Larsen's Avatar
 
Join Date: Feb 2006
Posts: 30
@Comm@nder21: thanks for explaining =)

I just posted a feature request:
http://sourceforge.net/tracker/index...49&atid=373088

I thought I better asked before posting this time, so I wouldn´t creat unnecessary entries as I did before =)
Larsen is offline   Reply With Quote
Old 6th March 2006, 13:22   #9
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
you're welcome
Comm@nder21 is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump