Old 3rd April 2005, 18:08   #1
empezar
Senior Member
 
empezar's Avatar
 
Join Date: Sep 2003
Posts: 123
!ifdef problems, big problems

Hello I have a script that kinda looks like this:

Section Blabla

!define USE_BLABLA

...blabla...

EndSection

Section Blabla2

!ifdef USE_BLABLE
.. do this ..
!else
.. do something else ..
!endif

EndSection

---

The problem is, it always does ".. do this ..", even if I uncheck the Blabla Section. What's up with that?!
empezar is offline   Reply With Quote
Old 3rd April 2005, 18:37   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
!define, !ifdef is for compile time not run time.

You need to use a variable and store a boolean (ie 0 or 1) in it (by using StrCpy). Then use StrCmp to check it in your second section.

-Stu
Afrow UK 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