Hola,
I'm trying to create a MUI installer with muliple uninstall sections. I can't seem to get the uninstall section description text to show up on uninstall sections. Here's my test script (below) which is just a mod of InstallOptions.nsi. This looks like a bug to me. Can anybody make this work?
cheers
;---------------------
;Include Modern UI
!include "MUI.nsh"
;--------------------------------
;General
;Name and file
Name "Modern UI Test 0.1"
OutFile "InstallOptions.exe"
;Default installation folder
InstallDir "$PROGRAMFILES\Modern UI Test"
;Get installation folder from registry if available
InstallDirRegKey HKCU "Software\Modern UI Test" ""
;--------------------------------
;Pages
!insertmacro MUI_PAGE_LICENSE "${NSISDIR}\Docs\Modern UI\License.txt"
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_COMPONENTS
!insertmacro MUI_UNPAGE_INSTFILES
;Language strings
LangString DESC_Section1 ${LANG_ENGLISH} "First uninstall section."
LangString DESC_Section2 ${LANG_ENGLISH} "Second uninstall section."
;Assign language strings to sections
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${Section1} $(DESC_Section1)
!insertmacro MUI_DESCRIPTION_TEXT ${Section2} $(DESC_Section2)
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END
;--------------------------------
;Interface Settings
!define MUI_ABORTWARNING
;--------------------------------
;Languages
!insertmacro MUI_LANGUAGE "English"
;--------------------------------
;Installer Sections
Section "Dummy Section" SecDummy
DetailPrint "this really does not install anything except the uninstaller"
SetOutPath "$INSTDIR"
;Create uninstaller
WriteUninstaller "$INSTDIR\Uninstall.exe"
SectionEnd
;--------------------------------
;Uninstaller Sections
Section un.Section1
DetailPrint "This actually does nothing for section 1"
SectionEnd
Section un.Section2
;ADD YOUR OWN FILES HERE...
DetailPrint "Removes folder and uninstaller for section 2"
Delete "$INSTDIR\Uninstall.exe"
RMDir "$INSTDIR"
SectionEnd
multiple uninstall sections with MUI
6 posts
Move the descriptions below the sections.
You should check the makensis compiler output more often as well. No doubt you'd have warnings for this.
-Stu
-Stu
I can't get the script in my earlier post to show my descriptions in the uninstaller sections no matter where I put the descriptions. Also, I get this warning message when the script is compiled:
2 warnings:
unknown variable/constant "{Section1}" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:5)
unknown variable/constant "{Section2}" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:5)
Any other ideas?
Thanks!
2 warnings:
unknown variable/constant "{Section1}" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:5)
unknown variable/constant "{Section2}" detected, ignoring (macro:MUI_DESCRIPTION_TEXT:5)
Any other ideas?
Thanks!
Ah I see...
Section un.Section1 must be:
Section un.Section1 Section1
and...
Section un.Section2 must be:
Section un.Section2 Section2
-Stu
Section un.Section1 must be:
Section un.Section1 Section1
and...
Section un.Section2 must be:
Section un.Section2 Section2
-Stu
Afrow UK,
Thanks, the combination of Joost's suggestion of putting the description below the uninstall section plus your suggestion fixed the problem!
Thanks!
Thanks, the combination of Joost's suggestion of putting the description below the uninstall section plus your suggestion fixed the problem!
Thanks!