- NSIS Discussion
- Modifying my finish page.
Archive: Modifying my finish page.
mgillespie
24th July 2005 20:02 UTC
Modifying my finish page.
I need to modify my finish page. I having some problems thou..
at the start of my script, I define that I want to call a custom pre page, before showing the finish page.
!define MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT PreFinishPage !insertmacro MUI_PAGE_FINISH
>
I then have my PreFinishPage function to modify the iospecial.ini file to add my extras..
FunctionEnd
>
The problem is, the checkbox ONLY appears when I move the mouse over it (repaint problem), and it's background is ugly grey. The repaint problem, I think, is because field 3 of the iospecial.ini is too big (bottom = 185), which I why I try to attempt to shorten it in my code.
If I open the temp plugin folder during install. I can see it's added my extra field, (field 4), but field 3 bottom is still the 185 value..
Afrow UK
25th July 2005 00:43 UTC
Maybe Modern UI is overwriting your value. Try searching Contrib\Modern UI\System.nsh for 185 and (temporarily) replace it.
-Stu
glory_man
25th July 2005 12:25 UTC
Try to modify ini-file in PRE function (!define MUI_PAGE_CUSTOMFUNCTION_PRE PreFinishPage).
From docs:
MUI_WELCOMEFINISHPAGE_CUSTOMFUNCTION_INIT function
This Init function is called before the InstallOptions INI file for the page is written, so you can use it to initialize any variables used in the page settings.
I think this the reason of that data do not changed (135 is replaced on 185).
And what for to add new fields? You can use MUI_FINISHPAGE_RUN checkbox.
mgillespie
26th July 2005 19:00 UTC
Thanks, using MUI_PAGE_CUSTOMFUNCTION_PRE fixed the appearing item (redraw) problem.
I just have the grey border problem to fix now....
See attached screenshot.
(PS I am adding more end page items, so I cannot just use the build in MUI_FINISHPAGE_RUN, I am getting it working for 1 to start with, adding the others later...)
kichik
26th July 2005 21:24 UTC
Set its background using SetCtlColors in the show callback function of the page.
Tang
4th August 2006 09:45 UTC
About :!define MUI_PAGE_CUSTOMFUNCTION_PRE PreSetIni
i had DBPassword.ini file modified in my preSetIni function but it doesen't work ,Why? And i also do it as below:
Function .onInit
InitPluginsDir
File /oname=$PLUGINSDIR\DBPassword.ini "DBPassword.ini"
File /oname=$PLUGINSDIR\location.ini "location.ini"
FunctionEnd
...
pls help me! thx in advance!
mayPol
13th September 2006 08:59 UTC
Originally posted by mgillespie
Thanks, using MUI_PAGE_CUSTOMFUNCTION_PRE fixed the appearing item (redraw) problem.
Hi,
I have the appearing problem too even though I use the MUI_PAGE_CUSTOMFUNCTION_PRE. In my case I have a link, which defined as follow:
!define MUI_PAGE_CUSTOMFUNCTION_PRE FinishPre
!define MUI_FINISHPAGE_LINK ""
!define MUI_FINISHPAGE_LINK_LOCATION ""
Function FinishPre
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "State" "http://www.google.com"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "Click to Brows"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "121"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "316"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "109"
!insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "120"
FunctionEnd
When I look in the "ioSpecial.ini", it is updated, so why the link cannot be seen?
Thanks,
May
kichik
15th September 2006 10:36 UTC
You must also set NumFields in [Settings].
4
>
Theresias
27th May 2007 05:13 UTC
Thanks for the "tutorial", but I do have one question. At which point should I check the button/checkbox state (i.e. to start my 2nd program)? I was trying ".onInstSuccess", but that seems to be too late...
Afrow UK
27th May 2007 20:49 UTC
Add a section at the end after all other sections with no name.
Stu
Theresias
28th May 2007 02:29 UTC
Sorry, but that doesn't seem to do it. For testing purposes I was just popping up a message box and that did happen before the finishpage.
Afrow UK
28th May 2007 12:23 UTC
Oh I see, for the finish page.
Use:
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE FinishPageLeave
!insertmacro MUI_PAGE_FINISH
Function FinishPageLeave
!insertmacro MUI_INSTALLOPTIONS_READ $R0 "ioSpecial.ini" "Field 4" "State"
StrCmp $R0 0 +2
Exec ...
FunctionEnd
Stu
Theresias
28th May 2007 14:56 UTC
Nice, that did it - thanks!