Archive: .onNextPage not called


.onNextPage not called
Hi,

Using NSIS v2.4.6
Check the short nsi below.

The callback function .onNextPage not being called.

Can explain why?

tx



;--------------------------------
;Include Modern UI

!include "MUI2.nsh"
!include "logiclib.nsh"

Var install_button_text
Var welcome_title
Var welcome_text

;--------------------------------
;General

;Name and file
Name "Call back test"
OutFile "Test1.exe"

;Default installation folder
InstallDir "c:\temp"

;--------------------------------
;Interface Settings

!define MUI_ABORTWARNING

;--------------------------------
;Pages

!insertmacro MUI_PAGE_WELCOME

!insertmacro MUI_PAGE_COMPONENTS
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES

!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

;--------------------------------
;Languages

!insertmacro MUI_LANGUAGE "English"

;--------------------------------
;Installer Sections
Section "Install"

SectionEnd
;--------------------------------
;Uninstaller Section

Section "Uninstall"

;ADD YOUR OWN FILES HERE...

Delete "$INSTDIR\Uninstall.exe"

RMDir "$INSTDIR"

DeleteRegKey /ifempty HKCU "Software\Modern UI Test"

SectionEnd


Function .onNextPage
MessageBox MB_OK ".onNextPage"

FunctionEnd


this is not supported with v2 and above


.onNextPage is an old NSIS 1.x callback function and it's no longer used in NSIS 2.x. In NSIS 2.x use the page callbacks.

Example:

...
Page components "" "" componentsLeave
...

Function componentsLeave
MessageBox MB_OK "componentsLeave"

FunctionEnd


Same code with MUI:
...
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE componentsLeave
!insertmacro MUI_PAGE_COMPONENTS
...

Function componentsLeave
MessageBox MB_OK "componentsLeave"

FunctionEnd


PaR

Thanks mate.

As i understand it is not supported for the welcome page.
What i need though is force reboot after welcome.

How can i do that?


Use the welcome's Leave function?


How to do that?

The following line is not being compiled:

!insertmacro MUI_PAGE_WELCOME "" "" WelcomeAfterLeave

The error is:

!insertmacro: macro "MUI_PAGE_WELCOME" requires 0 parameter(s), passed 3!


{_trueparuex^} just told you how to do it...


thanks - but apparently i didn't understand what u mean. If it helps - I am new to NSIS.
What I did is what i thought you meant - plus what I read in the NSIS help file being installed with the NSIS 2.4.6.

Can you be please more specific. What is the welcome's leave function?
Just address me where I can read about that.
Just to be clear - is it supported with the welcome MUI page?

Tx

Jammusi


Ok guys.
I figured this out.

Thanks a lot ;-)