The ${Unless} statement can be very confusing for new users, especially because it can be combined with ${ElseIf} and ${EndIf}. It is a rather counter-intuitive term, and since it has been asked before (see forums) I suggest we include support for IfNot to LogicLib.nsh.
I have attached the v2.33 LogicLib.nsh, with the added IfNot defines and updated documentation. To make http://nsis.sourceforge.net/LogicLib match, use the following wiki code:
<highlight-nsis>If|IfNot|Unless..{ElseIf|ElseIfNot|ElseUnless}..[Else]..EndIf|EndUnless</highlight-nsis>
Conditionally executes a block of statements, depending on the value of an expression. IfNot and Unless are equivalent and interchangeable.
<highlight-nsis>AndIf|AndIfNot|AndUnless|OrIf|OrIfNot|OrUnless</highlight-nsis>
Adds any number of extra conditions to If, IfNot, Unless, ElseIf, ElseIfNot and ElseUnless statements.
LogicLib header file from v2.33, with added IfNot support.
Logged In: YES
user_id=584402
Originator: NO
Thanks, applied.
LogicLib header file from v2.34, with clearer Usage comments.
Logged In: YES
user_id=1955227
Originator: YES
I made a minor change to the Usage comments for clarity's sake: "IfNot and Unless are equivalent and interchangeable, as are ElseIfNot and ElseUnless."
No other additions, I left the version number unchanged. New nsh attached.
File Added: LogicLib.nsh
Logged In: YES
user_id=584402
Originator: NO
Thanks.