vlc.win32.nsi.in 43.2 KB
Newer Older
1
2
3
4
5
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NSIS installer script for vlc ;
; (http://nsis.sourceforge.net) ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

6
7
!include "languages\declaration.nsh"

8
!define PRODUCT_NAME "VLC media player"
Christophe Mutricy's avatar
Christophe Mutricy committed
9
!define VERSION @VERSION@
10
!define PRODUCT_VERSION @VERSION@
11
!define PRODUCT_GROUP "VideoLAN"
12
13
!define PRODUCT_PUBLISHER "VideoLAN"
!define PRODUCT_WEB_SITE "http://www.videolan.org/"
14
15
16
17
18
19
20
21
22
!define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC"
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
!define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"

!define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
!define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Language"

23
24
25
!define MEMENTO_REGISTRY_ROOT ${PRODUCT_UNINST_ROOT_KEY}
!define MEMENTO_REGISTRY_KEY "${PRODUCT_UNINST_KEY}"

26
!define INSTALL_ACTIVEX
27
!define INSTALL_MOZILLA
28

29
30
31
32
33
34
35
36
Var ReinstallType
Var ReinstallUninstallBtn
Var PerformUpdate
Var PreviousVersion
Var PreviousVersionState
Var PreviousInstallDir
Var UninstallLog

37
38
39
40
;;;;;;;;;;;;;;;;;;;;;;;;;
; General configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;

41
Name "${PRODUCT_NAME}"
42
43
@HAVE_WIN64_FALSE@ OutFile ..\vlc-${VERSION}-win32.exe
@HAVE_WIN64_TRUE@  OutFile ..\vlc-${VERSION}-win64.exe
44
InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
45
46
47
48
49
50
!ifdef NSIS_LZMA_COMPRESS_WHOLE
SetCompressor lzma
!else
SetCompressor /SOLID lzma
!endif

51
SetOverwrite ifdiff
52
53
54
CRCCheck on
BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"

55
56
57
InstType $Name_InstTypeRecommended
InstType $Name_InstTypeMinimum
InstType $Name_InstTypeFull
58

59
RequestExecutionLevel admin
Eric Lassauge's avatar
Eric Lassauge committed
60
61
!addincludedir NSIS
!addplugindir NSIS
62
!include UAC.nsh
63
!include nsProcess.nsh
64
!include WinVer.nsh
65
66
!include FileFunc.nsh
!include MUI2.nsh
67
!include Memento.nsh
68
69
70

!insertmacro GetParameters
!insertmacro GetOptions
71

72
73
74
75
76
77
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; NSIS Modern User Interface configuration ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; MUI Settings
  !define MUI_ABORTWARNING
78
79
  !define MUI_ICON "vlc.ico"
  !define MUI_UNICON "vlc.ico"
80
81
82
83
  !define MUI_COMPONENTSPAGE_SMALLDESC

; Installer pages
  ; Welcome page
84
    !define MUI_PAGE_CUSTOMFUNCTION_PRE PageFastUpdatePre
85
86
    !define MUI_WELCOMEPAGE_TITLE_3LINES
    !insertmacro MUI_PAGE_WELCOME
87
88
  ; Optional update page
    Page custom PageReinstall PageLeaveReinstall
89
  ; License page
90
    !define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
Christophe Mutricy's avatar
Typo    
Christophe Mutricy committed
91
    !define MUI_LICENSEPAGE_TEXT_BOTTOM $License_NextText
92
    !define MUI_PAGE_CUSTOMFUNCTION_PRE PageSkipPre
93
94
    !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
  ; Components page
95
    !define MUI_PAGE_CUSTOMFUNCTION_PRE PageComponentsPre
96
97
    !insertmacro MUI_PAGE_COMPONENTS
  ; Directory page
98
    !define MUI_PAGE_CUSTOMFUNCTION_PRE PageDirectoryPre
99
100
101
102
    !insertmacro MUI_PAGE_DIRECTORY
  ; Instfiles page
    !insertmacro MUI_PAGE_INSTFILES
  ; Finish page
103
    !define MUI_PAGE_CUSTOMFUNCTION_PRE PageFastUpdatePre
104
105
    !define MUI_FINISHPAGE_RUN
    !define MUI_FINISHPAGE_RUN_FUNCTION AppExecAs
106
    !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
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
    !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
    !define MUI_FINISHPAGE_NOREBOOTSUPPORT
    !insertmacro MUI_PAGE_FINISH

; Uninstaller pages
    !insertmacro MUI_UNPAGE_CONFIRM
    !insertmacro MUI_UNPAGE_COMPONENTS
    !insertmacro MUI_UNPAGE_INSTFILES
    !insertmacro MUI_UNPAGE_FINISH

; Language files
  !insertmacro MUI_LANGUAGE "English" # first language is the default language
  !insertmacro MUI_LANGUAGE "French"
  !insertmacro MUI_LANGUAGE "German"
  !insertmacro MUI_LANGUAGE "Spanish"
  !insertmacro MUI_LANGUAGE "SimpChinese"
  !insertmacro MUI_LANGUAGE "TradChinese"
  !insertmacro MUI_LANGUAGE "Japanese"
  !insertmacro MUI_LANGUAGE "Italian"
  !insertmacro MUI_LANGUAGE "Dutch"
  !insertmacro MUI_LANGUAGE "Danish"
  !insertmacro MUI_LANGUAGE "Swedish"
  !insertmacro MUI_LANGUAGE "Finnish"
  !insertmacro MUI_LANGUAGE "Russian"
  !insertmacro MUI_LANGUAGE "Portuguese"
132
  !insertmacro MUI_LANGUAGE "PortugueseBR"
133
134
135
136
137
  !insertmacro MUI_LANGUAGE "Welsh"
  !insertmacro MUI_LANGUAGE "Uzbek"
  !insertmacro MUI_LANGUAGE "Ukrainian"
  !insertmacro MUI_LANGUAGE "Turkish"
  !insertmacro MUI_LANGUAGE "Thai"
138
139
;  !insertmacro MUI_LANGUAGE "Sinhala"
;  !insertmacro MUI_LANGUAGE "Scottish_Gaelic"
140
141
142
  !insertmacro MUI_LANGUAGE "Norwegian"
  !insertmacro MUI_LANGUAGE "Malay"
  !insertmacro MUI_LANGUAGE "Korean"
143
;  !insertmacro MUI_LANGUAGE "Khmer"
144
  !insertmacro MUI_LANGUAGE "Greek"
145
;  !insertmacro MUI_LANGUAGE "English_United_Kingdom"
146
147
  !insertmacro MUI_LANGUAGE "Czech"
  !insertmacro MUI_LANGUAGE "Bosnian"
148
149
150
151
  !insertmacro MUI_LANGUAGE "Arabic"
  !insertmacro MUI_LANGUAGE "Polish"
  !insertmacro MUI_LANGUAGE "Romanian"
  !insertmacro MUI_LANGUAGE "Slovak"
Pierre Ynard's avatar
Pierre Ynard committed
152
  !insertmacro MUI_LANGUAGE "Serbian"
153
  !insertmacro MUI_LANGUAGE "Hungarian"
154
155
  !insertmacro MUI_LANGUAGE "Catalan"
  !insertmacro MUI_LANGUAGE "Bulgarian"
Mihkel's avatar
Mihkel committed
156
  !insertmacro MUI_LANGUAGE "Estonian"
157
  !insertmacro MUI_LANGUAGE "Lithuanian"
158
  !insertmacro MUI_LANGUAGE "Basque"
159
160
161
  !insertmacro MUI_LANGUAGE "Galician"
  !insertmacro MUI_LANGUAGE "Hebrew"
  !insertmacro MUI_LANGUAGE "Slovenian"
162
163
164
165
166
167
168
169

; Reserve files for solid compression
  !insertmacro MUI_RESERVEFILE_LANGDLL

;;;;;;;;;;;;;;;;;;;;;;;
; Macro and Functions ;
;;;;;;;;;;;;;;;;;;;;;;;

Daniel Amm's avatar
Daniel Amm committed
170
171
172
!include helpers\extensions.nsh
!include helpers\install.nsh
!include helpers\utils.nsh
173
174
175
176
177
178

;;;;;;;;;;;;;;;;;;;;;;
; Installer sections ;
; The CORE of the    ;
; installer          ;
;;;;;;;;;;;;;;;;;;;;;;
179

180
${MementoSection} $Name_Section01 SEC01
181
182
183
184
  SectionIn 1 2 3 RO
  SetShellVarContext all
  SetOutPath "$INSTDIR"

185
186
187
  DetailPrint $Detail_CheckProcesses
  Call CheckRunningProcesses

188
189
190
191
192
  !insertmacro OpenUninstallLog

  ; VLC.exe, libvlc.dll
  !insertmacro InstallFile vlc.exe
  !insertmacro InstallFile vlc.exe.manifest
193
  !insertmacro InstallFile vlc-cache-gen.exe
194
195
196

  ; All dlls
  !insertmacro InstallFile *.dll
197
198
199
200
201

  ; Text files
  !insertmacro InstallFile *.txt

  ; Subfolders
202
  !insertmacro InstallFolder plugins
203
  !insertmacro InstallFolder locale
204
205
@BUILD_SKINS_TRUE@   !insertmacro InstallFolder skins
@BUILD_LUA_TRUE@     !insertmacro InstallFolder lua
206
207

  ; Generate the cache and add it to uninstall.log
208
  nsExec::ExecToStack '"$INSTDIR\vlc-cache-gen.exe" $INSTDIR\plugins'
209
210
211
212
  FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
  FileWrite $UninstallLog "plugins\$1$\r$\n"
  FindClose $0

213

214
  ; URLs
215
  WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
216
  FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
217
  WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/doc/"
218
  FileWrite $UninstallLog "Documentation.url$\r$\n"
219
  WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/vlc/skins.php"
220
221
222
223
  FileWrite $UninstallLog "New_Skins.url$\r$\n"

  !insertmacro CloseUninstallLog

224
  ; Add VLC to "recommended programs" for the following extensions
225
226
  WriteRegStr HKCR Applications\vlc.exe "" ""
  WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
Kaarlo Raiha's avatar
Kaarlo Raiha committed
227
  WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
228
  WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
229
230
  !insertmacro MacroAllExtensions RegisterExtensionMacro
  !insertmacro MacroSkinExtensions RegisterSkinExtensionMacro
231

232
233
234
235
  ; Add VLC to "App Paths" to run VLC from ShellExecute/ShellExecuteEx/run dialog without giving a full path
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe" "" "$INSTDIR\vlc.exe"
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe" "Path" "$INSTDIR"

Ludovic Fauvet's avatar
Ludovic Fauvet committed
236
  ; Windows default programs Registration
237
  ; Vista and above detection
Ludovic Fauvet's avatar
Ludovic Fauvet committed
238
239
240
241
242
243
244
245
246
247
  ${If} ${AtLeastWinVista}
    WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
    WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
    WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
    WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
    WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
    WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
    WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
    WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
  ${EndIf}
248
${MementoSectionEnd}
249

250
${MementoSection} $Name_Section02a SEC02a
251
252
  SectionIn 1 2 3
  CreateDirectory "$SMPROGRAMS\VideoLAN"
253
254
255
  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
    "$INSTDIR\vlc.exe" ""
  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
256
    "$INSTDIR\vlc.exe" "-Iskins"
257
258
259
260
261
262
  CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
    "$INSTDIR\Documentation.url"
  CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
    "$INSTDIR\NEWS.txt" ""
  CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
    "$INSTDIR\${PRODUCT_GROUP} Website.url"
263
  CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player - reset preferences and cache files.lnk" \
264
    "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
265
${MementoSectionEnd}
266

267
${MementoSection} $Name_Section02b SEC02b
268
269
270
  SectionIn 1 2 3
  CreateShortCut "$DESKTOP\VLC media player.lnk" \
    "$INSTDIR\vlc.exe" ""
271
${MementoSectionEnd}
272

273
SectionGroup /e !$Name_Section34
274
!ifdef INSTALL_MOZILLA
275
${MementoSection} $Name_Section03 SEC03
276
  SectionIn 1 3
277
278
279

  SetOutPath "$INSTDIR"
  !insertmacro OpenUninstallLog
280
281
  !insertmacro InstallFile npvlc.dll
  !insertmacro InstallFile npvlc.dll.manifest
282
283
284
285
286
287
288
289
  !insertmacro CloseUninstallLog

  !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
  WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
  WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
  WriteRegStr HKLM ${Moz} "Product" "VLC media player"
  WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
  WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
290
${MementoSectionEnd}
291
!endif
292

293
!ifdef INSTALL_ACTIVEX
294
${MementoSection} $Name_Section04 SEC04
295
  SectionIn 1 3
296

297
298
  SetOutPath "$INSTDIR"
  !insertmacro OpenUninstallLog
299
300
  !insertmacro InstallFile axvlc.dll
  !insertmacro InstallFile axvlc.dll.manifest
301
  !insertmacro CloseUninstallLog
302
303
@HAVE_WIN64_FALSE@ RegDLL "$INSTDIR\axvlc.dll"
@HAVE_WIN64_TRUE@  ExecWait 'regsvr32.exe /s "$INSTDIR\axvlc.dll"'
304
${MementoSectionEnd}
305
!endif
306
SectionGroupEnd
307

Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
308

309
${MementoSection} $Name_Section05 SEC05
310
  SectionIn 1 2 3
311
  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
312
  WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
313
    '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
314
  WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
315
  WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
316
    '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
317
318

  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
319
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
320
321
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
322
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
323
324
325
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"

  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
326
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
327
328
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
329
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
330
  WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366

  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"

  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"

  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"

  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"

  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
  WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"

367
  WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
Kaarlo Raiha's avatar
Kaarlo Raiha committed
368
369
  WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
  WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
370
    '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
371
  WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
372

373
  WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
Kaarlo Raiha's avatar
Kaarlo Raiha committed
374
375
  WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
  WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
376
    '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
377
378
  WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'

379
380
381
  WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
  WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
  WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
382
     '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
383
384
385
386
387
  WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'

  WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
  WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
  WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
388
     '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
389
390
391
392
393
394
395
396
  WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'

  WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
  WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
  WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
     '"$INSTDIR\vlc.exe" %1'
  WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'

397
${MementoSectionEnd}
398

399
400
401
402
403
404
405
406
407
408

SectionGroup /e !$Name_Section06 SEC06
  SectionGroup $Name_SectionGroupAudio
    !insertmacro MacroAudioExtensions RegisterExtensionSection
  SectionGroupEnd
  SectionGroup $Name_SectionGroupVideo
    !insertmacro MacroVideoExtensions RegisterExtensionSection
  SectionGroupEnd
  SectionGroup $Name_SectionGroupOther
    !insertmacro MacroOtherExtensions RegisterExtensionSection
409
    !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
410
411
412
  SectionGroupEnd
SectionGroupEnd

413
${MementoSection} $Name_Section07 SEC07
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
414
  SectionIn 1 3
415
416
  !insertmacro MacroAllExtensions AddContextMenu
  !insertmacro AddContextMenuExt "Directory"
417
${MementoSectionEnd}
418

419
${MementoUnselectedSection} $Name_Section08 SEC08
420
  !insertmacro delprefs
421
422
423
${MementoSectionEnd}

${MementoSectionDone}
424
425
426

; Installer section descriptions
!insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
427
428
429
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
430
!ifdef INSTALL_MOZILLA
431
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
432
!endif
Rafaël Carré's avatar
Rafaël Carré committed
433
434
435
!ifdef INSTALL_ACTIVEX
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
!endif
436
437
438
439
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
440
441
442
443
!insertmacro MUI_FUNCTION_DESCRIPTION_END

;;; Start function
Function .onInit
444

445
446
@HAVE_WIN64_TRUE@ SetRegView 64

447
448
${MementoSectionRestore}

449
@HAVE_WIN64_TRUE@ !include "x64.nsh"
Ludovic Fauvet's avatar
Ludovic Fauvet committed
450
@HAVE_WIN64_TRUE@ ${Unless} ${RunningX64}
Ludovic Fauvet's avatar
Ludovic Fauvet committed
451
@HAVE_WIN64_TRUE@    MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on 64-bit operating systems.$\nPlease get the 32-bit version and try again."
452
@HAVE_WIN64_TRUE@    Quit
Ludovic Fauvet's avatar
Ludovic Fauvet committed
453
@HAVE_WIN64_TRUE@ ${EndUnless}
454
455
456
457
458
459
460
461
${If} ${AtLeastWinXP}
    ${If} ${IsWinXP}
    ${AndIf} ${AtMostServicePack} 1
        Goto WinTooOld
    ${Endif}
${Else}
    Goto WinTooOld
${Endif}
462

Rafaël Carré's avatar
Rafaël Carré committed
463
464
ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir"
StrCmp $INSTDIR "" 0 UAC_Elevate
465
466
StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"

467
468
469
470
471
472
473
474
UAC_Elevate:
    UAC::RunElevated
    StrCmp 1223 $0 UAC_ElevationAborted
    StrCmp 0 $0 0 UAC_Err
    StrCmp 1 $1 0 UAC_Success
    Quit

UAC_Err:
Ludovic Fauvet's avatar
Ludovic Fauvet committed
475
    MessageBox mb_iconstop "Unable to elevate, error $0$\nPlease try to run this installer with admin privileges."
476
477
478
    Abort

UAC_ElevationAborted:
Ludovic Fauvet's avatar
Ludovic Fauvet committed
479
    MessageBox mb_iconstop "This installer requires admin privileges, aborting!"
480
481
    Abort

482
483
484
485
WinTooOld:
    MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on Windows XP SP2 and newer."
    Quit

486
487
488
UAC_Success:
    StrCmp 1 $3 +4
    StrCmp 3 $1 0 UAC_ElevationAborted
Ludovic Fauvet's avatar
Ludovic Fauvet committed
489
    MessageBox mb_iconstop "This installer requires admin privileges, try again."
490
    goto UAC_Elevate
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509

  ; /update argument
  Call ParseCommandline

  ; See if previous version exists
  Call ReadPreviousVersion

  ${If} $PreviousVersion == ""
    StrCpy $PerformUpdate 0
  ${Else}
    Push "${VERSION}"
    Push $PreviousVersion
    Call VersionCompare

    ${If} $PreviousVersionState != "newer"
      StrCpy $PerformUpdate 0
    ${EndIf}
  ${EndIf}

510
  !insertmacro MUI_LANGDLL_DISPLAY
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
511

512
  !include "languages\english.nsh"
513
  StrCmp $LANGUAGE ${LANG_FRENCH} French 0
514
  StrCmp $LANGUAGE ${LANG_GERMAN} German 0
515
516
517
  StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
  StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
  StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
518
519
520
  StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
  StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
  StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
521
522
  StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
  StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
523
  StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
524
  StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
525
  StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
526
  StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
527
528
;  StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
;  StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
529
  StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
530
  StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
531
  StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
532
  StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
533
  StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
534
  StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
Christophe Mutricy's avatar
Typo    
Christophe Mutricy committed
535
  StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
536
537
538
  StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
  StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
  StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
539
540
541
  StrCmp $LANGUAGE ${LANG_ARABIC} Arabic 0
  StrCmp $LANGUAGE ${LANG_BOSNIAN} Bosnian 0
  StrCmp $LANGUAGE ${LANG_CZECH} Czech 0
542
;  StrCmp $LANGUAGE ${LANG_ENGLISH_UNITED_KINGDOM} English_United_Kingdom 0
543
  StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
544
;  StrCmp $LANGUAGE ${LANG_KHMER} Khmer 0
545
546
547
  StrCmp $LANGUAGE ${LANG_KOREAN} Korean 0
  StrCmp $LANGUAGE ${LANG_MALAY} Malay 0
  StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
548
549
;  StrCmp $LANGUAGE ${LANG_SCOTTISH_GAELIC} Scottish_Gaelic 0
;  StrCmp $LANGUAGE ${LANG_SINHALA} Sinhala 0
550
  StrCmp $LANGUAGE ${LANG_THAI} Thai 0
Daniel Amm's avatar
Daniel Amm committed
551
  StrCmp $LANGUAGE ${LANG_TRADCHINESE} TradChinese 0
552
553
554
555
  StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
  StrCmp $LANGUAGE ${LANG_UKRAINIAN} Ukrainian 0
  StrCmp $LANGUAGE ${LANG_UZBEK} Uzbek 0
  StrCmp $LANGUAGE ${LANG_WELSH} Welsh 0
556
  StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
557
558
  French:
  !include "languages\french.nsh"
559
  Goto EndLanguageCmp
560
561
562
  German:
  !include "languages\german.nsh"
  Goto EndLanguageCmp
563
564
565
566
567
568
569
570
571
  Italian:
  !include "languages\italian.nsh"
  Goto EndLanguageCmp
  Hungarian:
  !include "languages\hungarian.nsh"
  Goto EndLanguageCmp
  Romanian:
  !include "languages\romanian.nsh"
  Goto EndLanguageCmp
572
573
574
575
576
577
578
579
580
  Catalan:
  !include "languages\catalan.nsh"
  Goto EndLanguageCmp
  Bulgarian:
  !include "languages\bulgarian.nsh"
  Goto EndLanguageCmp
  Slovak:
  !include "languages\slovak.nsh"
  Goto EndLanguageCmp
581
582
583
584
585
586
  Polish:
  !include "languages\polish.nsh"
  Goto EndLanguageCmp
  Dutch:
  !include "languages\dutch.nsh"
  Goto EndLanguageCmp
587
588
589
  Danish:
  !include "languages\danish.nsh"
  Goto EndLanguageCmp
590
591
592
  Schinese:
  !include "languages\schinese.nsh"
  Goto EndLanguageCmp
593
594
  Finnish:
  !include "languages\finnish.nsh"
595
  Goto EndLanguageCmp
596
597
598
  Japanese:
  !include "languages\japanese.nsh"
  Goto EndLanguageCmp
Daniel Amm's avatar
Daniel Amm committed
599
600
601
602
603
604
;  Bengali:
;  !include "languages\bengali.nsh"
;  Goto EndLanguageCmp
;  Punjabi:
;  !include "languages\punjabi.nsh"
;  Goto EndLanguageCmp
605
606
607
608
609
610
  Slovenian:
  !include "languages\slovenian.nsh"
  Goto EndLanguageCmp
  Spanish:
  !include "languages\spanish.nsh"
  Goto EndLanguageCmp
Mihkel's avatar
Mihkel committed
611
612
613
  Estonian:
  !include "languages\estonian.nsh"
  Goto EndLanguageCmp
614
615
616
  Lithuanian:
  !include "languages\lithuanian.nsh"
  Goto EndLanguageCmp
617
618
619
  Basque:
  !include "languages\basque.nsh"
  Goto EndLanguageCmp
620
621
622
  Serbian:
  !include "languages\serbian.nsh"
  Goto EndLanguageCmp
623
624
625
  Russian:
  !include "languages\Russian.nsh"
  Goto EndLanguageCmp
626
627
628
629
630
631
632
633
634
  Hebrew:
  !include "languages\hebrew.nsh"
  Goto EndLanguageCmp
  Galician:
  !include "languages\galician.nsh"
  Goto EndLanguageCmp
  Swedish:
  !include "languages\swedish.nsh"
  Goto EndLanguageCmp
635
636
637
638
639
640
641
642
643
  Arabic:
  !include "languages\arabic.nsh"
  Goto EndLanguageCmp
  Bosnian:
  !include "languages\bosnian.nsh"
  Goto EndLanguageCmp
  Czech:
  !include "languages\czech.nsh"
  Goto EndLanguageCmp
644
645
646
;  English_United_Kingdom:
;  !include "languages\english_united_kingdom.nsh"
;  Goto EndLanguageCmp
647
648
649
  Greek:
  !include "languages\greek.nsh"
  Goto EndLanguageCmp
650
651
652
;  Khmer:
;  !include "languages\khmer.nsh"
;  Goto EndLanguageCmp
653
654
655
656
657
658
659
660
661
  Korean:
  !include "languages\korean.nsh"
  Goto EndLanguageCmp
  Malay:
  !include "languages\malay.nsh"
  Goto EndLanguageCmp
  Norwegian:
  !include "languages\norwegian.nsh"
  Goto EndLanguageCmp
662
663
664
665
666
667
;  Scottish_Gaelic:
;  !include "languages\scottish_gaelic.nsh"
;  Goto EndLanguageCmp
;  Sinhala:
;  !include "languages\sinhala.nsh"
;  Goto EndLanguageCmp
668
669
670
  Thai:
  !include "languages\thai.nsh"
  Goto EndLanguageCmp
671
672
  TradChinese:
  !include "languages\tradchinese.nsh"
673
674
675
676
677
678
679
680
681
682
683
684
685
  Goto EndLanguageCmp
  Turkish:
  !include "languages\turkish.nsh"
  Goto EndLanguageCmp
  Ukrainian:
  !include "languages\ukrainian.nsh"
  Goto EndLanguageCmp
  Uzbek:
  !include "languages\uzbek.nsh"
  Goto EndLanguageCmp
  Welsh:
  !include "languages\welsh.nsh"
  Goto EndLanguageCmp
686
687
  Brazilian:
  !include "languages\brazilian_portuguese.nsh"
688
689
  EndLanguageCmp:

690
691
FunctionEnd

692
;;; Page to upgrade / downgrade or customize the installation
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
Function PageReinstall
  ${If} $PreviousVersion == ""
    Abort
  ${EndIf}

  ${If} $PerformUpdate == 1
    StrCpy $ReinstallType 1
    Abort
  ${EndIf}

  nsDialogs::Create /NOUNLOAD 1018
  Pop $0

  ${If} $PreviousVersionState == "newer"

708
709
    !insertmacro MUI_HEADER_TEXT $Reinstall_Headline $Reinstall_HeadlineInstall
    nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 $Reinstall_MessageOlder
710
    Pop $R0
711
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 $Reinstall_OptionUpgrade
712
    Pop $ReinstallUninstallBtn
713
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 $Reinstall_OptionAdvanced
714
715
716
717
718
719
720
721
    Pop $R0

    ${If} $ReinstallType == ""
      StrCpy $ReinstallType 1
    ${EndIf}

  ${ElseIf} $PreviousVersionState == "older"

722
723
    !insertmacro MUI_HEADER_TEXT $Reinstall_Headline $Reinstall_HeadlineInstall
    nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 $Reinstall_MessageNewer
724
    Pop $R0
725
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 $Reinstall_OptionDowngrade
726
    Pop $ReinstallUninstallBtn
727
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 $Reinstall_OptionAdvanced
728
729
730
731
732
733
734
735
    Pop $R0

    ${If} $ReinstallType == ""
      StrCpy $ReinstallType 1
    ${EndIf}

  ${ElseIf} $PreviousVersionState == "same"

736
737
    !insertmacro MUI_HEADER_TEXT $Reinstall_Headline $Reinstall_HeadlineMaintenance
    nsDialogs::CreateItem /NOUNLOAD STATIC ${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 0 0 100% 40 $Reinstall_MessageSame
738
    Pop $R0
739
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_VCENTER}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS}|${WS_GROUP}|${WS_TABSTOP} 0 10 55 100% 30 $Reinstall_OptionComponents
740
    Pop $R0
