This file is indexed.

/usr/share/nsis/Contrib/Modern UI 2/Interface.nsh is in nsis-common 2.50-1.

This file is owned by root:root, with mode 0o644.

The actual contents of the file can be viewed below.

  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
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
/*

NSIS Modern User Interface
Interface code for all pages

*/

;--------------------------------
;Variables

Var mui.Header.Text
Var mui.Header.Text.Font
Var mui.Header.SubText
Var mui.Header.Background
Var mui.Header.Image

Var mui.Branding.Text
Var mui.Branding.Background

Var mui.Line.Standard
Var mui.Line.FullWindow

Var mui.Button.Next
Var mui.Button.Cancel
Var mui.Button.Back


;--------------------------------
;General interface settings

!macro MUI_INTERFACE

  !ifndef MUI_INTERFACE

    !define MUI_INTERFACE

    ;These values are set after the interface settings in the script,
    ;so the script itself can override all values.

    ;Default interface settings in nsisconf.nsh
    !ifdef MUI_INSERT_NSISCONF
      !insertmacro MUI_NSISCONF
    !endif

    ;Default interface settings
    !insertmacro MUI_DEFAULT MUI_UI "${NSISDIR}\Contrib\UIs\modern.exe"
    !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE "${NSISDIR}\Contrib\UIs\modern_headerbmp.exe"
    !insertmacro MUI_DEFAULT MUI_UI_HEADERIMAGE_RIGHT "${NSISDIR}\Contrib\UIs\modern_headerbmpr.exe"
    !insertmacro MUI_DEFAULT MUI_ICON "${NSISDIR}\Contrib\Graphics\Icons\modern-install.ico"
    !insertmacro MUI_DEFAULT MUI_UNICON "${NSISDIR}\Contrib\Graphics\Icons\modern-uninstall.ico"
    !insertmacro MUI_DEFAULT MUI_BGCOLOR "FFFFFF"

    ;Default header images
    !ifdef MUI_HEADERIMAGE

      !insertmacro MUI_DEFAULT MUI_HEADERIMAGE_BITMAP "${NSISDIR}\Contrib\Graphics\Header\nsis.bmp"

      !ifndef MUI_HEADERIMAGE_UNBITMAP
        !define MUI_HEADERIMAGE_UNBITMAP "${MUI_HEADERIMAGE_BITMAP}"
        !ifdef MUI_HEADERIMAGE_BITMAP_NOSTRETCH
          !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_NOSTRETCH ""
        !endif
      !endif

      !ifdef MUI_HEADERIMAGE_BITMAP_RTL
        !ifndef MUI_HEADERIMAGE_UNBITMAP_RTL
          !define MUI_HEADERIMAGE_UNBITMAP_RTL "${MUI_HEADERIMAGE_BITMAP_RTL}"
          !ifdef MUI_HEADERIMAGE_BITMAP_RTL_NOSTRETCH
            !insertmacro MUI_SET MUI_HEADERIMAGE_UNBITMAP_RTL_NOSTRETCH ""
          !endif
        !endif
      !endif

    !endif

    ;Default texts
    !insertmacro MUI_DEFAULT MUI_ABORTWARNING_TEXT "$(MUI_TEXT_ABORTWARNING)"
    !insertmacro MUI_DEFAULT MUI_UNABORTWARNING_TEXT "$(MUI_UNTEXT_ABORTWARNING)"  

    ;Apply settings

    XPStyle On ;XP style setting in manifest resource

    ;Dialog resources
    ChangeUI all "${MUI_UI}" 
    !ifdef MUI_HEADERIMAGE
      !ifndef MUI_HEADERIMAGE_RIGHT
        ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE}"
      !else
        ChangeUI IDD_INST "${MUI_UI_HEADERIMAGE_RIGHT}"
      !endif
    !endif

    ;Icons
    Icon "${MUI_ICON}"
    UninstallIcon "${MUI_UNICON}"

  !endif

!macroend


;--------------------------------
;Abort warning message box

!macro MUI_ABORTWARNING

  !ifdef MUI_ABORTWARNING_CANCEL_DEFAULT
    MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
  !else
    MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_ABORTWARNING_TEXT}" IDYES mui.Quit
  !endif
  
  Abort
  mui.Quit:

!macroend

!macro MUI_UNABORTWARNING

  !ifdef MUI_UNABORTWARNING_CANCEL_DEFAULT
    MessageBox MB_YESNO|MB_ICONEXCLAMATION|MB_DEFBUTTON2 "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
  !else
    MessageBox MB_YESNO|MB_ICONEXCLAMATION "${MUI_UNABORTWARNING_TEXT}" IDYES mui.Quit
  !endif

  Abort
  mui.Quit:

!macroend


;--------------------------------
;Initialization of GUI

