2003-12-24 17:51:58 +00:00
|
|
|
; one-section.nsi
|
|
|
|
;
|
|
|
|
; This example demonstrates how to control section selection.
|
|
|
|
; It allows only one of the sections of a group to be selected.
|
2003-01-09 20:09:02 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
;--------------------------------
|
2003-11-25 17:18:45 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
; Section define/macro header file
|
|
|
|
; See this header file for more info
|
2003-02-16 21:49:25 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
!include "Sections.nsh"
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
Name "One Section"
|
|
|
|
OutFile "one-section.exe"
|
2008-01-27 17:44:55 +00:00
|
|
|
RequestExecutionLevel user
|
2003-12-24 17:51:58 +00:00
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
; Pages
|
2002-08-08 10:20:28 +00:00
|
|
|
|
2003-09-05 15:16:15 +00:00
|
|
|
Page components
|
2002-08-08 10:20:28 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
; Sections
|
2002-10-02 16:59:40 +00:00
|
|
|
|
2002-08-08 10:20:28 +00:00
|
|
|
Section !Required
|
2003-12-24 17:51:58 +00:00
|
|
|
SectionIn RO
|
2002-08-08 10:20:28 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section "Group 1 - Option 1" g1o1
|
|
|
|
SectionEnd
|
2003-02-16 21:49:25 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section /o "Group 1 - Option 2" g1o2
|
2002-08-08 10:20:28 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section /o "Group 1 - Option 3" g1o3
|
2002-08-08 10:20:28 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section "Group 2 - Option 1" g2o1
|
2002-08-08 10:20:28 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section /o "Group 2 - Option 2" g2o2
|
2002-08-08 10:20:28 +00:00
|
|
|
SectionEnd
|
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
Section /o "Group 2 - Option 3" g2o3
|
|
|
|
SectionEnd
|
|
|
|
|
|
|
|
;--------------------------------
|
|
|
|
|
|
|
|
; Functions
|
|
|
|
|
|
|
|
; $1 stores the status of group 1
|
|
|
|
; $2 stores the status of group 2
|
2003-02-16 21:49:25 +00:00
|
|
|
|
2002-08-08 10:20:28 +00:00
|
|
|
Function .onInit
|
2003-12-24 17:51:58 +00:00
|
|
|
|
|
|
|
StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default
|
2003-12-24 22:50:22 +00:00
|
|
|
StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default
|
2003-12-24 17:51:58 +00:00
|
|
|
|
2002-08-08 10:20:28 +00:00
|
|
|
FunctionEnd
|
|
|
|
|
|
|
|
Function .onSelChange
|
2003-12-24 17:51:58 +00:00
|
|
|
|
|
|
|
!insertmacro StartRadioButtons $1
|
|
|
|
!insertmacro RadioButton ${g1o1}
|
|
|
|
!insertmacro RadioButton ${g1o2}
|
|
|
|
!insertmacro RadioButton ${g1o3}
|
|
|
|
!insertmacro EndRadioButtons
|
2003-12-24 16:30:22 +00:00
|
|
|
|
2003-12-24 17:51:58 +00:00
|
|
|
!insertmacro StartRadioButtons $2
|
|
|
|
!insertmacro RadioButton ${g2o1}
|
|
|
|
!insertmacro RadioButton ${g2o2}
|
|
|
|
!insertmacro RadioButton ${g2o3}
|
|
|
|
!insertmacro EndRadioButtons
|
2003-12-24 16:30:22 +00:00
|
|
|
|
2002-08-08 10:20:28 +00:00
|
|
|
FunctionEnd
|