Archive: Mui_function_licensepage


Mui_function_licensepage
Hi all,

I'm new at using NSIS 2.0B4. I got through some of the basics but I'm stuck on the following.

!insertmacro MUI_FUNCTION_LICENSEPAGE myPreFunc myShowFunc mtLeaveFunc
!insertmacro MUI_PAGE_LICENSE "${SOURCE_DIR}\License.txt"

Function myPreFunc
; blablabla
FunctinEnd

Function mtShowFunc
; blablabla
FunctinEnd

Function myLeaveFunc
; blablabla
FunctinEnd

I get a compiler error saying the the functions already exist. What am I missing.

Thanks in advance.


You should define these symbols before using the license page macro

!define MUI_PAGE_CUSTOMFUNCTION_PRE "myPreFunc"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "myShowFunc"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "myLeaveFunc"

The modern UI readme knows more about. ;)

Mathias.

Your suggestion:

!define MUI_PAGE_CUSTOMFUNCTION_PRE "myPreFunc"
!define MUI_PAGE_CUSTOMFUNCTION_SHOW "myShowFunc"
!define MUI_PAGE_CUSTOMFUNCTION_LEAVE "myLeaveFunc"

According to modern UI readme, these are for Custom Pages, I need this for the license and directory pages. Anyway I tried it this and the compiler still says Error: Function named "myPreFunc" already exists.

Any other ideas?


Never mind, I figured it out. I still had

!insertmacro MUI_FUNCTION_LICENSEPAGE myPreFunc myShowFunc mtLeaveFunc

in my code, and when I removed it, your suggestion worked.

Thanks