Old 20th May 2003, 15:27   #1
mzaera
Junior Member
 
Join Date: May 2003
Posts: 7
Question 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.
mzaera is offline   Reply With Quote
Old 20th May 2003, 15:45   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
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.
code:

!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
Afrow UK is offline   Reply With Quote
Old 21st May 2003, 05:08   #3
Vytautas
Major Dude
 
Vytautas's Avatar
 
Join Date: May 2003
Location: Victoria, Australia
Posts: 643
Send a message via ICQ to Vytautas
Thumbs up

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
Vytautas is offline   Reply With Quote
Old 21st May 2003, 08:12   #4
mzaera
Junior Member
 
Join Date: May 2003
Posts: 7
Lightbulb 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.
mzaera is offline   Reply With Quote
Old 21st May 2003, 10:44   #5
mzaera
Junior Member
 
Join Date: May 2003
Posts: 7
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
mzaera is offline   Reply With Quote
Reply
Go Back   Winamp & Shoutcast Forums > Developer Center > NSIS Discussion

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump