Statistiques
| Révision :

root / tmp / org.txm.setups / nsis / Examples / one-section.nsi @ 1520

Historique | Voir | Annoter | Télécharger (1,54 ko)

1 728 mdecorde
; one-section.nsi
2 728 mdecorde
;
3 728 mdecorde
; This example demonstrates how to control section selection.
4 728 mdecorde
; It allows only one of the sections of a group to be selected.
5 728 mdecorde
6 728 mdecorde
;--------------------------------
7 728 mdecorde
8 728 mdecorde
; Section define/macro header file
9 728 mdecorde
; See this header file for more info
10 728 mdecorde
11 728 mdecorde
!include "Sections.nsh"
12 728 mdecorde
13 728 mdecorde
;--------------------------------
14 728 mdecorde
15 728 mdecorde
Name "One Section"
16 728 mdecorde
OutFile "one-section.exe"
17 728 mdecorde
RequestExecutionLevel user
18 728 mdecorde
19 728 mdecorde
;--------------------------------
20 728 mdecorde
21 728 mdecorde
; Pages
22 728 mdecorde
23 728 mdecorde
Page components
24 728 mdecorde
25 728 mdecorde
;--------------------------------
26 728 mdecorde
27 728 mdecorde
; Sections
28 728 mdecorde
29 728 mdecorde
Section !Required
30 728 mdecorde
  SectionIn RO
31 728 mdecorde
SectionEnd
32 728 mdecorde
33 728 mdecorde
Section "Group 1 - Option 1" g1o1
34 728 mdecorde
SectionEnd
35 728 mdecorde
36 728 mdecorde
Section /o "Group 1 - Option 2" g1o2
37 728 mdecorde
SectionEnd
38 728 mdecorde
39 728 mdecorde
Section /o "Group 1 - Option 3" g1o3
40 728 mdecorde
SectionEnd
41 728 mdecorde
42 728 mdecorde
Section "Group 2 - Option 1" g2o1
43 728 mdecorde
SectionEnd
44 728 mdecorde
45 728 mdecorde
Section /o "Group 2 - Option 2" g2o2
46 728 mdecorde
SectionEnd
47 728 mdecorde
48 728 mdecorde
Section /o "Group 2 - Option 3" g2o3
49 728 mdecorde
SectionEnd
50 728 mdecorde
51 728 mdecorde
;--------------------------------
52 728 mdecorde
53 728 mdecorde
; Functions
54 728 mdecorde
55 728 mdecorde
; $1 stores the status of group 1
56 728 mdecorde
; $2 stores the status of group 2
57 728 mdecorde
58 728 mdecorde
Function .onInit
59 728 mdecorde
60 728 mdecorde
  StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default
61 728 mdecorde
  StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default
62 728 mdecorde
63 728 mdecorde
FunctionEnd
64 728 mdecorde
65 728 mdecorde
Function .onSelChange
66 728 mdecorde
67 728 mdecorde
  !insertmacro StartRadioButtons $1
68 728 mdecorde
    !insertmacro RadioButton ${g1o1}
69 728 mdecorde
    !insertmacro RadioButton ${g1o2}
70 728 mdecorde
    !insertmacro RadioButton ${g1o3}
71 728 mdecorde
  !insertmacro EndRadioButtons
72 728 mdecorde
73 728 mdecorde
  !insertmacro StartRadioButtons $2
74 728 mdecorde
    !insertmacro RadioButton ${g2o1}
75 728 mdecorde
    !insertmacro RadioButton ${g2o2}
76 728 mdecorde
    !insertmacro RadioButton ${g2o3}
77 728 mdecorde
  !insertmacro EndRadioButtons
78 728 mdecorde
79 728 mdecorde
FunctionEnd