cosmic66
3rd October 2003 15:06 UTC
MUI_STARTMENU_CUSTOMFUNCTION_PRE does not work
Hi,
I am using MakeNSIS v2.0b4 (CVS) and try to use the prefunction
to not display the startmenu page (MUI), but the prefunction is
never called.
<snip>
!define MUI_STARTMENUPAGE
!define MUI_STARTMENU_CUSTOMFUNCTION_PRE "DoNotDisplay"
[...]
Function DoNotDisplay
MessageBox MB_OK "Called"
[...]
FunctionEnd
<snip>
When compiling the skript I get the following warning:
1 warning:
install function "DoNotDisplay" not referenced
The function "DoNoDisplay" is not called.
What am I doing wrong?
Thanks,
Barbara
MathiasSimmack
3rd October 2003 15:25 UTC
Do it this way:
!define MUI_PAGE_CUSTOMFUNCTION_PRE "onSMInit"
!insertmacro MUI_PAGE_STARTMENU
; ...
Function onSMInit
; ...
FunctionEnd
Mathias.
cosmic66
3rd October 2003 15:36 UTC
Thanks, that did the trick :)
For those who are interested, it is possible to use the
same function as prefunction for different pages:
<snip>
!define MUI_PAGE_CUSTOMFUNCTION_PRE "DoNotDisplay"
!insertmacro MUI_PAGE_DIRECTORY
!define MUI_PAGE_CUSTOMFUNCTION_PRE "DoNotDisplay"
!insertmacro MUI_PAGE_STARTMENU
Function DoNotDisplay
;check for conditions
FunctionEnd
<snip>