Search code examples
nsis

NSIS Scroll License Welcome Screen


I have an installer that is having problems interacting with the scroll license plugin. The installer works great without the plugin, this is what the plugin has me include:

!

include MUI.nsh

!define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
!insertmacro MUI_PAGE_LICENSE "EULA.txt"

unction LicenseShow
 ScrollLicense::Set /NOUNLOAD
FunctionEnd

Function .onGUIEnd
 ScrollLicense::Unload
FunctionEnd

Section A 
Section End

The problem I run into is here. If the Welcome page displays BEFORE the License page it will not be able to progress to the next screen because it is looking for a scroll bar and accept button. If I remove the WELCOME page everything works fine. Does anyone have experience with this plugin? or how I can get the plugin to ignore the MUI_PAGE_WELCOME?

!insertmacro MUI_PAGE_WELCOME <--- If I remove this Welcome page everything works great!
!insertmacro MUI_PAGE_LICENSE "eula.rtf" 
!insertmacro MUI_PAGE_DIRECTORY
!insertmacro MUI_PAGE_INSTFILES
!insertmacro MUI_PAGE_FINISH
!insertmacro MUI_UNPAGE_CONFIRM
!insertmacro MUI_UNPAGE_INSTFILES

Solution

  • Try moving the line:

    !define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
    

    Below the line (more specifically, directly above the MUI_PAGE_LICENSE line):

    !insertmacro MUI_PAGE_WELCOME
    

    I used ExampleCheckBox.nsi as supplied from the ScrollLicense plugin and reproduced your behavior when I had:

    !define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
    !insertmacro MUI_PAGE_WELCOME
    !insertmacro MUI_PAGE_LICENSE ExampleCheckBox.nsi
    

    The problem went away when I moved the !define line to after the MUI_PAGE_WELCOME.

    !insertmacro MUI_PAGE_WELCOME
    !define MUI_PAGE_CUSTOMFUNCTION_SHOW LicenseShow
    !insertmacro MUI_PAGE_LICENSE ExampleCheckBox.nsi
    

    I'm not familiar with this plugin but I suspect there is some kind of side-effect that disables the Next button of the next displayed page...