Simpler script using the new /o switch
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2573 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
00798142b0
commit
6c1d0b6e73
1 changed files with 4 additions and 26 deletions
|
@ -36,13 +36,13 @@ SectionEnd
|
||||||
Section "optional #1" sec1
|
Section "optional #1" sec1
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "optional #2" sec2
|
Section /o "optional #2" sec2
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "optional #3" sec3
|
Section /o "optional #3" sec3
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
Section "optional #4" sec4
|
Section /o "optional #4" sec4
|
||||||
SectionEnd
|
SectionEnd
|
||||||
|
|
||||||
!ifdef USE_SUBSECTION
|
!ifdef USE_SUBSECTION
|
||||||
|
@ -50,36 +50,14 @@ SectionEnd
|
||||||
!endif
|
!endif
|
||||||
|
|
||||||
Function .onInit
|
Function .onInit
|
||||||
Push $0
|
|
||||||
|
|
||||||
StrCpy $1 ${sec1} ; Gotta remember which section we are at now...
|
StrCpy $1 ${sec1} ; Gotta remember which section we are at now...
|
||||||
SectionGetFlags ${sec1} $0
|
|
||||||
IntOp $0 $0 | ${SF_SELECTED}
|
|
||||||
SectionSetFlags ${sec1} $0
|
|
||||||
# !insertmacro SelectSection ${sec1}
|
|
||||||
|
|
||||||
SectionGetFlags ${sec2} $0
|
|
||||||
IntOp $0 $0 & ${SECTION_OFF}
|
|
||||||
SectionSetFlags ${sec2} $0
|
|
||||||
# !insertmacro UnselectSection ${sec2}
|
|
||||||
|
|
||||||
SectionGetFlags ${sec3} $0
|
|
||||||
IntOp $0 $0 & ${SECTION_OFF}
|
|
||||||
SectionSetFlags ${sec3} $0
|
|
||||||
# !insertmacro UnselectSection ${sec3}
|
|
||||||
|
|
||||||
SectionGetFlags ${sec4} $0
|
|
||||||
IntOp $0 $0 & ${SECTION_OFF}
|
|
||||||
SectionSetFlags ${sec4} $0
|
|
||||||
# !insertmacro UnselectSection ${sec4}
|
|
||||||
|
|
||||||
Pop $0
|
|
||||||
FunctionEnd
|
FunctionEnd
|
||||||
|
|
||||||
Function .onSelChange
|
Function .onSelChange
|
||||||
Push $0
|
Push $0
|
||||||
|
|
||||||
!ifdef USE_SUBSECTION
|
!ifdef USE_SUBSECTION
|
||||||
|
; Check if the user have selected all of the sections using the sub-section
|
||||||
Push $2
|
Push $2
|
||||||
StrCpy $2 ${SF_SELECTED}
|
StrCpy $2 ${SF_SELECTED}
|
||||||
SectionGetFlags ${sec1} $0
|
SectionGetFlags ${sec1} $0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue