Old 15th March 2006, 11:45   #1
Kypec
Member
 
Kypec's Avatar
 
Join Date: Jul 2002
Location: Slovakia
Posts: 54
Angry !if command not working

Please tell me what is wrong with the following script:
PHP Code:
!define FW_FILE AD600
!if ${FW_FILE}==AD600
  
!define FW_NAME "OMEGA 600"
!else
  !echo 
"FW_FILE=${FW_FILE}"
  
!error "Unknown firmware filename defined!"
!endif 
Here are the important parts from compiler's output log window:
PHP Code:
MakeNSIS 2.15 Copyright 1999-2006 NullsoftInc.

Processing script file"D:\firmware_types.nsi"
!define"FW_FILE"="AD600"
FW_FILE=AD600 (D:\firmware_types.nsi:5)
!
errorUnknown firmware filename defined!
Error in script "D:\firmware_types.nsi" on line 6 -- aborting creation process 
Why is second branch after !else executed instead of first one when the condition is met???
Kypec is offline   Reply With Quote
Old 15th March 2006, 12:02   #2
Instructor
Major Dude
 
Join Date: Jul 2004
Posts: 671
code:
!if ${FW_FILE} == AD600
Instructor is offline   Reply With Quote
Old 15th March 2006, 12:13   #3
Comm@nder21
Major Dude
 
Join Date: Jul 2003
Location: germany, b-w
Posts: 734
Send a message via ICQ to Comm@nder21
as NSIS is a simple script language, operators and vars/constants need to be separated by a whitespace character.
Comm@nder21 is offline   Reply With Quote
Old 15th March 2006, 12:13   #4
Kypec
Member
 
Kypec's Avatar
 
Join Date: Jul 2002
Location: Slovakia
Posts: 54
Smile

Thank you VERY MUCH, Instructor.
I suggest that these SPACE DELIMITERS would be clearly noted in the documentation as other compilers usually do not choke on such tight junction of VAR==EXPR syntax.
Kypec 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