NSIS Logic Library - dselkirk's selectlib 1.1:
- Added simplified macros and removed NAME requirement git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@3273 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
0530c41b6d
commit
a453e3281e
2 changed files with 13 additions and 7 deletions
|
@ -5,12 +5,12 @@ silentinstall silent
|
|||
!include "selectlib.nsh"
|
||||
|
||||
Section
|
||||
!insertmacro SELECT "TESTCASE" "test1"
|
||||
!insertmacro CASE "test1"
|
||||
${SELECT} "test1"
|
||||
${CASE} "test1"
|
||||
MessageBox MB_OK "case test1"
|
||||
!insertmacro CASE "test 2;test3"
|
||||
${CASE} "test 2;test3"
|
||||
MessageBox MB_OK "case test2 or test3"
|
||||
!insertmacro CASE_ELSE
|
||||
${CASE_ELSE}
|
||||
MessageBox MB_OK "case else"
|
||||
!insertmacro SELECTEND
|
||||
${SELECTEND}
|
||||
SectionEnd
|
|
@ -19,12 +19,18 @@
|
|||
;
|
||||
; History:
|
||||
; 1.0 - 09/19/2003 - Initial release
|
||||
; 1.1 - 09/20/2003 - Added simplified macros and removed NAME requirement
|
||||
|
||||
!ifndef SELECTLIB
|
||||
!define SELECTLIB
|
||||
|
||||
!macro SELECT NAME VALUE
|
||||
!define SELECT_NAME "${NAME}"
|
||||
!define SELECT "!insertmacro SELECT"
|
||||
!define CASE "!insertmacro CASE"
|
||||
!define CASE_ELSE "!insertmacro CASE_ELSE"
|
||||
!define SELECTEND "!insertmacro SELECTEND"
|
||||
|
||||
!macro SELECT VALUE
|
||||
!define SELECT_NAME "${__LINE__}"
|
||||
!define SELECT_VALUE "${VALUE}"
|
||||
!define SELECT_COUNT "${__LINE__}"
|
||||
Goto "lbl_${SELECT_NAME}_${SELECT_COUNT}"
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue