]> git.sesse.net Git - vlc/blob - extras/package/win32/vlc.win32.nsi.in
Win32: add VLC to the "Set program access and computer defaults" dialog
[vlc] / extras / package / win32 / vlc.win32.nsi.in
1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; NSIS installer script for vlc ;
3 ; (http://nsis.sourceforge.net) ;
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
5
6 !include "languages\declaration.nsh"
7
8 !define PRODUCT_NAME "VLC media player"
9 !define VERSION @VERSION@
10 !define PRODUCT_VERSION @VERSION@
11 !define PRODUCT_GROUP "VideoLAN"
12 !define PRODUCT_PUBLISHER "VideoLAN Team"
13 !define PRODUCT_WEB_SITE "http://www.videolan.org"
14 !define PRODUCT_DIR_REGKEY "Software\VideoLAN\VLC"
15 !define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
16 !define PRODUCT_UNINST_ROOT_KEY "HKLM"
17 !define PRODUCT_ID "{ea92ef52-afe4-4212-bacb-dfe9fca94cd6}"
18
19 !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
20 !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}"
21 !define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
22
23 @BUILD_ACTIVEX_TRUE@ !define INSTALL_ACTIVEX
24 @BUILD_MOZILLA_TRUE@ !define INSTALL_MOZILLA
25
26 @FILE_LIBVLCCORE_DLL@
27 @FILE_LIBVLC_DLL@
28
29 ;;;;;;;;;;;;;;;;;;;;;;;;;
30 ; General configuration ;
31 ;;;;;;;;;;;;;;;;;;;;;;;;;
32
33 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
34 OutFile ..\vlc-${VERSION}-win32.exe
35 InstallDir "$PROGRAMFILES\VideoLAN\VLC"
36 InstallDirRegKey HKLM "${PRODUCT_DIR_REGKEY}" ""
37 !ifdef NSIS_LZMA_COMPRESS_WHOLE
38 SetCompressor lzma
39 !else
40 SetCompressor /SOLID lzma
41 !endif
42
43 SetOverwrite ifnewer
44 CRCCheck on
45 BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
46
47 InstType $Name_InstTypeRecommended
48 InstType $Name_InstTypeMinimum
49 InstType $Name_InstTypeFull
50
51 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
52 ; NSIS Modern User Interface configuration ;
53 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
54
55 ; MUI 1.67 compatible ------
56   !include "MUI.nsh"
57
58 ; MUI Settings
59   !define MUI_ABORTWARNING
60   !define MUI_ICON "vlc.ico"
61   !define MUI_UNICON "vlc.ico"
62   !define MUI_COMPONENTSPAGE_SMALLDESC
63
64 ; Installer pages
65   ; Welcome page
66     !define MUI_WELCOMEPAGE_TITLE_3LINES
67     !insertmacro MUI_PAGE_WELCOME
68   ; License page
69     !define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
70     !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
71   ; Components page
72     !insertmacro MUI_PAGE_COMPONENTS
73   ; Directory page
74     !insertmacro MUI_PAGE_DIRECTORY
75   ; Instfiles page
76     !insertmacro MUI_PAGE_INSTFILES
77   ; Finish page
78     !define MUI_FINISHPAGE_RUN "$INSTDIR\vlc.exe"
79     !define MUI_FINISHPAGE_SHOWREADME "$INSTDIR\README.txt"
80     !define MUI_FINISHPAGE_SHOWREADME_NOTCHECKED
81     !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
82     !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
83     !define MUI_FINISHPAGE_NOREBOOTSUPPORT
84     !insertmacro MUI_PAGE_FINISH
85
86 ; Uninstaller pages
87     !insertmacro MUI_UNPAGE_CONFIRM
88     !insertmacro MUI_UNPAGE_COMPONENTS
89     !insertmacro MUI_UNPAGE_INSTFILES
90     !insertmacro MUI_UNPAGE_FINISH
91
92 ; Language files
93   !insertmacro MUI_LANGUAGE "English" # first language is the default language
94   !insertmacro MUI_LANGUAGE "French"
95   !insertmacro MUI_LANGUAGE "German"
96   !insertmacro MUI_LANGUAGE "Spanish"
97   !insertmacro MUI_LANGUAGE "SimpChinese"
98   !insertmacro MUI_LANGUAGE "TradChinese"
99   !insertmacro MUI_LANGUAGE "Japanese"
100   !insertmacro MUI_LANGUAGE "Korean"
101   !insertmacro MUI_LANGUAGE "Italian"
102   !insertmacro MUI_LANGUAGE "Dutch"
103   !insertmacro MUI_LANGUAGE "Danish"
104   !insertmacro MUI_LANGUAGE "Swedish"
105   !insertmacro MUI_LANGUAGE "Norwegian"
106   !insertmacro MUI_LANGUAGE "Finnish"
107   !insertmacro MUI_LANGUAGE "Greek"
108   !insertmacro MUI_LANGUAGE "Russian"
109   !insertmacro MUI_LANGUAGE "Portuguese"
110   !insertmacro MUI_LANGUAGE "PortugueseBR"
111   !insertmacro MUI_LANGUAGE "Arabic"
112   !insertmacro MUI_LANGUAGE "Polish"
113   !insertmacro MUI_LANGUAGE "Romanian"
114   !insertmacro MUI_LANGUAGE "Slovak"
115   !insertmacro MUI_LANGUAGE "Czech"
116   !insertmacro MUI_LANGUAGE "Hungarian"
117   !insertmacro MUI_LANGUAGE "Catalan"
118   !insertmacro MUI_LANGUAGE "Bulgarian"
119
120 ; Reserve files for solid compression
121   !insertmacro MUI_RESERVEFILE_LANGDLL
122   !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
123
124 ; MUI end ------
125
126 ;;;;;;;;;;;;;;;;;;;;;;;
127 ; Macro and Functions ;
128 ;;;;;;;;;;;;;;;;;;;;;;;
129
130 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
131 ; 1. File type associations ;
132 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
133
134 ;; Function that register one extension for VLC
135 Function RegisterExtension
136   ; back up old value for extension $R0 (eg. ".opt")
137   ReadRegStr $1 HKCR "$R0" ""
138   StrCmp $1 "" NoBackup
139     StrCmp $1 "VLC$R0" "NoBackup"
140     WriteRegStr HKCR "$R0" "VLC.backup" $1
141 NoBackup:
142   WriteRegStr HKCR "$R0" "" "VLC$R0"
143   ReadRegStr $0 HKCR "VLC$R0" ""
144   WriteRegStr HKCR "VLC$R0" "" "VLC media file ($R0)"
145   WriteRegStr HKCR "VLC$R0\shell" "" "Open"
146   WriteRegStr HKCR "VLC$R0\shell\Open" "" $ShellAssociation_Play
147   WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
148   WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
149
150 ;;; Vista Only part
151   ; Vista and above detection
152   ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
153   StrCpy $R2 $R1 1
154   StrCmp $R2 '6' ForVista ToEnd
155 ForVista:
156   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
157
158 ToEnd:
159 FunctionEnd
160
161 ;; Function that removes one extension that VLC owns.
162 Function un.RegisterExtension
163   ;start of restore script
164   ReadRegStr $1 HKCR "$R0" ""
165   StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
166     ; Read the old value from Backup
167     ReadRegStr $1 HKCR "$R0" "VLC.backup"
168     StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
169       DeleteRegKey HKCR "$R0"
170     Goto NoOwn
171 Restore:
172       WriteRegStr HKCR "$R0" "" $1
173       DeleteRegValue HKCR "$R0" "VLC.backup"
174 NoOwn:
175     DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
176     DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
177 FunctionEnd
178
179 !macro RegisterExtensionSection EXT
180   Section ${EXT}
181     SectionIn 1 3
182     Push $R0
183     StrCpy $R0 ${EXT}
184     Call RegisterExtension
185     Pop $R0
186   SectionEnd
187 !macroend
188
189 !macro UnRegisterExtensionSection EXT
190   Push $R0
191   StrCpy $R0 ${EXT}
192   Call un.RegisterExtension
193   Pop $R0
194 !macroend
195
196 !macro WriteRegStrSupportedTypes EXT
197   WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
198 !macroend
199
200 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
201 ; Extension lists  Macros                    ;
202 ; Those macros calls the previous functions  ;
203 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
204
205 !macro MacroAudioExtensions _action
206   !insertmacro ${_action} ".a52"
207   !insertmacro ${_action} ".aac"
208   !insertmacro ${_action} ".ac3"
209   !insertmacro ${_action} ".aob"
210   !insertmacro ${_action} ".dts"
211   !insertmacro ${_action} ".flac"
212   !insertmacro ${_action} ".m4a"
213   !insertmacro ${_action} ".m4p"
214   !insertmacro ${_action} ".mka"
215   !insertmacro ${_action} ".mod"
216   !insertmacro ${_action} ".mp1"
217   !insertmacro ${_action} ".mp2"
218   !insertmacro ${_action} ".mp3"
219   !insertmacro ${_action} ".oma"
220   !insertmacro ${_action} ".oga"
221   !insertmacro ${_action} ".spx"
222   !insertmacro ${_action} ".wav"
223   !insertmacro ${_action} ".wma"
224   !insertmacro ${_action} ".wv"
225   !insertmacro ${_action} ".xm"
226 !macroend
227
228 !macro MacroVideoExtensions _action
229   !insertmacro ${_action} ".asf"
230   !insertmacro ${_action} ".avi"
231   !insertmacro ${_action} ".divx"
232   !insertmacro ${_action} ".dv"
233   !insertmacro ${_action} ".flv"
234   !insertmacro ${_action} ".gxf"
235   !insertmacro ${_action} ".m1v"
236   !insertmacro ${_action} ".m2v"
237   !insertmacro ${_action} ".m2ts"
238   !insertmacro ${_action} ".m4v"
239   !insertmacro ${_action} ".mkv"
240   !insertmacro ${_action} ".mov"
241   !insertmacro ${_action} ".mp4"
242   !insertmacro ${_action} ".mpeg"
243   !insertmacro ${_action} ".mpeg1"
244   !insertmacro ${_action} ".mpeg2"
245   !insertmacro ${_action} ".mpeg4"
246   !insertmacro ${_action} ".mpg"
247   !insertmacro ${_action} ".mts"
248   !insertmacro ${_action} ".mxf"
249   !insertmacro ${_action} ".nuv"
250   !insertmacro ${_action} ".ogg"
251   !insertmacro ${_action} ".ogm"
252   !insertmacro ${_action} ".ogx"
253   !insertmacro ${_action} ".ogv"
254   !insertmacro ${_action} ".rmvb"
255   !insertmacro ${_action} ".ts"
256   !insertmacro ${_action} ".vob"
257   !insertmacro ${_action} ".wmv"
258 !macroend
259
260 !macro MacroOtherExtensions _action
261   !insertmacro ${_action} ".asx"
262   !insertmacro ${_action} ".bin"
263   !insertmacro ${_action} ".cue"
264   !insertmacro ${_action} ".ifo"
265   !insertmacro ${_action} ".m3u"
266   !insertmacro ${_action} ".pls"
267   !insertmacro ${_action} ".sdp"
268   !insertmacro ${_action} ".vlc"
269   !insertmacro ${_action} ".xspf"
270 !macroend
271
272 ; One macro to rule them all
273 !macro MacroAllExtensions _action
274   !insertmacro MacroAudioExtensions ${_action}
275   !insertmacro MacroVideoExtensions ${_action}
276   !insertmacro MacroOtherExtensions ${_action}
277 !macroend
278
279 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
280 ; 2. Context menu entries ;
281 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
282
283 ; Generic function for adding the context menu for one ext.
284 !macro AddContextMenuExt EXT
285   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
286   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
287
288   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
289   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
290 !macroend
291
292 !macro AddContextMenu EXT
293   Push $R0
294   ReadRegStr $R0 HKCR ${EXT} ""
295   !insertmacro AddContextMenuExt $R0
296   Pop $R0
297 !macroend
298
299 !macro DeleteContextMenuExt EXT
300   DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
301   DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
302 !macroend
303
304 !macro DeleteContextMenu EXT
305   Push $R0
306   ReadRegStr $R0 HKCR ${EXT} ""
307   !insertmacro DeleteContextMenuExt $R0
308   Pop $R0
309 !macroend
310
311 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
312 ; 3. Delete prefs and cache ;
313 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
314
315 !macro delprefs
316   StrCpy $0 0
317   !define Index 'Line${__LINE__}'
318   "${Index}-Loop:"
319   ; FIXME
320   ; this will loop through all the logged users and "virtual" windows users
321   ; (it looks like users are only present in HKEY_USERS when they are logged in)
322     ClearErrors
323     EnumRegKey $1 HKU "" $0
324     StrCmp $1 "" "${Index}-End"
325     IntOp $0 $0 + 1
326     ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
327     StrCmp $2 "" "${Index}-Loop"
328     RMDir /r "$2\vlc"
329     Goto "${Index}-Loop"
330   "${Index}-End:"
331   !undef Index
332 !macroend
333
334 ;;;;;;;;;;;;;;;
335 ; 4. Logging  ;
336 ;;;;;;;;;;;;;;;
337 Var UninstallLog
338 !macro OpenUninstallLog
339   FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
340   FileSeek $UninstallLog 0 END
341 !macroend
342
343 !macro CloseUninstallLog
344   FileClose $UninstallLog
345   SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
346 !macroend
347
348 ;;;;;;;;;;;;;;;;;;;;
349 ; 5. Installations ;
350 ;;;;;;;;;;;;;;;;;;;;
351 !macro InstallFile FILEREGEX
352   File "${FILEREGEX}"
353   !define Index 'Line${__LINE__}'
354   FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
355   StrCmp $0 "" "${Index}-End"
356   "${Index}-Loop:"
357     StrCmp $1 "" "${Index}-End"
358     FileWrite $UninstallLog "$1$\r$\n"
359     FindNext $0 $1
360     Goto "${Index}-Loop"
361   "${Index}-End:"
362   !undef Index
363 !macroend
364
365 !macro InstallFolder FOLDER
366   File /r "${FOLDER}"
367   Push "${FOLDER}"
368   Call InstallFolderInternal
369 !macroend
370
371 Function InstallFolderInternal
372   Pop $9
373   !define Index 'Line${__LINE__}'
374   FindFirst $0 $1 "$INSTDIR\$9\*"
375   StrCmp $0 "" "${Index}-End"
376   "${Index}-Loop:"
377     StrCmp $1 "" "${Index}-End"
378     StrCmp $1 "." "${Index}-Next"
379     StrCmp $1 ".." "${Index}-Next"
380     IfFileExists "$9\$1\*" 0 "${Index}-Write"
381       Push $0
382       Push $9
383       Push "$9\$1"
384       Call InstallFolderInternal
385       Pop $9
386       Pop $0
387       Goto "${Index}-Next"
388     "${Index}-Write:"
389     FileWrite $UninstallLog "$9\$1$\r$\n"
390     "${Index}-Next:"
391     FindNext $0 $1
392     Goto "${Index}-Loop"
393   "${Index}-End:"
394   !undef Index
395 FunctionEnd
396 ;;; End of Macros
397
398
399 ;;;;;;;;;;;;;;;;;;;;;;
400 ; Installer sections ;
401 ; The CORE of the    ;
402 ; installer          ;
403 ;;;;;;;;;;;;;;;;;;;;;;
404
405 Section $Name_Section01 SEC01
406   SectionIn 1 2 3 RO
407   SetShellVarContext all
408   SetOutPath "$INSTDIR"
409
410   !insertmacro OpenUninstallLog
411
412   ; VLC.exe, libvlc.dll
413   !insertmacro InstallFile vlc.exe
414   !insertmacro InstallFile vlc.exe.manifest
415
416   ; All dlls
417   !insertmacro InstallFile *.dll
418
419   ; Text files
420   !insertmacro InstallFile *.txt
421
422   ; Subfolders
423   !insertmacro InstallFolder plugins
424   !insertmacro InstallFolder locale
425 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
426 @BUILD_SKINS_TRUE@   !insertmacro InstallFolder skins
427 @BUILD_HTTPD_TRUE@   !insertmacro InstallFolder http
428 @BUILD_LUA_TRUE@     !insertmacro InstallFolder lua
429
430
431   ; URLs
432   WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
433     "${PRODUCT_WEB_SITE}"
434   FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
435   WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
436     "${PRODUCT_WEB_SITE}/doc/"
437   FileWrite $UninstallLog "Documentation.url$\r$\n"
438   WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
439     "${PRODUCT_WEB_SITE}/vlc/skins.php"
440   FileWrite $UninstallLog "New_Skins.url$\r$\n"
441
442   !insertmacro CloseUninstallLog
443
444   ; Add VLC to "recommended programs" for the following extensions
445   WriteRegStr HKCR Applications\vlc.exe "" ""
446   WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
447   WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
448   WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
449     '"$INSTDIR\vlc.exe" --started-from-file "%1"'
450   !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
451
452 ; Windows default programs Registration
453   ; Vista and above detection
454   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
455   StrCpy $R1 $R0 1
456   StrCmp $R1 '6' lbl_vista lbl_done
457
458   lbl_vista:
459   WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
460   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
461   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
462   WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
463   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
464   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
465   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
466   WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
467
468   lbl_done:
469 SectionEnd
470
471 Section $Name_Section02a SEC02a
472   SectionIn 1 2 3
473   CreateDirectory "$SMPROGRAMS\VideoLAN"
474   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings"
475   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio"
476   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \
477     "$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc://quit"
478   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \
479     "$INSTDIR\vlc.exe" "--aout waveout --save-config vlc://quit"
480   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface"
481 @BUILD_SKINS_TRUE@  CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \
482 @BUILD_SKINS_TRUE@    "$INSTDIR\vlc.exe" "-I skins --save-config vlc://quit"
483   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Qt (default).lnk" \
484     "$INSTDIR\vlc.exe" "-I qt --save-config vlc://quit"
485   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video"
486   ; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX
487   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \
488     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc://quit"
489   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \
490     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc://quit"
491   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \
492     "$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc://quit"
493   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \
494     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --no-directx-hw-yuv --save-config vlc://quit"
495   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no video overlay).lnk" \
496     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc://quit"
497   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \
498     "$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc://quit"
499   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \
500     "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
501   CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
502     "$INSTDIR\Documentation.url"
503   CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
504     "$INSTDIR\NEWS.txt" ""
505   CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
506     "$INSTDIR\${PRODUCT_GROUP} Website.url"
507   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
508     "$INSTDIR\vlc.exe" ""
509 SectionEnd
510
511 Section $Name_Section02b SEC02b
512   SectionIn 1 2 3
513   CreateShortCut "$DESKTOP\VLC media player.lnk" \
514     "$INSTDIR\vlc.exe" ""
515 SectionEnd
516
517 !ifdef INSTALL_MOZILLA
518 Section /o $Name_Section03 SEC03
519   SectionIn 3
520
521   SetOutPath "$INSTDIR"
522   !insertmacro OpenUninstallLog
523   !insertmacro InstallFile mozilla\npvlc.dll
524   !insertmacro InstallFile mozilla\npvlc.dll.manifest
525   !insertmacro CloseUninstallLog
526
527   !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
528   WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
529   WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
530   WriteRegStr HKLM ${Moz} "Product" "VLC media player"
531   WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
532   WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
533
534  ; for very old version of mozilla, these lines may be needed
535  ;Push $R0
536  ;Push $R1
537  ;Push $R2
538
539  ;!define Index 'Line${__LINE__}'
540  ;StrCpy $R1 "0"
541
542  ;"${Index}-Loop:"
543
544  ;  ; Check for Key
545  ;  EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
546  ;  StrCmp $R0 "" "${Index}-End"
547  ;  IntOp $R1 $R1 + 1
548  ;  ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
549  ;  StrCmp $R2 "" "${Index}-Loop" ""
550
551  ;  CopyFiles "$INSTDIR\npvlc.dll" "$R2"
552  ;  !ifdef LIBVLC_DLL
553  ;  CopyFiles ${LIBVLC_DLL} "$R2"
554  ;  !endif
555  ;  !ifdef LIBVLC_CONTROL_DLL
556  ;  CopyFiles ${LIBVLC_CONTROL_DLL} "$R2"
557  ;  !endif
558  ;  Goto "${Index}-Loop"
559
560  ;"${Index}-End:"
561  ;!undef Index
562
563 SectionEnd
564 !endif
565
566 !ifdef INSTALL_ACTIVEX
567 Section $Name_Section04 SEC04
568   SectionIn 3
569   SetOutPath "$INSTDIR"
570   !insertmacro OpenUninstallLog
571   !insertmacro InstallFile activex\axvlc.dll
572   !insertmacro InstallFile activex\axvlc.dll.manifest
573   !insertmacro CloseUninstallLog
574   RegDLL "$INSTDIR\axvlc.dll"
575 SectionEnd
576 !endif
577
578
579 Section $Name_Section05 SEC05
580   SectionIn 1 2 3
581   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
582   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
583     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
584   WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
585   WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
586     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
587
588   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
589   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
590   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
591   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
592   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
593   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
594
595   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
596   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
597   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
598   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
599   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
600   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
601   WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
602   WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
603   WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
604     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
605   WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
606   WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
607   WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
608   WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
609     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
610   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
611
612 SectionEnd
613
614
615 SectionGroup /e !$Name_Section06 SEC06
616   SectionGroup $Name_SectionGroupAudio
617     !insertmacro MacroAudioExtensions RegisterExtensionSection
618   SectionGroupEnd
619   SectionGroup $Name_SectionGroupVideo
620     !insertmacro MacroVideoExtensions RegisterExtensionSection
621   SectionGroupEnd
622   SectionGroup $Name_SectionGroupOther
623     !insertmacro MacroOtherExtensions RegisterExtensionSection
624   SectionGroupEnd
625 SectionGroupEnd
626
627 Section $Name_Section07 SEC07
628   SectionIn 1 3
629   !insertmacro MacroAllExtensions AddContextMenu
630   !insertmacro AddContextMenuExt "Directory"
631 SectionEnd
632
633 Section $Name_Section08 SEC08
634   !insertmacro delprefs
635 SectionEnd
636
637 ; Installer section descriptions
638 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
639   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
640   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
641   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
642 @BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
643 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
644   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
645   !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
646   !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
647   !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
648 !insertmacro MUI_FUNCTION_DESCRIPTION_END
649
650 ;;; Start function
651 Function .onInit
652   !insertmacro MUI_LANGDLL_DISPLAY
653
654   !include "languages\english.nsh"
655   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
656   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
657   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
658   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
659   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
660   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
661   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
662   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
663   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
664   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
665   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
666   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
667   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
668   French:
669   !include "languages\french.nsh"
670   Goto EndLanguageCmp
671   German:
672   !include "languages\german.nsh"
673   Goto EndLanguageCmp
674   Italian:
675   !include "languages\italian.nsh"
676   Goto EndLanguageCmp
677   Hungarian:
678   !include "languages\hungarian.nsh"
679   Goto EndLanguageCmp
680   Romanian:
681   !include "languages\romanian.nsh"
682   Goto EndLanguageCmp
683   Catalan:
684   !include "languages\catalan.nsh"
685   Goto EndLanguageCmp
686   Bulgarian:
687   !include "languages\bulgarian.nsh"
688   Goto EndLanguageCmp
689   Slovak:
690   !include "languages\slovak.nsh"
691   Goto EndLanguageCmp
692   Polish:
693   !include "languages\polish.nsh"
694   Goto EndLanguageCmp
695   Dutch:
696   !include "languages\dutch.nsh"
697   Goto EndLanguageCmp
698   Schinese:
699   !include "languages\schinese.nsh"
700   Goto EndLanguageCmp
701   Finnish:
702   !include "languages\finnish.nsh"
703   Goto EndLanguageCmp
704   Brazilian:
705   !include "languages\brazilian_portuguese.nsh"
706   EndLanguageCmp:
707
708   ReadRegStr $R0  ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
709   "UninstallString"
710   StrCmp $R0 "" done
711
712   MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
713
714   ;Run the uninstaller
715   ;uninst:
716     ClearErrors
717     ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
718   done:
719
720 FunctionEnd
721
722 ;; End function
723 Section -Post
724   WriteUninstaller "$INSTDIR\uninstall.exe"
725   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
726   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
727   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
728
729   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
730     "DisplayName" "$(^Name)"
731   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
732     "UninstallString" "$INSTDIR\uninstall.exe"
733   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
734     "InstallLocation" "$INSTDIR"
735   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
736     "DisplayIcon" "$INSTDIR\vlc.exe"
737   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
738     "DisplayVersion" "${PRODUCT_VERSION}"
739   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
740     "URLInfoAbout" "${PRODUCT_WEB_SITE}"
741   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
742     "Publisher" "${PRODUCT_PUBLISHER}"
743   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
744     "VersionMajor"  "@VERSION_MAJOR@"
745   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
746     "VersionMinor" "@VERSION_MINOR@"
747 SectionEnd
748
749 ;;;;;;;;;;;;;;;;;;;;;;;;
750 ; Uninstaller sections ;
751 ;;;;;;;;;;;;;;;;;;;;;;;;
752
753 ; TrimNewlines (copied from NSIS documentation)
754 ; input, top of stack  (e.g. whatever$\r$\n)
755 ; output, top of stack (replaces, with e.g. whatever)
756 ; modifies no other variables.
757
758 Function un.TrimNewlines
759  Exch $R0
760  Push $R1
761  Push $R2
762  StrCpy $R1 0
763
764  loop:
765    IntOp $R1 $R1 - 1
766    StrCpy $R2 $R0 1 $R1
767    StrCmp $R2 "$\r" loop
768    StrCmp $R2 "$\n" loop
769    IntOp $R1 $R1 + 1
770    IntCmp $R1 0 no_trim_needed
771    StrCpy $R0 $R0 $R1
772
773  no_trim_needed:
774    Pop $R2
775    Pop $R1
776    Exch $R0
777 FunctionEnd
778
779 Function un.RemoveEmptyDirs
780   Pop $9
781   !define Index 'Line${__LINE__}'
782   FindFirst $0 $1 "$INSTDIR$9*"
783   StrCmp $0 "" "${Index}-End"
784   "${Index}-Loop:"
785     StrCmp $1 "" "${Index}-End"
786     StrCmp $1 "." "${Index}-Next"
787     StrCmp $1 ".." "${Index}-Next"
788       Push $0
789       Push $1
790       Push $9
791       Push "$9$1\"
792       Call un.RemoveEmptyDirs
793       Pop $9
794       Pop $1
795       Pop $0
796     "${Index}-Remove:"
797     RMDir "$INSTDIR$9$1"
798     "${Index}-Next:"
799     FindNext $0 $1
800     Goto "${Index}-Loop"
801   "${Index}-End:"
802   FindClose $0
803   !undef Index
804 FunctionEnd
805
806 Section "un.$Name_Section91" SEC91
807   SectionIn 1 2 3 RO
808   SetShellVarContext all
809
810   !insertmacro MacroAllExtensions DeleteContextMenu
811   !insertmacro MacroAllExtensions UnRegisterExtensionSection
812   !insertmacro DeleteContextMenuExt "Directory"
813
814   ;remove activex plugin
815   UnRegDLL "$INSTDIR\axvlc.dll"
816   Delete /REBOOTOK "$INSTDIR\axvlc.dll"
817   Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
818
819   ;remove mozilla plugin
820   Push $R0
821   Push $R1
822   Push $R2
823
824   !define Index 'Line${__LINE__}'
825   StrCpy $R1 "0"
826
827   "${Index}-Loop:"
828
829     ; Check for Key
830     EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
831     StrCmp $R0 "" "${Index}-End"
832     IntOp $R1 $R1 + 1
833     ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
834     StrCmp $R2 "" "${Index}-Loop" ""
835
836     ; old files (0.8.5 and before) that may be lying around
837     Delete /REBOOTOK "$R2\npvlc.dll"
838     Delete /REBOOTOK "$R2\libvlc.dll"
839     Delete /REBOOTOK "$R2\vlcintf.xpt"
840     Goto "${Index}-Loop"
841
842   "${Index}-End:"
843   !undef Index
844   Delete /REBOOTOK "$INSTDIR\npvlc.dll"
845   Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
846
847   RMDir "$SMPROGRAMS\VideoLAN"
848   RMDir /r $SMPROGRAMS\VideoLAN
849
850   FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
851   UninstallLoop:
852     ClearErrors
853     FileRead $UninstallLog $R0
854     IfErrors UninstallEnd
855     Push $R0
856     Call un.TrimNewLines
857     Pop $R0
858     Delete "$INSTDIR\$R0"
859     Goto UninstallLoop
860   UninstallEnd:
861   FileClose $UninstallLog
862   Delete "$INSTDIR\uninstall.log"
863   Delete "$INSTDIR\uninstall.exe"
864   Push "\"
865   Call un.RemoveEmptyDirs
866   RMDir "$INSTDIR"
867
868   DeleteRegKey HKLM Software\VideoLAN
869
870   DeleteRegKey HKCR Applications\vlc.exe
871   DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
872   DeleteRegKey HKCR DVD\shell\PlayWithVLC
873   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
874   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
875   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
876   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
877   DeleteRegKey HKLM Software\Clients\Media\VLC
878   DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
879   DeleteRegKey HKCR "VLC.MediaFile"
880
881   DeleteRegKey HKLM \
882     "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
883
884   DeleteRegKey HKLM \
885     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
886
887   Delete "$DESKTOP\VLC media player.lnk"
888
889   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
890   DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
891   SetAutoClose true
892 SectionEnd
893
894 Section /o "un.$Name_Section92" SEC92
895   !insertmacro delprefs
896 SectionEnd
897
898 ; Uninstaller section descriptions
899 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
900   !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
901   !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
902 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
903
904 ;Function un.onUninstSuccess
905 ;  HideWindow
906 ;  MessageBox MB_ICONINFORMATION|MB_OK \
907 ;    "$(^Name) was successfully removed from your computer."
908 ;FunctionEnd
909
910 Function un.onInit
911   !insertmacro MUI_UNGETLANGUAGE
912
913   !include "languages\english.nsh"
914   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
915   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
916   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
917   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
918   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
919   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
920   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
921   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
922   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
923   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
924   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
925   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
926   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
927   French:
928   !include "languages\french.nsh"
929   Goto EndLanguageCmp
930   German:
931   !include "languages\german.nsh"
932   Goto EndLanguageCmp
933   Italian:
934   !include "languages\italian.nsh"
935   Goto EndLanguageCmp
936   Hungarian:
937   !include "languages\hungarian.nsh"
938   Goto EndLanguageCmp
939   Romanian:
940   !include "languages\romanian.nsh"
941   Goto EndLanguageCmp
942   Catalan:
943   !include "languages\catalan.nsh"
944   Goto EndLanguageCmp
945   Bulgarian:
946   !include "languages\bulgarian.nsh"
947   Goto EndLanguageCmp
948   Slovak:
949   !include "languages\slovak.nsh"
950   Goto EndLanguageCmp
951   Polish:
952   !include "languages\polish.nsh"
953   Goto EndLanguageCmp
954   Dutch:
955   !include "languages\dutch.nsh"
956   Goto EndLanguageCmp
957   Schinese:
958   !include "languages\schinese.nsh"
959   Goto EndLanguageCmp
960   Finnish:
961   !include "languages\finnish.nsh"
962   Goto EndLanguageCmp
963   Brazilian:
964   !include "languages\brazilian_portuguese.nsh"
965   EndLanguageCmp:
966
967 FunctionEnd