Archive: Custom page, or not?


Custom page, or not?
Hi,

I'm building an installation script that has three options, A, B and C. A and B show a directory page to select de application destination directory. C has to show a directory page to select the directory where the XXX web application is installed (in Tomcat). The problem is that the directory page has predefined captions to ask the user for the destination directory. Is it possible to change the captions in the MUI_CUSTOMFUNCTION_DIRECTORY_PRE function or: a) I have to make a custom page? b) anything else?

Thank you,

Manel.:)


Use these when you want to change the text (can be used as many times as you like, anywhere you like)
You will need to use these in a custom mui show page function for the dir page.


!insertmacro MUI_INNERDIALOG_TEXT 1041 "Data Destination Folder"
!insertmacro MUI_INNERDIALOG_TEXT 1019 "$INSTDIR\Data"
!insertmacro MUI_INNERDIALOG_TEXT 1006 "Setup will install \
${MUI_PRODUCT} - Data Files in the following folder.$\r$\n$\r$\n\
To install in a different folder, click Browse and select \
another folder. Click Install to start the installation."


This is the easiest way to do it.
I got this example straight from the nsi script that Vytautas made in this topic here

Thanks Vytautas!

-Stu :)

Note:

You should also change the text for the first directory dialog since it tell you to click 'Install' button, but there is no install button on this page since the second page comes after it.

Vytautas


MUI_CUSTOMFUNCTION_DIRECTORY_SHOW
Well, thank you for the answers. I've tried to define a MUI_CUSTOMFUNCTION_DIRECTORY_SHOW function. Then, within the function I check if selected option is C and then I change the directory dialog texts. Now I'm trying to find all the texts that I have to change, but it seems to work fine.

Manel.:up:


Hi again,

This is a sample of
MUI_CUSTOMFUNCTION_DIRECTORY_SHOW
function that solves more or less my problem:

Function showDirectoryPage
Push $0

; Look if selection is C
SectionGetFlags ${C} $0
IntCmp $0 ${SF_SELECTED} option_c 0 0
StrCpy $INSTDIR "$PROGRAMFILES\${MUI_PRODUCT}"
Goto done
option_c:
Call getApacheTomcatPath
Pop $R1
StrCpy $R1 "$R1\webapps"
StrCpy $INSTDIR "$R1"
!insertmacro MUI_HEADER_TEXT "Select path of web app ${WEB_APP}" "Select the path where ${WEB_APP} web app is installed"
!insertmacro MUI_INNERDIALOG_TEXT 1041 "${WEB_APP} web app dir"
!insertmacro MUI_INNERDIALOG_TEXT 1019 "$R1"
!insertmacro MUI_INNERDIALOG_TEXT 1006 "Select the directory where ${WEB_APP} web app is installed"
done:
Pop $0
FunctionEnd

Best regards,

Manel :)