741
    nsDialogs::CreateItem /NOUNLOAD BUTTON ${BS_AUTORADIOBUTTON}|${BS_TOP}|${BS_MULTILINE}|${WS_VISIBLE}|${WS_CHILD}|${WS_CLIPSIBLINGS} 0 10 85 100% 50 $Reinstall_OptionUninstall
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
    Pop $ReinstallUninstallBtn

    ${If} $ReinstallType == ""
      StrCpy $ReinstallType 2
    ${EndIf}

  ${Else}

    MessageBox MB_ICONSTOP "Unknown value of PreviousVersionState, aborting" /SD IDOK
    Abort

  ${EndIf}

  ${If} $ReinstallType == "1"
    SendMessage $ReinstallUninstallBtn ${BM_SETCHECK} 1 0
  ${Else}
    SendMessage $R0 ${BM_SETCHECK} 1 0
  ${EndIf}

  nsDialogs::Show

FunctionEnd

Function PageLeaveReinstall

  SendMessage $ReinstallUninstallBtn ${BM_GETCHECK} 0 0 $R0
  ${If} $R0 == 1
    ; Option to uninstall old version selected
    StrCpy $ReinstallType 1
  ${Else}
    ; Custom up/downgrade or add/remove/reinstall
    StrCpy $ReinstallType 2
  ${EndIf}

  ${If} $ReinstallType == 1

    ${If} $PreviousVersionState == "same"
