New Sections.nsh
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2160 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c59f187c74
commit
858c86cbdc
2 changed files with 54 additions and 8 deletions
|
@ -18,14 +18,8 @@ OutFile one-section.exe
|
|||
|
||||
ComponentText "please choose just one but the default"
|
||||
|
||||
!define SF_SELECTED 1
|
||||
!define SF_SUBSEC 2
|
||||
!define SF_SUBSECEND 4
|
||||
!define SF_BOLD 8
|
||||
!define SF_RO 16
|
||||
!define SF_EXPAND 32
|
||||
|
||||
!define SECTION_OFF 0xFFFFFFFE
|
||||
# defines SF_*, SECTION_OFF and some macros
|
||||
!include Sections.nsh
|
||||
|
||||
Section !Required
|
||||
SectionIn RO
|
||||
|
@ -50,18 +44,22 @@ Function .onInit
|
|||
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
|
||||
|
@ -73,6 +71,7 @@ Function .onSelChange
|
|||
SectionGetFlags $1 $0
|
||||
IntOp $0 $0 & ${SECTION_OFF}
|
||||
SectionSetFlags $1 $0
|
||||
# !insertmacro UnselectSection $1
|
||||
|
||||
; Now remember the current selection
|
||||
Push $2
|
||||
|
@ -99,6 +98,7 @@ Function .onSelChange
|
|||
SectionGetFlags $1 $0
|
||||
IntOp $0 $0 | ${SF_SELECTED}
|
||||
SectionSetFlags $1 $0
|
||||
# !insertmacro SelectSection $1
|
||||
Pop $2
|
||||
Pop $0
|
||||
FunctionEnd
|
Loading…
Add table
Add a link
Reference in a new issue