Old 23rd June 2007, 05:47   #1
McMate
Junior Member
 
Join Date: Jun 2007
Posts: 1
Question Custom Page location in script and page skipping

Hello. I have two issues with my script that I have spent a fair amount of time into trying to understand but haven't been able to resolve. I would be grateful if some assistance could be provided.

The first issue relates to custom pages. I have defined MUI_PAGE_CUSTOMFUNCTION_LEAVE with the function 'InstallTypeinserted'. It is supposed to run after MUI_PAGE_COMPONENTS to determine whether to skip NavigateDBLocation or not. The idea is that if $1 had the value of '0' then skip the custom page but if $1 was '1' or '2' then essentially not to skip.

It also became apparent to me that I made a generous error in my understanding of the procedure of page loading. What I mean by that I can't work out why I needed to put MUI_PAGE_CUSTOMFUNCTION_LEAVE where it is. I had thought that it in the script it would be like this:

!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "LICENSE AGREEMENT - Records.txt"
!insertmacro MUI_PAGE_COMPONENTS
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE InstallType
Page custom NavigateDBLocation
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

It seems that I was wrong.

The second issue relates to the page skip itself. In the function InstallType, I have been able to demonstrate that the values shown in the message box do in fact correlate to the radiobutton selection that denotes the type of install in MUI_PAGE_COMPONENTS. The bit that I can't get is how to do the actual page skip.

Please find the essence of the script attached, and many thanks for your help.

Timothy
Attached Files
File Type: nsi records-app.nsi (4.1 KB, 120 views)
McMate is offline   Reply With Quote
Old 23rd June 2007, 11:52   #2
Afrow UK
Moderator
 
Afrow UK's Avatar
 
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
To skip the page call Abort in the custom page's Show function.

Also, to define a custom pre, show or leave function for MUI pages the define must come before not after the page insertion.

Stu
Afrow UK 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