!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FunctionName ...all I want, but if I'm using it to change the header text controls $mui.Header.Text and $mui.Header.SubText, then MUI2 is going to happily override that change with its internal code; it calls the custom function first, and runs its own code second.Shouldn't that be the other way around?
( The same actually applies to the Pre function as well and probably applies to other pages. )
Because MUI uses defines to set those texts, I can't override them during runtime in order to get MUI to use my own strings either. Nor can I cheat by using 'goto mui.endheader_done' because it calls a Function - from which that won't work 😁
As far as I can tell - at least in the case of the InstFiles page - there's no harm in swapping the order either.
Thoughts?
Sample script:
!include "MUI2.nsh"
!include "winmessages.nsh"
outfile "test.exe"
ShowInstDetails show
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstFilesLeave
!insertmacro MUI_PAGE_INSTFILES
Section
SectionEnd
Function InstFilesLeave
sendMessage $mui.Header.Text ${WM_SETTEXT} 0 "STR: This doesn't stick"
sendMessage $mui.Header.SubText ${WM_SETTEXT} 0 "STR: ...neither does this"
MessageBox MB_OK "Now it's there... click OK and *poof*"
FunctionEnd
!insertmacro MUI_LANGUAGE "English"