Jean-Baptiste Kempf's avatar
Jean-Baptiste Kempf committed
779

780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
      Call RunUninstaller
      Quit

    ${EndIf}

  ${EndIf}

FunctionEnd

Function RunUninstaller
  ReadRegStr $R1 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" "UninstallString"
  ${If} $R1 == ""
    Return
  ${EndIf}

  ;Run uninstaller
  HideWindow
  ClearErrors

  ExecWait '$R1 _?=$INSTDIR'

  IfErrors no_remove_uninstaller

  IfFileExists "$INSTDIR\uninstall.exe" 0 no_remove_uninstaller
    Delete "$R1"
    RMDir $INSTDIR

  no_remove_uninstaller:
FunctionEnd

Function PageSkipPre
  ${If} $PerformUpdate == 1
    Abort
  ${ElseIf} $PreviousVersion != ""
    Abort
  ${EndIf}
FunctionEnd

818
;;; Used during upgrade to skip most pages
819
820
821
822
823
824
825
Function PageFastUpdatePre
  ${If} $PerformUpdate == 1
    Abort
  ${EndIf}
FunctionEnd

Function PageComponentsPre
826
827
828
829
830
831
  ClearErrors
  ReadRegStr $0 ${MEMENTO_REGISTRY_ROOT} `${MEMENTO_REGISTRY_KEY}` MementoSectionUsed
  ; Backward compatibility:
  ; Don't skip the components page until Memento was able to save the user choices.
  IfErrors done

