zimsms
13th July 2004 15:15 UTC
Customfunction_Pre on a custome page?
Hello,
Am I missing something? Can I not use a custom pre function on a custom page?
insertmacro MUI_PAGE_CUSTOMFUNCTION_PRE SetupDefault_LanguageStrings
Page custom SetupDefault
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_PAGE_FINISH
>
Of course I have the functions defined correctly...and the include of mui.nsh.
I get the error message:
!insertmacro: MUI_PAGE_CUSTOMFUNCTION_PRE
!insertmacro: macro named "MUI_PAGE_CUSTOMFUNCTION_PRE" not found!
Error in script "script"
Nevermind, Ignore. !insertmacro should be !define.....oops
zimsms
13th July 2004 16:32 UTC
ok,
I give up. How do you specify a custom_pre and a custum_leave function for a custom page?
if i do this:
define MUI_PAGE_CUSTOMFUNCTION_PRE SetupDefault_LanguageStrings
>!define MUI_PAGE_CUSTOMFUNCTION_LEAVE SetupDefault_GetState
Page custom SetupDefault
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_PAGE_FINISH
>
the custom functions get called on the instfiles page and not the custom page.....
How do I define custom functions for a custom page?
NSIS v2.0.
zimsms
13th July 2004 16:37 UTC
n/m damn...where's Data when you need him....
scully13
13th July 2004 19:24 UTC
Shouldn't it be like this?:
define MUI_PAGE_CUSTOMFUNCTION_PRE SetupDefault_LanguageStrings
>!define MUI_PAGE_CUSTOMFUNCTION_SHOW SetupDefault
>!define MUI_PAGE_CUSTOMFUNCTION_LEAVE SetupDefault_GetState
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_PAGE_FINISH
>
If your pre function is just going to set up your strings then I would include that in your show function anyway. Then I generally write the function like this:
Page custom CustomPageSomething LeaveCustomPageSomething
>!insertmacro MUI_PAGE_INSTFILES
>!insertmacro MUI_PAGE_FINISH
>
Which I think is the old way.
zimsms
13th July 2004 20:35 UTC
Well I got it working this way:
Page custom "MyPreAndShowFunc" "MyLeaveFunc"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
Thanks!