!macro MUI_HEADERIMAGE_INIT UNINSTALLER

  ;Load and display header image

  !ifdef MUI_HEADERIMAGE

    InitPluginsDir

    !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL

      ${if} $(^RTL) == 1

        File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL}"

        !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL_NOSTRETCH
          SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
        !else
          SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
        !endif

      ${else}

    !endif

        File "/oname=$PLUGINSDIR\modern-header.bmp" "${MUI_HEADERIMAGE_${UNINSTALLER}BITMAP}"

        !ifndef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_NOSTRETCH
          SetBrandingImage /IMGID=1046 /RESIZETOFIT "$PLUGINSDIR\modern-header.bmp"
        !else
          SetBrandingImage /IMGID=1046 "$PLUGINSDIR\modern-header.bmp"
        !endif

    !ifdef MUI_HEADERIMAGE_${UNINSTALLER}BITMAP_RTL

      ${endif}

    !endif

  !endif

!macroend

!macro MUI_GUIINIT_OUTERDIALOG UNINSTALLER

  ;Initialize outer dialog (fonts & colors)

  ;Header
  GetDlgItem $mui.Header.Text $HWNDPARENT 1037
  CreateFont $mui.Header.Text.Font "$(^Font)" "$(^FontSize)" "700"
  SendMessage $mui.Header.Text ${WM_SETFONT} $mui.Header.Text.Font 0
  
  GetDlgItem $mui.Header.SubText $HWNDPARENT 1038

  !ifndef MUI_HEADER_TRANSPARENT_TEXT
    SetCtlColors $mui.Header.Text "" "${MUI_BGCOLOR}"
    SetCtlColors $mui.Header.SubText "" "${MUI_BGCOLOR}"
  !else
    SetCtlColors $mui.Header.Text "" "transparent"
    SetCtlColors $mui.Header.SubText "" "transparent"
  !endif
  
  ;Header image
  !insertmacro MUI_HEADERIMAGE_INIT "${UNINSTALLER}"

  ;Header background
  GetDlgItem $mui.Header.Background $HWNDPARENT 1034
  SetCtlColors $mui.Header.Background "" "${MUI_BGCOLOR}"

  ;Header image background
  GetDlgItem $mui.Header.Image $HWNDPARENT 1039
  SetCtlColors $mui.Header.Image "" "${MUI_BGCOLOR}"

  ;Branding text
  GetDlgItem $mui.Branding.Background $HWNDPARENT 1028
  SetCtlColors $mui.Branding.Background /BRANDING
  GetDlgItem $mui.Branding.Text $HWNDPARENT 1256
  SetCtlColors $mui.Branding.Text /BRANDING
  SendMessage $mui.Branding.Text ${WM_SETTEXT} 0 "STR:$(^Branding) "
  
  ;Lines
  GetDlgItem $mui.Line.Standard $HWNDPARENT 1035
  GetDlgItem $mui.Line.FullWindow $HWNDPARENT 1045
  
  ;Buttons
  GetDlgItem $mui.Button.Next $HWNDPARENT 1
  GetDlgItem $mui.Button.Cancel $HWNDPARENT 2
  GetDlgItem $mui.Button.Back $HWNDPARENT 3

!macroend


;--------------------------------
;Interface functions

!macro MUI_FUNCTION_GUIINIT

  Function .onGUIInit

    !insertmacro MUI_GUIINIT_OUTERDIALOG ""

    !ifdef MUI_PAGE_FUNCTION_GUIINIT
      Call "${MUI_PAGE_FUNCTION_GUIINIT}"
    !endif  

    !ifdef MUI_CUSTOMFUNCTION_GUIINIT
      Call "${MUI_CUSTOMFUNCTION_GUIINIT}"
    !endif

  FunctionEnd

!macroend

!macro MUI_UNFUNCTION_GUIINIT

  Function un.onGUIInit  

    !insertmacro MUI_GUIINIT_OUTERDIALOG UN
    
    !ifdef MUI_UNPAGE_FUNCTION_GUIINIT
      Call "${MUI_UNPAGE_FUNCTION_GUIINIT}"
    !endif    

    !ifdef MUI_CUSTOMFUNCTION_UNGUIINIT
      Call "${MUI_CUSTOMFUNCTION_UNGUIINIT}"
    !endif

  FunctionEnd

!macroend

!macro MUI_FUNCTION_ABORTWARNING

  Function .onUserAbort
  
    !ifdef MUI_PAGE_FUNCTION_ABORTWARNING
      Call ${MUI_PAGE_FUNCTION_ABORTWARNING}
    !endif
  
    !ifdef MUI_ABORTWARNING
      !insertmacro MUI_ABORTWARNING
    !endif
    
    !ifdef MUI_CUSTOMFUNCTION_ABORT
      Call "${MUI_CUSTOMFUNCTION_ABORT}"
    !endif
    
  FunctionEnd

!macroend

!macro MUI_FUNCTION_UNABORTWARNING

  Function un.onUserAbort
  
    !ifdef MUI_UNPAGE_FUNCTION_ABORTWARNING
      Call ${MUI_UNPAGE_FUNCTION_ABORTWARNING}
    !endif  
  
    !ifdef MUI_UNABORTWARNING
      !insertmacro MUI_UNABORTWARNING
    !endif
    
    !ifdef MUI_CUSTOMFUNCTION_UNABORT
      Call "${MUI_CUSTOMFUNCTION_UNABORT}"
    !endif
    
  FunctionEnd

!macroend