832
833
834
  ${If} $ReinstallType == 1
    Abort
  ${EndIf}
835
836

done:
837
838
839
840
841
842
FunctionEnd

Function PageDirectoryPre
  ${If} $ReinstallType != ""
    Abort
  ${EndIf}
843
844
FunctionEnd

845
846
847
848
849
Function .OnInstFailed
    UAC::Unload
FunctionEnd

Function .OnInstSuccess
850
    ${MementoSectionSave}
851
852
    UAC::Unload
FunctionEnd
853

854
855
856
857
858
859
860
861
862
863
864
;; End function
Section -Post
  WriteUninstaller "$INSTDIR\uninstall.exe"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
  WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"

  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "DisplayName" "$(^Name)"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "UninstallString" "$INSTDIR\uninstall.exe"
865
866
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "InstallLocation" "$INSTDIR"
867
868
869
870
871
872
873
874
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "DisplayIcon" "$INSTDIR\vlc.exe"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "DisplayVersion" "${PRODUCT_VERSION}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "URLInfoAbout" "${PRODUCT_WEB_SITE}"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "Publisher" "${PRODUCT_PUBLISHER}"
875
876
877
878
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "VersionMajor"  "@VERSION_MAJOR@"
  WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
    "VersionMinor" "@VERSION_MINOR@"
