Archive: Install structure question


Install structure question
I have an installer which I used as a basis for my design some time ago (3-4 yrs ago). I get some warnings and unexpected behavior, hopefully someone can make some suggestions for a good architecture. I think I originally swiped it from Firefox, but I could be way off.

Pseudocode here:

install.nsi
in the beginning, set a few of !defines for version, etc
!include "${SCRIPTDIR}${SCRIPTNAME}.conf.nsh" <- a bunch of !defines get set here

Icon "setup.ico"
UninstallIcon "uninstall.ico"
!define MUI_ICON "setup.ico"
!define MUI_UNICON "uninstall.ico"

!include "${SCRIPTDIR}${SCRIPTNAME}.macros.nsh" <- not much in here, only three macros

;logger hack
!macro Logger What
!ifdef NSIS_CONFIG_LOG
LogSet "${What}"
!endif
!macroend

!macro Log What
!ifdef NSIS_CONFIG_LOG
LogText "${What}"
!endif
!macroend

!define MUI_BrandingText "${PRODUCT} Installer v${SCRIPTVERSION}"

!define MUI_WELCOMEPAGE
!ifdef LICENSEFILE
!define MUI_LICENSEPAGE
LicenseData "${LICENSEFILE}"
!endif
!define MUI_COMPONENTSPAGE
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_DIRECTORYPAGE
!define MUI_FINISHPAGE
!define MUI_FINISHPAGE_RUN "$INSTDIR\${EXE}"
!define MUI_FINISHPAGE_NOREBOOTSUPPORT

!define MUI_ABORTWARNING

!define MUI_UNINSTALLER
!define MUI_UNCONFIRMPAGE

OutFile "${OUTDISK}${OUTDIR}${OUTFILE}"
SetOverwrite on
InstallDir "c:\foobar\${NAME}"
InstallDirRegKey HKLM "Software\${BRAND}\${NAME}" "InstallDir"
AutoCloseWindow false
ShowInstDetails nevershow
ShowUninstDetails show

!include "${SCRIPTDIR}${SCRIPTNAME}.${LANG}.nsh"
!insertmacro MUI_LANGUAGE "${LANG}"
Caption "${PRODUCT} Install Wizard"

Section "${NAME_SecCopy}" SecCopy
...
stuff
...
SectionEnd

SubSection /e "${NAME_SecAddShortcuts}" SecAddShortcuts
Section "${NAME_SecAddDesktopShortcut}" SecAddDesktopShortcut
...
SectionEnd

Section "${NAME_SecAddStartShortcuts}" SecAddStartShortcuts
...
SectionEnd

Section "${NAME_SecAddQuicklaunchShortcut}" SecAddQuicklaunchShortcut
...
SectionEnd

Section "${NAME_SecAddStartupShortcut}" SecAddStartupShortcut
...
SectionEnd

SubSectionEnd

Section -post
...
SectionEnd


Section Uninstall
...
SectionEnd

!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
!insertmacro MUI_DESCRIPTION_TEXT ${SecCopy} $(DESC_SecCopy)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAddShortcuts} $(DESC_SecAddShortcuts)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAddDesktopShortcut} \
$(DESC_SecAddDesktopShortcut)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAddStartShortcuts} \
$(DESC_SecAddStartShortcuts)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAddQuicklaunchShortcut} \
$(DESC_SecAddQuicklaunchShortcut)
!insertmacro MUI_DESCRIPTION_TEXT ${SecAddStartupShortcut} \
$(DESC_SecAddStartupShortcut)
!insertmacro MUI_FUNCTION_DESCRIPTION_END

!include "${SCRIPTDIR}${SCRIPTNAME}.functions.nsh"


Also, what is missing that causes:
Variable "MUI_TEXT" not referenced or never set, wasting memory!

I had someone post a suggestion regarding the description within the section. Am I not doing that?