Archive: Have variables in the MUI Finish page


Have variables in the MUI Finish page
I have a detection routine in place to verify the version of DirectX that a user has during the installation.

The problem is that the program requires a file from the August release of the SDK version of DirectX 9.0c in order to work correctly. I have the link to Microsoft's website in order to accomplish this, but I realize that there is every indication that the version of DirectX will change with the upcoming release of Vista.

I originally planned to put a link in the Finishpage using the "MUI_FINISHPAGE_SHOWREADME" command, but have it change dependant on if the user has DX9.0c, a previous version, or a more advanced version. In the case of DX9.0b or below, it will link to the full installation of DX9.0c august2005 release, in the case of DX9.0c, it will link to the update file, and in the case of a more advanced version, not show a link at all, or offer to auto-run the program.

I intended to abuse the finishpage because since I am sending the user to an external link, I do not want to confuse the user during the installation, instead force the "popup" to appear after the installation has completed. Is this possible, or should I attempt to do this in another way?

Thanks for the help.


Function PageFinish
<Your Code here>
FunctionEnd

!define MUI_PAGE_CUSTOMFUNCTION_PRE "PageFinish"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW ShowFinish
!insertmacro MUI_PAGE_FINISH


you can do that to add things to the welcome/finish page

So you would just have to check a variable with the version and write the correct link that you want. and then it will update the finish page before it calls it.

you can do
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "NumFields" "4"


to write to the pages INI file. just change "Settings" "NumFields" "4" to what you want.

You can also use variables in the defines for the MUI page. It'd be simpler than editing the INI file in the callback functions. For example:

!define MUI_FINISHPAGE_SHOWREADME "$README"
# ...
StrCpy $README "http://nsis.sf.net/"