Archive: Page order problem


Page order problem
Here is my pages definition.

!insertmacro MUI_PAGE_LICENSE $(myLicenseData)
!define MUI_PAGE_CUSTOMFUNCTION_PRE predriver
Page custom driver postdriver
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE componentsLeave
!insertmacro MUI_PAGE_COMPONENTS
Page custom SelectFolders ValidateFolders
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_STARTMENU "Application" $SHORTCUT_FOLDER
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE shortcutsLeave
!insertmacro MUI_PAGE_FINISH


My problem is that "driver" is called just before "predriver" and I don't understand why.
I still can change it like this:

!define MUI_PAGE_CUSTOMFUNCTION_LEAVE predriver
!insertmacro MUI_PAGE_LICENSE $(myLicenseData)
Page custom driver postdriver
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE componentsLeave
!insertmacro MUI_PAGE_COMPONENTS
Page custom SelectFolders ValidateFolders
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_STARTMENU "Application" $SHORTCUT_FOLDER
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE shortcutsLeave
!insertmacro MUI_PAGE_FINISH

but I would like to understand what is wrong with my fisrt try...
Any idea ?


Maybe the doc is clear:

These defines should be set before inserting a page macro.

MUI_PAGE_CUSTOMFUNCTION_PRE function
MUI_PAGE_CUSTOMFUNCTION_SHOW function
MUI_PAGE_CUSTOMFUNCTION_LEAVE function

yes but in my case I have this:

!define MUI_PAGE_CUSTOMFUNCTION_PRE predriver
Page custom driver postdriver
followed by
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE componentsLeave
!insertmacro MUI_PAGE_COMPONENTS

So I can not do th following:

MUI_PAGE_CUSTOMFUNCTION_PRE predriver
MUI_PAGE_CUSTOMFUNCTION_SHOW driver
MUI_PAGE_CUSTOMFUNCTION_LEAVE postdriver
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE componentsLeave
!insertmacro MUI_PAGE_COMPONENTS


Read again:

These defines should be set before inserting a page macro.

MUI_PAGE_CUSTOMFUNCTION_PRE function
MUI_PAGE_CUSTOMFUNCTION_SHOW function
MUI_PAGE_CUSTOMFUNCTION_LEAVE function
Page Custom isn't a page macro. It's an NSIS instruction.
If you want to call the predriver functon before showing your custom page, then put Call predriver before the InstallOptions display call.

-Stu