Old 8th March 2011, 10:30   #41
MSG
Major Dude
 
Join Date: Oct 2006
Posts: 1,892
Ah, my bad for not reading your post completely. I've reverted the wiki entry.


Edit: As for why it doesn't work, not sure, I'm not that pro with preprocessor magic. But his/her 'suggested' code, even if it were working, changes LogicLib in a way that breaks backwards compatibility. It is therefore a big no-no. Also, if he/she wants to change logiclib, he/she should submit a patch for logiclib.nsh, not start messing around with the wiki page and advising people to do bad things.
MSG is offline   Reply With Quote
Old 8th March 2011, 11:22   #42
o___O
Junior Member
 
Join Date: Mar 2002
Posts: 27
I guess that's true, but they didn't advise modifying LogicLib.nsh - the code goes inside your .nsi right after LogicLib.nsh is included and merely replaces the functionality of LogicLib. It goes after LogicLib so it doesn't override the new macro. The information about FileExists returning true for directories is a useful addition to the Wiki but the provided solution just doesn't work with IfNot or Unless...
o___O is offline   Reply With Quote
Old 8th March 2011, 12:24   #43
jiake
Senior Member
 
jiake's Avatar
 
Join Date: Oct 2007
Location: Xi'an, China
Posts: 206
I thought a problem must be correct: Switch... Case... EndSwitch is used to detect the numeric value of the variable. But once I use it, I found in fact it can't be used to compare numbers. Such as I have defined a hexadecimal notification code 0x0300, if it is used to compile with a decimal number returned by NSIS, of course, they undoubtedly are not equal. Actually, I found that Switch and Case are only used in mathematical expression but not a string. So I modify the header, use the macro "_=" to replace with the original "_==". But I still advice official developtors to modify this.

Born in: Xi'an, China
Live in: Shanghai, China
Name: 賈可(zh-Hant, trad.), 贾可(zh-Hans, simp.), Jia Ke (Pinyin).
Email: jiake@vip.qq.com
QQ: 137729898
jiake 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