Archive: Replacing standard page with a customized one


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.


Finish page is made with nsDialogs plug-in. So simply copy appropriate code into your script and modify it.


You can modify a page during the show page callback, probably less work than writing a new page from scratch...


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.

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

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.


You should make your own custom page using page custom yourpagefunction, instead of inserting a mui2 finish macro.


Try to remove reference to MUI2 Finish page - this one: !insertmacro MUI_PAGE_FINISH.