deroel
15th March 2005 07:26 UTC
Change setting in finish page
I have this code
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT CheckValues
!insertmacro MUI_PAGE_FINISH
Inside checkvalues function I have these next lines:
!define MUI_FINISHPAGE_SHOWREADME ""
!define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
!define MUI_FINISHPAGE_SHOWREADME_TEXT "Here is the text"
So, I want to add checkbox and its text if the user select specific values, but define intruction doesn't work.
How can i do it?
Thanks...
scully13
15th March 2005 17:10 UTC
I don't believe those settings will work from within the function. The function wouldn't be executed until run time. You need them read in during the compile. Move those 3 defines up above the !insertmacro MUI_PAGE_FINISH and then you can remove the INIT define and CheckValues function completely if it doesn't do anything else.
deroel
15th March 2005 17:14 UTC
But i want to change that settings in run time, so i cannot do it.
How can i change the settings for finish page at run time?
Thanks for the reply
scully13
15th March 2005 18:20 UTC
What exactly do you want to change? The text, which readme to show or possibly not show anything in certain cases?
deroel
15th March 2005 18:33 UTC
By default nothung, then in certain cases, add the checkbox with the text.
scully13
15th March 2005 18:49 UTC
I put together an example for you using the Basic.nsi example script. You will need to change some things around but it will give you the idea. You'll also need to use $2 or another variable that will get set at some point so that it knows if it show show or hide. You could also change the text that shows if you modify the INI file from that function.
Picman
15th March 2005 20:42 UTC
Can you let us know how to change the text in the final page readme checkbox via the "ini"?
scully13
15th March 2005 21:01 UTC
Sure, after checking the documentation I found out that I really needed to add a PRE function to change the text. Here's the same example with the text change added.