.:: CODE SNIPPET ::.

"Your time is limited, so don't waste it living someone else's life"

How to customize the default page in NSIS


As you know, NSIS supports user with default pages with fixed controls on its UI. So, the problem is how we can customize those page with our own control. This is impossible on NSIS2, upgrade to NSIS 3, we got the MUI2 instead of MUI. Hence, we can customize the default pages.

MUI2 supports the macros to customize pages as flowing point:

MUI_CUSTOMFUNCTION_GUIINIT function
MUI_CUSTOMFUNCTION_UNGUIINIT function
MUI_CUSTOMFUNCTION_ABORT function
MUI_CUSTOMFUNCTION_UNABORT function
MUI_CUSTOMFUNCTION_ONMOUSEOVERSECTION function
MUI_CUSTOMFUNCTION_UNONMOUSEOVERSECTION function

MUI_PAGE_CUSTOMFUNCTION_PRE function
MUI_PAGE_CUSTOMFUNCTION_SHOW function
MUI_PAGE_CUSTOMFUNCTION_LEAVE function

where can we put those macros?
The answer is before the default macros.
Example:

!insertmacro MUI_PAGE_CUSTOMFUNCTION_PRE func_ComponentPage_Pre
!insertmacro MUI_PAGE_COMPONENTS
Function func_ComponentPage_Pre
; do the stuff to pre-create the component page
FunctionEnd
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: