Add link to welcome page (MUI): Difference between revisions

From NSIS Wiki
Jump to navigationJump to search
(First version)
 
Line 21: Line 21:


   !define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLink
   !define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLink
!insertmacro MUI_PAGE_WELCOME
  !insertmacro MUI_PAGE_WELCOME
   !insertmacro MUI_PAGE_COMPONENTS
   !insertmacro MUI_PAGE_COMPONENTS
   !insertmacro MUI_PAGE_INSTFILES
   !insertmacro MUI_PAGE_INSTFILES

Revision as of 06:34, 13 November 2006

Author: bholliger (talk, contrib)


Description

This example shows how to add a link to the welcome page.

More Information available in the Modern UI Readme

Example

;--------------------------------
;Include Modern UI
 
  !include "MUI.nsh"
 
;--------------------------------
;General
 
  Outfile linkexample.exe
 
;--------------------------------
;Pages
 
  !define MUI_PAGE_CUSTOMFUNCTION_PRE WelcomePageSetupLink
  !insertmacro MUI_PAGE_WELCOME
  !insertmacro MUI_PAGE_COMPONENTS
  !insertmacro MUI_PAGE_INSTFILES
 
Section "secDummy"
  ; ...
SectionEnd
 
 
Function WelcomePageSetupLink
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Settings" "Numfields" "4" ; increase counter
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 3" "Bottom" "122" ; limit size of the upper label
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Type" "Link"
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Text" "http://www.google.ch/"
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Left" "120"
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Right" "315"
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Top" "123"
  !insertmacro MUI_INSTALLOPTIONS_WRITE "ioSpecial.ini" "Field 4" "Bottom" "132"
FunctionEnd
 
;--------------------------------
;Languages
 
  !insertmacro MUI_LANGUAGE "English"