TrifonovS
11th July 2012 07:42 UTC
Replacing standard page with a customized one
Hi!
I need a different Finish page in my installer. But it isn't totally different, I just want to make some suitable for me extensions. I don't want to change directly the code of the page - Finish.nsh from the NSIS folders. So my question is, what is the easiest way to replace the standard Finish.nsh with another one - for example MyFinish.nsh, that has nearly the same content like Finish.nsh, but I have extended it.
T.Slappy
11th July 2012 08:11 UTC
Finish page is made with nsDialogs plug-in. So simply copy appropriate code into your script and modify it.
Anders
11th July 2012 08:12 UTC
You can modify a page during the show page callback, probably less work than writing a new page from scratch...
TrifonovS
11th July 2012 08:54 UTC
Finish page is made with nsDialogs plug-in. So simply copy appropriate code into your script and modify it.
This is what I have done. But the compiler shows errors that some macros are already defined (from the standard page). I don't want to rename all macros and defines. There must be another way.
You can modify a page during the show page callback, probably less work than writing a new page from scratch...
I have to move some controls up to have more place bellow them (the check-boxes for the running program and readme file). I think that it will be easier to modify the page, especially if I have the code of the standard page.
MSG
11th July 2012 11:56 UTC
Originally posted by TrifonovS
I think that it will be easier to modify the page, especially if I have the code of the standard page.
Like T.Slappy said, you can find the code in the MUI page definition file. NSIS\Contrib\Modern UI 2\Pages\Finish.nsh
TrifonovS
11th July 2012 12:31 UTC
Yes, this is clear. The question is how to inform the compiler to compile my file, not the original one. The compiler still finds the file Finish.nsh and also my new file MyFinish.nsh. Then it shows errors that the macros are already defined. I don't know how to disable the inclusion of the original file Finish.nsh in the compilation process.
MSG
11th July 2012 13:17 UTC
You should make your own custom page using page custom yourpagefunction, instead of inserting a mui2 finish macro.
T.Slappy
12th July 2012 06:05 UTC
Try to remove reference to MUI2 Finish page - this one: !insertmacro MUI_PAGE_FINISH.