Statistiques
| Révision :

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

Historique | Voir | Annoter | Télécharger (1,55 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 2956 mdecorde
Page Components
24 2956 mdecorde
Page InstFiles
25 728 mdecorde
26 728 mdecorde
;--------------------------------
27 728 mdecorde
28 728 mdecorde
; Sections
29 728 mdecorde
30 728 mdecorde
Section !Required
31 728 mdecorde
  SectionIn RO
32 728 mdecorde
SectionEnd
33 728 mdecorde
34 728 mdecorde
Section "Group 1 - Option 1" g1o1
35 728 mdecorde
SectionEnd
36 728 mdecorde
37 728 mdecorde
Section /o "Group 1 - Option 2" g1o2
38 728 mdecorde
SectionEnd
39 728 mdecorde
40 728 mdecorde
Section /o "Group 1 - Option 3" g1o3
41 728 mdecorde
SectionEnd
42 728 mdecorde
43 728 mdecorde
Section "Group 2 - Option 1" g2o1
44 728 mdecorde
SectionEnd
45 728 mdecorde
46 728 mdecorde
Section /o "Group 2 - Option 2" g2o2
47 728 mdecorde
SectionEnd
48 728 mdecorde
49 728 mdecorde
Section /o "Group 2 - Option 3" g2o3
50 728 mdecorde
SectionEnd
51 728 mdecorde
52 728 mdecorde
;--------------------------------
53 728 mdecorde
54 728 mdecorde
; Functions
55 728 mdecorde
56 728 mdecorde
; $1 stores the status of group 1
57 728 mdecorde
; $2 stores the status of group 2
58 728 mdecorde
59 728 mdecorde
Function .onInit
60 728 mdecorde
61 728 mdecorde
  StrCpy $1 ${g1o1} ; Group 1 - Option 1 is selected by default
62 728 mdecorde
  StrCpy $2 ${g2o1} ; Group 2 - Option 1 is selected by default
63 728 mdecorde
64 728 mdecorde
FunctionEnd
65 728 mdecorde
66 728 mdecorde
Function .onSelChange
67 728 mdecorde
68 728 mdecorde
  !insertmacro StartRadioButtons $1
69 728 mdecorde
    !insertmacro RadioButton ${g1o1}
70 728 mdecorde
    !insertmacro RadioButton ${g1o2}
71 728 mdecorde
    !insertmacro RadioButton ${g1o3}
72 728 mdecorde
  !insertmacro EndRadioButtons
73 2956 mdecorde
74 728 mdecorde
  !insertmacro StartRadioButtons $2
75 728 mdecorde
    !insertmacro RadioButton ${g2o1}
76 728 mdecorde
    !insertmacro RadioButton ${g2o2}
77 728 mdecorde
    !insertmacro RadioButton ${g2o3}
78 728 mdecorde
  !insertmacro EndRadioButtons
79 2956 mdecorde
80 728 mdecorde
FunctionEnd