Archive: MUI License - conditional license text


MUI License - conditional license text
I have a need to display different license texts dependant upon user selection from a screen prior to the license screen.
Basically user select Single, Multiple or Enterprise licensing and agrees to the matching eula.

Problem is I can't seem to find a way that works. Here's what I've tried with NSIS 2.06:
1. Method from 3license.zip from http://forums.winamp.com/showthread.php?threadid=136925
2. Creating a custom page that looks like a license page. It doesn't display full license text or "I Agree" instead of next.
3. Various attempts at conditionally choosing and !insertmacro line, MakeNSISW wouldn't accept any of the syntaxes tried.

Is there currently any way to do this? I'd prefer not using GetDlgItem the way 1.

Any Ideas?


Seems like the big problem here is the fact that the LicenseData command needed for the license text is a compile-time function. (If it were a runtime function, you'd have it made.) I think that your best option will be using GetDlgItem.

Here's something else I found on the archive that might help:
http://nsis.sourceforge.net/archive/...php?pageid=559
(you'd have to modify it slightly for what you're doing, but it still might work.)


I just ran into this same need to conditionally show different licenses based on user selection. The function Comperio linked to seems like a nice solution, but I'm thinking WM_SETTEXT will not write in rich text. I was able to get around the problem by doing this:


#in MUI defines/macro insertion area
!define MUI_PAGE_CUSTOMFUNCTION_PRE ChooseLicenseA
!insertmacro MUI_PAGE_LICENSE "license_a.rtf"
!define MUI_PAGE_CUSTOMFUNCTION_PRE ChooseLicenseB
!insertmacro MUI_PAGE_LICENSE "license_b.rtf"

Function ChooseLicenseA
#determine which eula to display
#if it will be license_b
Abort
#end if it will be license_b
FunctionEnd

Function ChooseLicenseB
#determine which eula to display
#if it was license_a
Abort
#end if it was license_a
FunctionEnd


EDIT: I originally used ifdefs but decided it was less hassle to just call the same routine to determine the eula and just use the Abort instruction in both cases