- NSIS Discussion
- MUI_FINISHPAGE in modern.exe ?
Archive: MUI_FINISHPAGE in modern.exe ?
Huette
14th April 2005 15:50 UTC
MUI_FINISHPAGE in modern.exe ?
I want to customize the MUI_FINISHPAGE with Resource Hacker, but I can't find the right resource for that dialog. How can I find out where it is, except comparing the dialog-previews in Resource Hacker with my running setup?
Thx
kichik
14th April 2005 18:36 UTC
The finish page is an InstallOptions page, not a normal page found in modern.exe. You can edit ioSpecial.ini in $PLUGINSDIR in the pre function of the welcome and finish page.
Huette
15th April 2005 09:19 UTC
hmmm....pre function means?
i can't manage to show that label nor the header_text.
maybe you can tell me what i'm doing wrong.
- first i added a label to the ioSpecial.ini:
[Field 4]
Type=Label
Left=50
Right=86
Top=134
Bottom=142
- then i have to extract the ioSpecial.ini in .onInit-Function?
!insertmacro MUI_INSTALLOPTIONS_EXTRACT "ioSpecial.ini" doesn't work:
"!insertmacro: macro named "MUI_INSTALLOPTIONS_EXTRACT" not found!" ...no idea...
- page custom FinishpageEdit
!insertmacro MUI_PAGE_FINISH
- Function FinishpageEdit
!insertmacro MUI_HEADER_TEXT "Test" "TestSub"
!insertmacro MUI_INSTALLOPTIONS_DISPLAY "ioSpecial.ini"
FunctionEnd
...first edit header_text....if that works own label will follow...
anything missing? !include headerfile?
kichik
15th April 2005 22:53 UTC
pre function means MUI_PAGE_CUSTOMFUNCTION_PRE in this case. See the MUI readme for more information about using it.
Huette
18th April 2005 12:23 UTC
can somebody describe the function (not the content) of the ioSpecial.ini detailed? or can i read it somewhere?
instead of adding a new label, now i just try to enlarge the checkbox in the finishpage, so i can set a longer text (in mui languagefile). But where can i set the width and height of it? There are only two labels and one bitmap defined in the ioSpecial.ini . Where comes that checkbox from? In "Local Settings\Temp\" i can find another ioSpecial.ini with the settings of the finishpage (checkbox included), but changes are not decisive.
Huette
18th April 2005 16:25 UTC
if i could set the postition of the checkbox it would help me, too, because then i could add the text to the label above the checkbox (why is the label hidden by the checkbox, if it's text gets longer?). strange thing, that checkbox. no own component in modern.exe? integrated into the label? I ain't that hard to add a little text to the finishpage, is it?
kichik
19th April 2005 19:31 UTC
The MUI edits the INI on runtime according to the defines you add in the script. Take a look at the MUI_FUNCTION_FINISHPAGE macro in Contrib\Modern UI\System.nsh. Notice especially the following line which is called after the MUI finished writing into ioSpecial.ini:
!insertmacro MUI_PAGE_FUNCTION_CUSTOM PRE
That line calls your PRE function in which you can change ioSpecial.ini.
Comperio
20th April 2005 01:36 UTC
There's probably other ways to do this, but here's a trick you can use help eliminate some of the guesswork in editing the ioSpecial.ini file while keeping the same general look to the page:
The ioSpecial.ini file gets created in the plugins directory at runtime. If you were to temporarily insert the following code into your .onInit function, you'd know which folder was the PLUGINS folder:
InitPluginsDir
MessageBox MB_OK "PluginsDir: $PLUGINSDIR"
Once this is in place, execute your installer. Make a note of this path and the click OK. (the path will change each time time you run the install). Continue with the install until you get to the finish page. Then, open the plugins folder. You should see the ioSpecial.ini. Make a copy of this file and store it somewhere. This can then be a "template" you can use to tweak your own page. (I prefer to use the built-in InstallOptions editor from HM NIS EDIT.) Once you know what you need to change, then it's just matter of inserting the proper WriteIniStr commands in your PRE function.
Enjoy!:cool:
Huette
20th April 2005 07:25 UTC
thanks. i finished customizing my finishpage now. didn't really understand the MUI_INSTALLOPTIONS_WRITE line. now everything looks like it shoud.