Hi
i need to add a desctiption text for install components to display in the Description Field.
If anyone could show a short sample script to do this it wold be very helpful.
Many thanks in advance.
Zach
How to add a description text for a component
7 posts
There are tonnes of example scripts in the Examples folder which show you how to do this.
-Stu
-Stu
Hi,
yeah thats true. Meanwhile i found a way to solve it.
Again thanks for your reply.
Cheers.
Zach
yeah thats true. Meanwhile i found a way to solve it.
Again thanks for your reply.
Cheers.
Zach
how did you get it to work? I couldn't find any examples.
thanks in advance
Stephen
thanks in advance
Stephen
Search examples in 'C:\Program Files\NSIS\Examples', like 'InstallOptions.nsi'. The commands are like, MUI_FUNCTION_DESCRIPTION_BEGIN, MUI_DESCRIPTION_TEXT, SectionSetText, etc.
The descriptions of sections will be displayed on the components page, when the user hovers the mouse over a section. If you don't want to use descriptions, use the MUI_COMPONENTSPAGE_NODESC interface setting.
To set a description for a section, you have to add an additional parameter to the Section commmand with a name for the define that should contain the section number.
Section "Section Name 1" Section1
...
SectionEnd
Use these macros to set the descriptions:
LangString DESC_Section1 ${LANG_ENGLISH} "Description of section 1."
LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.
To set a description for a section, you have to add an additional parameter to the Section commmand with a name for the define that should contain the section number.
Section "Section Name 1" Section1
...
SectionEnd
Use these macros to set the descriptions:
LangString DESC_Section1 ${LANG_ENGLISH} "Description of section 1."
LangString DESC_Section2 ${LANG_ENGLISH} "Description of section 2."
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_FUNCTION_DESCRIPTION_END
For the uninstaller, use the MUI_UNFUNCTION_DESCRIPTION_BEGIN and MUI_UNFUNCTION_DESCRIPTION_END macros.
I found it, thanks!