jammusi
28th December 2009 21:57 UTC
.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
jammusi
29th December 2009 12:19 UTC
this is not supported with v2 and above
{_trueparuex^}
29th December 2009 12:58 UTC
.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
jammusi
29th December 2009 14:09 UTC
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?
MSG
29th December 2009 14:42 UTC
Use the welcome's Leave function?
jammusi
29th December 2009 15:18 UTC
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!
MSG
29th December 2009 16:01 UTC
{_trueparuex^} just told you how to do it...
jammusi
29th December 2009 16:22 UTC
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
jammusi
29th December 2009 20:01 UTC
Ok guys.
I figured this out.
Thanks a lot ;-)