879
880
881
882
883
884
SectionEnd

;;;;;;;;;;;;;;;;;;;;;;;;
; Uninstaller sections ;
;;;;;;;;;;;;;;;;;;;;;;;;

885
Section "un.$Name_Section91" SEC91
886
887
888
889
890
  SectionIn 1 2 3 RO
  SetShellVarContext all

  !insertmacro MacroAllExtensions DeleteContextMenu
  !insertmacro MacroAllExtensions UnRegisterExtensionSection
891
  !insertmacro MacroSkinExtensions UnRegisterExtensionSection
892
893
894
  !insertmacro DeleteContextMenuExt "Directory"

  ;remove activex plugin
895
896
@HAVE_WIN64_FALSE@ UnRegDLL "$INSTDIR\axvlc.dll"
@HAVE_WIN64_TRUE@  ExecWait 'regsvr32.exe /s /u "$INSTDIR\axvlc.dll"'
897
  Delete /REBOOTOK "$INSTDIR\axvlc.dll"
898
  Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925

  ;remove mozilla plugin
  Push $R0
  Push $R1
  Push $R2

  !define Index 'Line${__LINE__}'
  StrCpy $R1 "0"

  "${Index}-Loop:"

    ; Check for Key
    EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
    StrCmp $R0 "" "${Index}-End"
    IntOp $R1 $R1 + 1
    ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
    StrCmp $R2 "" "${Index}-Loop" ""

    ; old files (0.8.5 and before) that may be lying around
    Delete /REBOOTOK "$R2\npvlc.dll"
    Delete /REBOOTOK "$R2\libvlc.dll"
    Delete /REBOOTOK "$R2\vlcintf.xpt"
    Goto "${Index}-Loop"

  "${Index}-End:"
  !undef Index
  Delete /REBOOTOK "$INSTDIR\npvlc.dll"
