From 6c1d0b6e7367cad3948ac39944ce609facb55af5 Mon Sep 17 00:00:00 2001 From: kichik Date: Sun, 25 May 2003 20:31:42 +0000 Subject: [PATCH] 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 --- Examples/one-section.nsi | 30 ++++-------------------------- 1 file changed, 4 insertions(+), 26 deletions(-) diff --git a/Examples/one-section.nsi b/Examples/one-section.nsi index 1931bc87..75293265 100644 --- a/Examples/one-section.nsi +++ b/Examples/one-section.nsi @@ -36,13 +36,13 @@ SectionEnd Section "optional #1" sec1 SectionEnd -Section "optional #2" sec2 +Section /o "optional #2" sec2 SectionEnd -Section "optional #3" sec3 +Section /o "optional #3" sec3 SectionEnd -Section "optional #4" sec4 +Section /o "optional #4" sec4 SectionEnd !ifdef USE_SUBSECTION @@ -50,36 +50,14 @@ SectionEnd !endif Function .onInit - Push $0 - 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 Function .onSelChange Push $0 !ifdef USE_SUBSECTION +; Check if the user have selected all of the sections using the sub-section Push $2 StrCpy $2 ${SF_SELECTED} SectionGetFlags ${sec1} $0