Archive: Multiple License Screens


Multiple License Screens
My installer needs to display 2 sets of license agreements the user must agree to.

First I tried the following:


!insertmacro MUI_PAGE_WELCOME
Page custom Opensource_licenses
!insertmacro MUI_PAGE_LICENSE OpenLicenses.rtf
!insertmacro MUI_PAGE_LICENSE LICENSE.rtf
Page custom WebDir WebDirLeave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


But the problem is that on the 2nd license screen, there is no checkbox to accept the license. The 'next' button instead says Agree. This won't work.

I next tried the following method:

!insertmacro MUI_PAGE_WELCOME
Page custom Opensource_licenses
PageEx license
LicenseData OpenLicenses.rtf
LicenseForceSelection checkbox
PageExEnd
PageEx license
LicenseData LICENSE.rtf
LicenseForceSelection checkbox
PageExEnd
Page custom WebDir WebDirLeave
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH


The problem with this method is that BOTH license screens are displaying the MUI_HEADER_TEXT from the custom Opensource_licenses page that proceeded them.

Is there a fix for either method? Using NSIS 2.45. OT: any reason NSIS hasn't been updated in months?

This short demo shows two license pages, each with a checkbox (using NSIS 2.45)

!include "MUI2.nsh"

Name "Two Licences Demo"
OutFile "TwoLicenses-MUI2.exe"
RequestExecutionLevel user

!insertmacro MUI_PAGE_WELCOME
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "License_One.txt"
!define MUI_LICENSEPAGE_CHECKBOX
!insertmacro MUI_PAGE_LICENSE "License_Two.txt"
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH

!insertmacro MUI_LANGUAGE "English"

Section "Dummy"

; do nothing

SectionEnd

pengyou: That works, thanks.