emphasize that section_idx is a !define
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4786 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
e17450b16b
commit
737da25610
1 changed files with 27 additions and 1 deletions
|
@ -24,7 +24,7 @@ Tells the installer that the current section needs an additional "size_kb" kilob
|
|||
|
||||
\c [/o] [([!]|[-])section_name] [section_index_output]
|
||||
|
||||
Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a hidden section and the user will not have the option of disabling it. If the section name is 'Uninstall' or is prefixed with 'un.', then it is a an uninstaller section. If \e{section_index_output} is specified, the parameter will be !defined with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the section name begins with a !, the section will be displayed as bold. If the /o switch is specified, the section will be unselected by default.
|
||||
Begins and opens a new section. If section_name is empty, omitted, or begins with a -, then it is a hidden section and the user will not have the option of disabling it. If the section name is 'Uninstall' or is prefixed with 'un.', then it is a an uninstaller section. If \e{section_index_output} is specified, the parameter will be \R{define}{!defined} with the section index (that can be used for \R{sectionsettext}{SectionSetText} etc). If the section name begins with a !, the section will be displayed as bold. If the /o switch is specified, the section will be unselected by default.
|
||||
|
||||
\c Section "-hidden section"
|
||||
\c SectionEnd
|
||||
|
@ -41,6 +41,32 @@ Begins and opens a new section. If section_name is empty, omitted, or begins wit
|
|||
\c Section "install something" SEC_IDX
|
||||
\c SectionEnd
|
||||
|
||||
To access the section index, curly brackets must be used and the code must be located below the section in the script.
|
||||
|
||||
\c Section test1 sec1_id
|
||||
\c SectionEnd
|
||||
\c
|
||||
\c Section test2 sec2_id
|
||||
\c SectionEnd
|
||||
\c
|
||||
\c Function .onInit
|
||||
\c SectionGetText ${sec2_id} $0
|
||||
\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will correctly display 'name of 1: test2'
|
||||
\c FunctionEnd
|
||||
|
||||
\c Function .onInit
|
||||
\c SectionGetText ${sec2_id} $0
|
||||
\c MessageBox MB_OK "name of ${sec2_id}:$\n$0" # will incorrectly display 'name of ${sec2_id}: test1'
|
||||
\c # plus a warning stating:
|
||||
\c # unknown variable/constant "{sec2_id}" detected, ignoring
|
||||
\c FunctionEnd
|
||||
\c
|
||||
\c Section test1 sec1_id
|
||||
\c SectionEnd
|
||||
\c
|
||||
\c Section test2 sec2_id
|
||||
\c SectionEnd
|
||||
|
||||
\S2{ssectionend} SectionEnd
|
||||
|
||||
This command closes the current open section.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue