Skip to content
⌘ NSIS Forum Archive

Need help with NSIS 2.34 warning

8 posts

dllmain#

Need help with NSIS 2.34 warning

I get this warning from NSIS 2.34:

Variable "mui.StartMenuPage.Create" not referenced or never set, wasting memory!
"StartMenuPage" is the page id I passed to MUI_PAGE_STARTMENU.

Any ideas what's wrong? Thanks in advance!
dllmain#
Originally posted by kichik
What script caused that?
Here's a minimal example giving this and only this warning.

OutFile not_referenced_case.exe
!include "MUI2.nsh"
var StartMenuFolder
!insertmacro MUI_PAGE_STARTMENU "StartMenuPage" $StartMenuFolder
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_LANGUAGE "English"
Section -dummy
SectionEnd 
kichik#
Well, you don't use MUI_STARTMENU_WRITE_BEGIN, so it's a lacking script. But nonetheless, that warning could be avoided. Submit a bug report and I'll fix it for the next release.
dllmain#
Originally posted by kichik
Well, you don't use MUI_STARTMENU_WRITE_BEGIN, so it's a lacking script.
Interesting, never heard of that before. I found it saves me manually writing $StartMenuFolder to the registry. Does it do anything more? I didn't find any documentation about it.
Is there a similar way to write $INSTALLDIR to the registry automatically?

Originally posted by kichik
But nonetheless, that warning could be avoided. Submit a bug report and I'll fix it for the next release.
Just opened a bug here:


Keep up the good work!
kichik#
It's documented under the MUI documentation. If you define MUI_STARTMENUPAGE_REGISTRY_ROOT, MUI_STARTMENUPAGE_REGISTRY_KEY and
MUI_STARTMENUPAGE_REGISTRY_VALUENAME it will also write the selected value to the specified registry key.
dllmain#
Originally posted by kichik
It's documented under the MUI documentation. If you define MUI_STARTMENUPAGE_REGISTRY_ROOT, MUI_STARTMENUPAGE_REGISTRY_KEY and
MUI_STARTMENUPAGE_REGISTRY_VALUENAME it will also write the selected value to the specified registry key.
Hm, I had that without MUI_STARTMENU_WRITE_BEGIN before and nothing was written to registry.


On $INSTDIR again: I have to manually write it to the registry?
kichik#
It'll be written and read for you, only if you use MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END.