Archive: Need help with NSIS 2.34 warning


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!

What script caused that?


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
>

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.


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:
http://sourceforge.net/tracker/index...49&atid=373085

Keep up the good work!

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.


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?

It'll be written and read for you, only if you use MUI_STARTMENU_WRITE_BEGIN and MUI_STARTMENU_WRITE_END.