humgut
17th October 2002 21:56 UTC
How do I conditionally invoke InstallOptions dialogs using Modern UI script/macros?
Hi,
I just got the latest CVS snapshot. As an NSIS neophyte, I find the Modern UI macros and example scripts are much improved since 2.0a7. :up:
I want to make the invocation of one or more InstallOptions dialogs conditional on whether a specific optional component has been selected by the user. The sample InstallOptions.nsi script provides a great template for deploying InstallOptions, but I'm not sure what the cleanest approach to conditional invocation would be.
Any assistance greatly appreciated.
Joost Verburg
17th October 2002 22:28 UTC
You can skip the IO page in the SetPage function. Insert MUI_INSTALLOPTIONS_NEXT where the page should be skipped.
Example:
StrCmp $SOMEVAR somevalue skip
!insertmacro MUI_INSTALLOPTIONS_SHOW 6 "ioC.ini" "" "" ;Next/previous pages are NO IO pages
Goto noskip
skip:
!insertmacro MUI_INSTALLOPTIONS_NEXT
noskip:
pcristip
21st March 2003 10:15 UTC
Joost can you tell me how I should accomplish this in v2.0b3 ?
I tried your suggestion but it seems that MUI_INSTALLOPTIONS_NEXT is not defined in system.nsh and makensis gives an error.
An complete example of a conditional InstallOptions page would be nice :D
Regards,
Chris
kichik
21st March 2003 11:50 UTC
SetCustomB
StrCmp $SOMEVAR somevalue skip
!insertmacro MUI_HEADER_TEXT "$(TEXT_IO_TITLE)" "$(TEXT_IO_SUBTITLE)"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioB.ini"
skip:
>FunctionEnd
>