Archive: Mui_page_instfiles


Mui_page_instfiles
Hello,

I have a little question about MUI.

If you want to add two INSTFILES pages to your install, you have to use such declarations (with the latest CVS version):


!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_LICENSE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES


Normally, to add a custom function to a page, you do something like this:
!define MUI_CUSTOMFUNCTION_<Page>_PRE myPreFunction

My question is : if you define such a method for, say, the first INSTFILES page, how do you ensure that that method will not affect the second page?

As far as I know (credit to KiCHiK), the only "simple" method is to accept the fact that the function will be called twice and set up a flag to skip it on the second call.

If there is no other solution, I have a suggestion :
why not allow such a declaration? :

!insertmacro MUI_PAGE_INSTFILES my1stPre my1stShow my1stLeave
!insertmacro MUI_PAGE_LICENSE
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES my2ndPre my2ndShow my2ndLeave



Thanks in advance,
Weebib

The Modern UI also configures the user interface in these functions, so kichik's suggestion is the easiest one.


Thanks for your reply.

The above mentionned solution works (I tried it).