Archive: Second directory page - problems


Second directory page - problems
I would like to define a second directory page for my setup

I wrote following:

!define MUI_CUSTOMPAGECOMMANDS
!define MUI_DIRECTORYPAGE
!define MUI_CUSTOMFUNCTION_DIRECTORY_SHOW DirectoryShow

!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_DIRECTORY

Function .onInit

StrCpy $9 "0"

FunctionEnd

Function DirectoryShow

MessageBox MB_OK|MB_ICONQUESTION $9 ; never called !!!

StrCmp $9 "0" AppDirectoryPage
StrCmp $9 "1" DataDirectoryPage

AppDirectoryPage:

StrCpy $9 "1"
Goto EndDirectoryShow

DataDirectoryPage:

StrCpy $9 "2"
!insertmacro MUI_HEADER_TEXT "Choose Data Location" "Choose the folder in which to install ${INSTALLERNAMESHORT} - Data Files."
!insertmacro MUI_INNERDIALOG_TEXT 1041 "Data Destination Folder"
!insertmacro MUI_INNERDIALOG_TEXT 1019 "$INSTDIR\Data\"
!insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install ${INSTALLERNAMESHORT} - Data Files in the following folder.$\r$\n$\r$\nTo install in a different folder, click Browse and select another folder. Click Install to start the installation."

EndDirectoryShow:

FunctionEnd

My problem is that DirectoryShow is never called. Why? What is missing in the code?


It's MUI_PAGE_CUSTOMFUNCTION_SHOW, not MUI_CUSTOMFUNCTION_DIRECTORY_SHOW. Plus, you shouldn't define MUI_CUSTOMPAGECOMMANDS or MUI_DIRECTORYPAGE. Follow the readme, don't get defines from System.nsh.