926
  Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951

  RMDir "$SMPROGRAMS\VideoLAN"
  RMDir /r $SMPROGRAMS\VideoLAN

  FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
  UninstallLoop:
    ClearErrors
    FileRead $UninstallLog $R0
    IfErrors UninstallEnd
    Push $R0
    Call un.TrimNewLines
    Pop $R0
    Delete "$INSTDIR\$R0"
    Goto UninstallLoop
  UninstallEnd:
  FileClose $UninstallLog
  Delete "$INSTDIR\uninstall.log"
  Delete "$INSTDIR\uninstall.exe"
  Push "\"
  Call un.RemoveEmptyDirs
  RMDir "$INSTDIR"

  DeleteRegKey HKLM Software\VideoLAN

  DeleteRegKey HKCR Applications\vlc.exe
952
  DeleteRegKey HKLM "Software\Microsoft\Windows\CurrentVersion\App Paths\vlc.exe"
953
954
955
956
957
958
  DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
  DeleteRegKey HKCR DVD\shell\PlayWithVLC
  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
  DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
  DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
  DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
959
960
961
962
963
964
965
966
967
968
969
  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
  DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
  DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
  DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
  DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
  DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
  DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival

970
  DeleteRegKey HKLM Software\Clients\Media\VLC
971
  DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
