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