| 1 |
/* |
| 2 |
|
| 3 |
NSIS Modern User Interface - Version 2.1 |
| 4 |
Copyright 2002-2026 Joost Verburg |
| 5 |
Contributors: Amir Szekely, Anders Kjersem |
| 6 |
|
| 7 |
*/ |
| 8 |
|
| 9 |
!ifndef MUI_INCLUDED |
| 10 |
!verbose push 3 |
| 11 |
!define MUI_INCLUDED |
| 12 |
!define MUI_SYSVERSION "2.1" |
| 13 |
!verbose pop |
| 14 |
!echo "NSIS Modern User Interface version ${MUI_SYSVERSION} - Copyright 2002-2026 Joost Verburg" |
| 15 |
|
| 16 |
;-------------------------------- |
| 17 |
!verbose push 3 |
| 18 |
!define /IfNDef MUI_VERBOSE 3 |
| 19 |
!verbose ${MUI_VERBOSE} |
| 20 |
|
| 21 |
!addincludedir "${NSISDIR}\Contrib\Modern UI 2" |
| 22 |
|
| 23 |
;-------------------------------- |
| 24 |
;Header files required by MUI |
| 25 |
|
| 26 |
!include WinMessages.nsh |
| 27 |
!include LogicLib.nsh |
| 28 |
!include nsDialogs.nsh |
| 29 |
!include LangFile.nsh |
| 30 |
|
| 31 |
|
| 32 |
;-------------------------------- |
| 33 |
;Macros for compile-time defines |
| 34 |
|
| 35 |
!macro MUI_DEFAULT SYMBOL CONTENT |
| 36 |
|
| 37 |
;Define symbol if not yet defined |
| 38 |
;For setting default values |
| 39 |
|
| 40 |
!ifndef "${SYMBOL}" |
| 41 |
!define "${SYMBOL}" "${CONTENT}" |
| 42 |
!endif |
| 43 |
|
| 44 |
!macroend |
| 45 |
|
| 46 |
!macro MUI_SET SYMBOL CONTENT |
| 47 |
|
| 48 |
;Define symbol and undefine if necessary |
| 49 |
|
| 50 |
!insertmacro MUI_UNSET "${SYMBOL}" |
| 51 |
!define "${SYMBOL}" "${CONTENT}" |
| 52 |
|
| 53 |
!macroend |
| 54 |
|
| 55 |
!macro MUI_UNSET SYMBOL |
| 56 |
|
| 57 |
;Undefine symbol if defined |
| 58 |
|
| 59 |
!ifdef "${SYMBOL}" |
| 60 |
!undef "${SYMBOL}" |
| 61 |
!endif |
| 62 |
|
| 63 |
!macroend |
| 64 |
|
| 65 |
|
| 66 |
;-------------------------------- |
| 67 |
;MUI interface |
| 68 |
|
| 69 |
!include "Deprecated.nsh" |
| 70 |
!include "Interface.nsh" |
| 71 |
!include "Localization.nsh" |
| 72 |
!include "Pages.nsh" |
| 73 |
|
| 74 |
|
| 75 |
;-------------------------------- |
| 76 |
;Pages |
| 77 |
|
| 78 |
!include "Pages\Components.nsh" |
| 79 |
!include "Pages\Directory.nsh" |
| 80 |
!include "Pages\Finish.nsh" |
| 81 |
!include "Pages\InstallFiles.nsh" |
| 82 |
!include "Pages\License.nsh" |
| 83 |
!include "Pages\StartMenu.nsh" |
| 84 |
!include "Pages\UninstallConfirm.nsh" |
| 85 |
!include "Pages\Welcome.nsh" |
| 86 |
|
| 87 |
|
| 88 |
;-------------------------------- |
| 89 |
;Insert MUI code in script |
| 90 |
|
| 91 |
!macro MUI_INSERT |
| 92 |
|
| 93 |
!ifndef MUI_INSERT |
| 94 |
!define MUI_INSERT |
| 95 |
|
| 96 |
;This macro is included when the first language file is included, |
| 97 |
;after the pages. |
| 98 |
|
| 99 |
;Interface settings |
| 100 |
!insertmacro MUI_INTERFACE |
| 101 |
|
| 102 |
;Interface functions - Installer |
| 103 |
!insertmacro MUI_FUNCTION_GUIINIT |
| 104 |
!insertmacro MUI_FUNCTION_ABORTWARNING |
| 105 |
|
| 106 |
;Interface functions - Uninstaller |
| 107 |
!ifdef MUI_UNINSTALLER |
| 108 |
!insertmacro MUI_UNFUNCTION_GUIINIT |
| 109 |
!insertmacro MUI_FUNCTION_UNABORTWARNING |
| 110 |
!endif |
| 111 |
|
| 112 |
!endif |
| 113 |
|
| 114 |
!macroend |
| 115 |
|
| 116 |
!verbose pop |
| 117 |
!endif ;~ MUI_INCLUDED |