972
  DeleteRegKey HKCR "VLC.MediaFile"
973
974
975
976
977
978
  DeleteRegKey HKCR "VLC.DVDMovie"
  DeleteRegKey HKCR "VLC.CDAudio"
  DeleteRegKey HKCR "VLC.VCDMovie"
  DeleteRegKey HKCR "VLC.SVCDMovie"
  DeleteRegKey HKCR "VLC.OPENFolder"

979
980
981
982
983
984
985
986
987
988
989
990
991
992

  DeleteRegKey HKLM \
    "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"

  DeleteRegKey HKLM \
    "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"

  Delete "$DESKTOP\VLC media player.lnk"

  DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
  DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
  SetAutoClose true
SectionEnd

993
Section /o "un.$Name_Section92" SEC92
994
995
996
997
998
  !insertmacro delprefs
SectionEnd

; Uninstaller section descriptions
!insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
999
1000
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
  !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
1001
1002
!insertmacro MUI_UNFUNCTION_DESCRIPTION_END

1003
1004
1005
1006
1007
1008
1009
1010
Function un.OnUnInstFailed
    UAC::Unload
FunctionEnd

Function un.OnUnInstSuccess
    UAC::Unload
    Delete "$INSTDIR\UAC.dll"
FunctionEnd
1011
1012

Function un.onInit
1013
1014
1015
1016
1017
1018
1019
1020
1021

UAC_Elevate:
    UAC::RunElevated
    StrCmp 1223 $0 UAC_ElevationAborted
    StrCmp 0 $0 0 UAC_Err
    StrCmp 1 $1 0 UAC_Success
    Quit

UAC_Err:
1022
    MessageBox mb_iconstop "Unable to elevate, error $0$\nPlease try to run this installer with admin privileges."
1023
1024
1025
    Abort

UAC_ElevationAborted:
1026
    MessageBox mb_iconstop "This installer requires admin privileges, aborting!"
1027
1028
1029
    Abort

UAC_Success:
1030
@HAVE_WIN64_TRUE@ SetRegView 64
1031
1032
    StrCmp 1 $3 +4
    StrCmp 3 $1 0 UAC_ElevationAborted
1033
    MessageBox mb_iconstop "This installer requires admin privileges, try again."
1034
1035
    goto UAC_Elevate

1036
  !insertmacro MUI_UNGETLANGUAGE
1037

1038
  !include "languages\english.nsh"
1039
  StrCmp $LANGUAGE ${LANG_FRENCH} French 0
1040
  StrCmp $LANGUAGE ${LANG_GERMAN} German 0
1041
1042
1043
  StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
  StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
  StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
1044
1045
1046
  StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
  StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
  StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
1047
1048
  StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
  StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
1049
  StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
1050
  StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
1051
  StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
1052
  StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
1053
1054
;  StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
;  StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
1055
  StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
1056
  StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
Mihkel's avatar
Mihkel committed
1057
  StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
1058
  StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
1059
  StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
1060
1061
  StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
  StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
1062
1063
1064
  StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
  StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
  StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
1065
1066
1067
  StrCmp $LANGUAGE ${LANG_ARABIC} Arabic 0
  StrCmp $LANGUAGE ${LANG_BOSNIAN} Bosnian 0
  StrCmp $LANGUAGE ${LANG_CZECH} Czech 0
1068
;  StrCmp $LANGUAGE ${LANG_ENGLISH_UNITED_KINGDOM} English_United_Kingdom 0
1069
  StrCmp $LANGUAGE ${LANG_GREEK} Greek 0
1070
;  StrCmp $LANGUAGE ${LANG_KHMER} Khmer 0
1071
1072
1073
  StrCmp $LANGUAGE ${LANG_KOREAN} Korean 0
  StrCmp $LANGUAGE ${LANG_MALAY} Malay 0
  StrCmp $LANGUAGE ${LANG_NORWEGIAN} Norwegian 0
1074
1075
;  StrCmp $LANGUAGE ${LANG_SCOTTISH_GAELIC} Scottish_Gaelic 0
;  StrCmp $LANGUAGE ${LANG_SINHALA} Sinhala 0
1076
  StrCmp $LANGUAGE ${LANG_THAI} Thai 0
Daniel Amm's avatar
Daniel Amm committed
1077
  StrCmp $LANGUAGE ${LANG_TRADCHINESE} TradChinese 0
1078
1079
1080
1081
  StrCmp $LANGUAGE ${LANG_TURKISH} Turkish 0
  StrCmp $LANGUAGE ${LANG_UKRAINIAN} Ukrainian 0
  StrCmp $LANGUAGE ${LANG_UZBEK} Uzbek 0
  StrCmp $LANGUAGE ${LANG_WELSH} Welsh 0
1082
  StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
1083
1084
  French:
  !include "languages\french.nsh"
1085
  Goto EndLanguageCmp
1086
1087
1088
  German:
  !include "languages\german.nsh"
  Goto EndLanguageCmp
1089
1090
1091
1092
1093
1094
1095
1096
1097
  Italian:
  !include "languages\italian.nsh"
  Goto EndLanguageCmp
  Hungarian:
  !include "languages\hungarian.nsh"
  Goto EndLanguageCmp
  Romanian:
  !include "languages\romanian.nsh"
  Goto EndLanguageCmp
1098
1099
1100
1101
1102
1103
1104
1105
1106
  Catalan:
  !include "languages\catalan.nsh"
  Goto EndLanguageCmp
  Bulgarian:
  !include "languages\bulgarian.nsh"
  Goto EndLanguageCmp
  Slovak:
  !include "languages\slovak.nsh"
  Goto EndLanguageCmp
1107
1108
1109
1110
1111
1112
  Polish:
  !include "languages\polish.nsh"
  Goto EndLanguageCmp
  Dutch:
  !include "languages\dutch.nsh"
  Goto EndLanguageCmp
1113
1114
1115
  Danish:
  !include "languages\danish.nsh"
  Goto EndLanguageCmp
1116
1117
1118
  Schinese:
  !include "languages\schinese.nsh"
  Goto EndLanguageCmp
1119
1120
  Finnish:
  !include "languages\finnish.nsh"
1121
  Goto EndLanguageCmp
1122
1123
1124
  Japanese:
  !include "languages\japanese.nsh"
  Goto EndLanguageCmp
Daniel Amm's avatar
Daniel Amm committed
1125
1126
1127
1128
1129
1130
;  Bengali:
;  !include "languages\bengali.nsh"
;  Goto EndLanguageCmp
;  Punjabi:
;  !include "languages\punjabi.nsh"
;  Goto EndLanguageCmp
1131
1132
1133
1134
1135
1136
  Slovenian:
  !include "languages\slovenian.nsh"
  Goto EndLanguageCmp
  Spanish:
  !include "languages\spanish.nsh"
  Goto EndLanguageCmp
Mihkel's avatar
Mihkel committed
1137
1138
1139
  Estonian:
  !include "languages\estonian.nsh"
  Goto EndLanguageCmp
1140
1141
1142
  Lithuanian:
  !include "languages\lithuanian.nsh"
  Goto EndLanguageCmp
1143
1144
1145
  Basque:
  !include "languages\basque.nsh"
  Goto EndLanguageCmp
1146
1147
1148
  Serbian:
  !include "languages\serbian.nsh"
  Goto EndLanguageCmp
1149
1150
1151
  Russian:
  !include "languages\russian.nsh"
  Goto EndLanguageCmp
1152
1153
1154
1155
1156
1157
1158
1159
1160
  Hebrew:
  !include "languages\hebrew.nsh"
  Goto EndLanguageCmp
  Galician:
  !include "languages\galician.nsh"
  Goto EndLanguageCmp
  Swedish:
  !include "languages\swedish.nsh"
  Goto EndLanguageCmp
1161
1162
1163
1164
1165
1166
1167
1168
1169
  Arabic:
  !include "languages\arabic.nsh"
  Goto EndLanguageCmp
  Bosnian:
  !include "languages\bosnian.nsh"
  Goto EndLanguageCmp
  Czech:
  !include "languages\czech.nsh"
  Goto EndLanguageCmp
1170
1171
1172
;  English_United_Kingdom:
;  !include "languages\english_united_kingdom.nsh"
;  Goto EndLanguageCmp
1173
1174
1175
  Greek:
  !include "languages\greek.nsh"
  Goto EndLanguageCmp
1176
1177
1178
;  Khmer:
;  !include "languages\khmer.nsh"
;  Goto EndLanguageCmp
1179
1180
1181
1182
1183
1184
1185
1186
1187
  Korean:
  !include "languages\korean.nsh"
  Goto EndLanguageCmp
  Malay:
  !include "languages\malay.nsh"
  Goto EndLanguageCmp
  Norwegian:
  !include "languages\norwegian.nsh"
  Goto EndLanguageCmp
1188
1189
1190
1191
1192
1193
;  Scottish_Gaelic:
;  !include "languages\scottish_gaelic.nsh"
;  Goto EndLanguageCmp
;  Sinhala:
;  !include "languages\sinhala.nsh"
;  Goto EndLanguageCmp
1194
1195
1196
  Thai:
  !include "languages\thai.nsh"
  Goto EndLanguageCmp
1197
1198
  TradChinese:
  !include "languages\tradchinese.nsh"
1199
1200
1201
1202
1203
1204
1205
1206
1207
1208
1209
1210
1211
  Goto EndLanguageCmp
  Turkish:
  !include "languages\turkish.nsh"
  Goto EndLanguageCmp
  Ukrainian:
  !include "languages\ukrainian.nsh"
  Goto EndLanguageCmp
  Uzbek:
  !include "languages\uzbek.nsh"
  Goto EndLanguageCmp
  Welsh:
  !include "languages\welsh.nsh"
  Goto EndLanguageCmp
1212
1213
  Brazilian:
  !include "languages\brazilian_portuguese.nsh"
1214
  EndLanguageCmp:
1215

1216
FunctionEnd