]> git.sesse.net Git - vlc/blob - extras/package/win32/vlc.win32.nsi.in
Integrate .tta in interface and installer
[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} ".tta"
223   !insertmacro ${_action} ".wav"
224   !insertmacro ${_action} ".wma"
225   !insertmacro ${_action} ".wv"
226   !insertmacro ${_action} ".xm"
227 !macroend
228
229 !macro MacroVideoExtensions _action
230   !insertmacro ${_action} ".asf"
231   !insertmacro ${_action} ".avi"
232   !insertmacro ${_action} ".divx"
233   !insertmacro ${_action} ".dv"
234   !insertmacro ${_action} ".flv"
235   !insertmacro ${_action} ".gxf"
236   !insertmacro ${_action} ".m1v"
237   !insertmacro ${_action} ".m2v"
238   !insertmacro ${_action} ".m2ts"
239   !insertmacro ${_action} ".m4v"
240   !insertmacro ${_action} ".mkv"
241   !insertmacro ${_action} ".mov"
242   !insertmacro ${_action} ".mp4"
243   !insertmacro ${_action} ".mpeg"
244   !insertmacro ${_action} ".mpeg1"
245   !insertmacro ${_action} ".mpeg2"
246   !insertmacro ${_action} ".mpeg4"
247   !insertmacro ${_action} ".mpg"
248   !insertmacro ${_action} ".mts"
249   !insertmacro ${_action} ".mxf"
250   !insertmacro ${_action} ".nuv"
251   !insertmacro ${_action} ".ogg"
252   !insertmacro ${_action} ".ogm"
253   !insertmacro ${_action} ".ogx"
254   !insertmacro ${_action} ".ogv"
255   !insertmacro ${_action} ".rmvb"
256   !insertmacro ${_action} ".ts"
257   !insertmacro ${_action} ".vob"
258   !insertmacro ${_action} ".wmv"
259 !macroend
260
261 !macro MacroOtherExtensions _action
262   !insertmacro ${_action} ".asx"
263   !insertmacro ${_action} ".bin"
264   !insertmacro ${_action} ".cue"
265   !insertmacro ${_action} ".ifo"
266   !insertmacro ${_action} ".m3u"
267   !insertmacro ${_action} ".pls"
268   !insertmacro ${_action} ".sdp"
269   !insertmacro ${_action} ".vlc"
270   !insertmacro ${_action} ".xspf"
271 !macroend
272
273 ; One macro to rule them all
274 !macro MacroAllExtensions _action
275   !insertmacro MacroAudioExtensions ${_action}
276   !insertmacro MacroVideoExtensions ${_action}
277   !insertmacro MacroOtherExtensions ${_action}
278 !macroend
279
280 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
281 ; 2. Context menu entries ;
282 ;;;;;;;;;;;;;;;;;;;;;;;;;;;
283
284 ; Generic function for adding the context menu for one ext.
285 !macro AddContextMenuExt EXT
286   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" $ContextMenuEntry_PlayWith
287   WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --no-playlist-enqueue "%1"'
288
289   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC "" $ContextMenuEntry_AddToPlaylist
290   WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '"$INSTDIR\vlc.exe" --started-from-file --playlist-enqueue "%1"'
291 !macroend
292
293 !macro AddContextMenu EXT
294   Push $R0
295   ReadRegStr $R0 HKCR ${EXT} ""
296   !insertmacro AddContextMenuExt $R0
297   Pop $R0
298 !macroend
299
300 !macro DeleteContextMenuExt EXT
301   DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
302   DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
303 !macroend
304
305 !macro DeleteContextMenu EXT
306   Push $R0
307   ReadRegStr $R0 HKCR ${EXT} ""
308   !insertmacro DeleteContextMenuExt $R0
309   Pop $R0
310 !macroend
311
312 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
313 ; 3. Delete prefs and cache ;
314 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
315
316 !macro delprefs
317   StrCpy $0 0
318   !define Index 'Line${__LINE__}'
319   "${Index}-Loop:"
320   ; FIXME
321   ; this will loop through all the logged users and "virtual" windows users
322   ; (it looks like users are only present in HKEY_USERS when they are logged in)
323     ClearErrors
324     EnumRegKey $1 HKU "" $0
325     StrCmp $1 "" "${Index}-End"
326     IntOp $0 $0 + 1
327     ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
328     StrCmp $2 "" "${Index}-Loop"
329     RMDir /r "$2\vlc"
330     Goto "${Index}-Loop"
331   "${Index}-End:"
332   !undef Index
333 !macroend
334
335 ;;;;;;;;;;;;;;;
336 ; 4. Logging  ;
337 ;;;;;;;;;;;;;;;
338 Var UninstallLog
339 !macro OpenUninstallLog
340   FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
341   FileSeek $UninstallLog 0 END
342 !macroend
343
344 !macro CloseUninstallLog
345   FileClose $UninstallLog
346   SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
347 !macroend
348
349 ;;;;;;;;;;;;;;;;;;;;
350 ; 5. Installations ;
351 ;;;;;;;;;;;;;;;;;;;;
352 !macro InstallFile FILEREGEX
353   File "${FILEREGEX}"
354   !define Index 'Line${__LINE__}'
355   FindFirst $0 $1 "$INSTDIR\${FILEREGEX}"
356   StrCmp $0 "" "${Index}-End"
357   "${Index}-Loop:"
358     StrCmp $1 "" "${Index}-End"
359     FileWrite $UninstallLog "$1$\r$\n"
360     FindNext $0 $1
361     Goto "${Index}-Loop"
362   "${Index}-End:"
363   !undef Index
364 !macroend
365
366 !macro InstallFolder FOLDER
367   File /r "${FOLDER}"
368   Push "${FOLDER}"
369   Call InstallFolderInternal
370 !macroend
371
372 Function InstallFolderInternal
373   Pop $9
374   !define Index 'Line${__LINE__}'
375   FindFirst $0 $1 "$INSTDIR\$9\*"
376   StrCmp $0 "" "${Index}-End"
377   "${Index}-Loop:"
378     StrCmp $1 "" "${Index}-End"
379     StrCmp $1 "." "${Index}-Next"
380     StrCmp $1 ".." "${Index}-Next"
381     IfFileExists "$9\$1\*" 0 "${Index}-Write"
382       Push $0
383       Push $9
384       Push "$9\$1"
385       Call InstallFolderInternal
386       Pop $9
387       Pop $0
388       Goto "${Index}-Next"
389     "${Index}-Write:"
390     FileWrite $UninstallLog "$9\$1$\r$\n"
391     "${Index}-Next:"
392     FindNext $0 $1
393     Goto "${Index}-Loop"
394   "${Index}-End:"
395   !undef Index
396 FunctionEnd
397 ;;; End of Macros
398
399
400 ;;;;;;;;;;;;;;;;;;;;;;
401 ; Installer sections ;
402 ; The CORE of the    ;
403 ; installer          ;
404 ;;;;;;;;;;;;;;;;;;;;;;
405
406 Section $Name_Section01 SEC01
407   SectionIn 1 2 3 RO
408   SetShellVarContext all
409   SetOutPath "$INSTDIR"
410
411   !insertmacro OpenUninstallLog
412
413   ; VLC.exe, libvlc.dll
414   !insertmacro InstallFile vlc.exe
415   !insertmacro InstallFile vlc.exe.manifest
416
417   ; All dlls
418   !insertmacro InstallFile *.dll
419
420   ; Text files
421   !insertmacro InstallFile *.txt
422
423   ; Subfolders
424   !insertmacro InstallFolder plugins
425   !insertmacro InstallFolder locale
426 @BUILD_OSDMENU_TRUE@ !insertmacro InstallFolder osdmenu
427 @BUILD_SKINS_TRUE@   !insertmacro InstallFolder skins
428 @BUILD_HTTPD_TRUE@   !insertmacro InstallFolder http
429 @BUILD_LUA_TRUE@     !insertmacro InstallFolder lua
430
431
432   ; URLs
433   WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
434     "${PRODUCT_WEB_SITE}"
435   FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
436   WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
437     "${PRODUCT_WEB_SITE}/doc/"
438   FileWrite $UninstallLog "Documentation.url$\r$\n"
439   WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
440     "${PRODUCT_WEB_SITE}/vlc/skins.php"
441   FileWrite $UninstallLog "New_Skins.url$\r$\n"
442
443   !insertmacro CloseUninstallLog
444
445   ; Add VLC to "recommended programs" for the following extensions
446   WriteRegStr HKCR Applications\vlc.exe "" ""
447   WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
448   WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
449   WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" \
450     '"$INSTDIR\vlc.exe" --started-from-file "%1"'
451   !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
452
453 ; Windows default programs Registration
454   ; Vista and above detection
455   ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
456   StrCpy $R1 $R0 1
457   StrCmp $R1 '6' lbl_vista lbl_done
458
459   lbl_vista:
460   WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
461   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
462   WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
463   WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
464   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
465   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
466   WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
467   WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
468
469   lbl_done:
470 SectionEnd
471
472 Section $Name_Section02a SEC02a
473   SectionIn 1 2 3
474   CreateDirectory "$SMPROGRAMS\VideoLAN"
475   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings"
476   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio"
477   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \
478     "$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc://quit"
479   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \
480     "$INSTDIR\vlc.exe" "--aout waveout --save-config vlc://quit"
481   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface"
482 @BUILD_SKINS_TRUE@  CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \
483 @BUILD_SKINS_TRUE@    "$INSTDIR\vlc.exe" "-I skins --save-config vlc://quit"
484   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Qt (default).lnk" \
485     "$INSTDIR\vlc.exe" "-I qt --save-config vlc://quit"
486   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video"
487   ; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX
488   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \
489     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc://quit"
490   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \
491     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc://quit"
492   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \
493     "$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc://quit"
494   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \
495     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --no-directx-hw-yuv --save-config vlc://quit"
496   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no video overlay).lnk" \
497     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc://quit"
498   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \
499     "$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc://quit"
500   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \
501     "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
502   CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
503     "$INSTDIR\Documentation.url"
504   CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
505     "$INSTDIR\NEWS.txt" ""
506   CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
507     "$INSTDIR\${PRODUCT_GROUP} Website.url"
508   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
509     "$INSTDIR\vlc.exe" ""
510 SectionEnd
511
512 Section $Name_Section02b SEC02b
513   SectionIn 1 2 3
514   CreateShortCut "$DESKTOP\VLC media player.lnk" \
515     "$INSTDIR\vlc.exe" ""
516 SectionEnd
517
518 !ifdef INSTALL_MOZILLA
519 Section /o $Name_Section03 SEC03
520   SectionIn 3
521
522   SetOutPath "$INSTDIR"
523   !insertmacro OpenUninstallLog
524   !insertmacro InstallFile mozilla\npvlc.dll
525   !insertmacro InstallFile mozilla\npvlc.dll.manifest
526   !insertmacro CloseUninstallLog
527
528   !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
529   WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
530   WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
531   WriteRegStr HKLM ${Moz} "Product" "VLC media player"
532   WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
533   WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
534
535  ; for very old version of mozilla, these lines may be needed
536  ;Push $R0
537  ;Push $R1
538  ;Push $R2
539
540  ;!define Index 'Line${__LINE__}'
541  ;StrCpy $R1 "0"
542
543  ;"${Index}-Loop:"
544
545  ;  ; Check for Key
546  ;  EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
547  ;  StrCmp $R0 "" "${Index}-End"
548  ;  IntOp $R1 $R1 + 1
549  ;  ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
550  ;  StrCmp $R2 "" "${Index}-Loop" ""
551
552  ;  CopyFiles "$INSTDIR\npvlc.dll" "$R2"
553  ;  !ifdef LIBVLC_DLL
554  ;  CopyFiles ${LIBVLC_DLL} "$R2"
555  ;  !endif
556  ;  !ifdef LIBVLC_CONTROL_DLL
557  ;  CopyFiles ${LIBVLC_CONTROL_DLL} "$R2"
558  ;  !endif
559  ;  Goto "${Index}-Loop"
560
561  ;"${Index}-End:"
562  ;!undef Index
563
564 SectionEnd
565 !endif
566
567 !ifdef INSTALL_ACTIVEX
568 Section $Name_Section04 SEC04
569   SectionIn 3
570   SetOutPath "$INSTDIR"
571   !insertmacro OpenUninstallLog
572   !insertmacro InstallFile activex\axvlc.dll
573   !insertmacro InstallFile activex\axvlc.dll.manifest
574   !insertmacro CloseUninstallLog
575   RegDLL "$INSTDIR\axvlc.dll"
576 SectionEnd
577 !endif
578
579
580 Section $Name_Section05 SEC05
581   SectionIn 1 2 3
582   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
583   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
584     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
585   WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
586   WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
587     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
588
589   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
590   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
591   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
592   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
593   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
594   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
595
596   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
597   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
598   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
599   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
600   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
601   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
602   WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
603   WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
604   WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
605     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
606   WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
607   WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
608   WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
609   WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
610     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
611   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
612
613 SectionEnd
614
615
616 SectionGroup /e !$Name_Section06 SEC06
617   SectionGroup $Name_SectionGroupAudio
618     !insertmacro MacroAudioExtensions RegisterExtensionSection
619   SectionGroupEnd
620   SectionGroup $Name_SectionGroupVideo
621     !insertmacro MacroVideoExtensions RegisterExtensionSection
622   SectionGroupEnd
623   SectionGroup $Name_SectionGroupOther
624     !insertmacro MacroOtherExtensions RegisterExtensionSection
625   SectionGroupEnd
626 SectionGroupEnd
627
628 Section $Name_Section07 SEC07
629   SectionIn 1 3
630   !insertmacro MacroAllExtensions AddContextMenu
631   !insertmacro AddContextMenuExt "Directory"
632 SectionEnd
633
634 Section $Name_Section08 SEC08
635   !insertmacro delprefs
636 SectionEnd
637
638 ; Installer section descriptions
639 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
640   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
641   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
642   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
643 @BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
644 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
645   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
646   !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
647   !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
648   !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
649 !insertmacro MUI_FUNCTION_DESCRIPTION_END
650
651 ;;; Start function
652 Function .onInit
653   !insertmacro MUI_LANGDLL_DISPLAY
654
655   !include "languages\english.nsh"
656   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
657   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
658   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
659   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
660   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
661   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
662   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
663   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
664   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
665   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
666   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
667   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
668   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
669   French:
670   !include "languages\french.nsh"
671   Goto EndLanguageCmp
672   German:
673   !include "languages\german.nsh"
674   Goto EndLanguageCmp
675   Italian:
676   !include "languages\italian.nsh"
677   Goto EndLanguageCmp
678   Hungarian:
679   !include "languages\hungarian.nsh"
680   Goto EndLanguageCmp
681   Romanian:
682   !include "languages\romanian.nsh"
683   Goto EndLanguageCmp
684   Catalan:
685   !include "languages\catalan.nsh"
686   Goto EndLanguageCmp
687   Bulgarian:
688   !include "languages\bulgarian.nsh"
689   Goto EndLanguageCmp
690   Slovak:
691   !include "languages\slovak.nsh"
692   Goto EndLanguageCmp
693   Polish:
694   !include "languages\polish.nsh"
695   Goto EndLanguageCmp
696   Dutch:
697   !include "languages\dutch.nsh"
698   Goto EndLanguageCmp
699   Schinese:
700   !include "languages\schinese.nsh"
701   Goto EndLanguageCmp
702   Finnish:
703   !include "languages\finnish.nsh"
704   Goto EndLanguageCmp
705   Brazilian:
706   !include "languages\brazilian_portuguese.nsh"
707   EndLanguageCmp:
708
709   ReadRegStr $R0  ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
710   "UninstallString"
711   StrCmp $R0 "" done
712
713   MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
714
715   ;Run the uninstaller
716   ;uninst:
717     ClearErrors
718     ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
719   done:
720
721 FunctionEnd
722
723 ;; End function
724 Section -Post
725   WriteUninstaller "$INSTDIR\uninstall.exe"
726   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
727   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
728   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
729
730   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
731     "DisplayName" "$(^Name)"
732   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
733     "UninstallString" "$INSTDIR\uninstall.exe"
734   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
735     "InstallLocation" "$INSTDIR"
736   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
737     "DisplayIcon" "$INSTDIR\vlc.exe"
738   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
739     "DisplayVersion" "${PRODUCT_VERSION}"
740   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
741     "URLInfoAbout" "${PRODUCT_WEB_SITE}"
742   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
743     "Publisher" "${PRODUCT_PUBLISHER}"
744   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
745     "VersionMajor"  "@VERSION_MAJOR@"
746   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
747     "VersionMinor" "@VERSION_MINOR@"
748 SectionEnd
749
750 ;;;;;;;;;;;;;;;;;;;;;;;;
751 ; Uninstaller sections ;
752 ;;;;;;;;;;;;;;;;;;;;;;;;
753
754 ; TrimNewlines (copied from NSIS documentation)
755 ; input, top of stack  (e.g. whatever$\r$\n)
756 ; output, top of stack (replaces, with e.g. whatever)
757 ; modifies no other variables.
758
759 Function un.TrimNewlines
760  Exch $R0
761  Push $R1
762  Push $R2
763  StrCpy $R1 0
764
765  loop:
766    IntOp $R1 $R1 - 1
767    StrCpy $R2 $R0 1 $R1
768    StrCmp $R2 "$\r" loop
769    StrCmp $R2 "$\n" loop
770    IntOp $R1 $R1 + 1
771    IntCmp $R1 0 no_trim_needed
772    StrCpy $R0 $R0 $R1
773
774  no_trim_needed:
775    Pop $R2
776    Pop $R1
777    Exch $R0
778 FunctionEnd
779
780 Function un.RemoveEmptyDirs
781   Pop $9
782   !define Index 'Line${__LINE__}'
783   FindFirst $0 $1 "$INSTDIR$9*"
784   StrCmp $0 "" "${Index}-End"
785   "${Index}-Loop:"
786     StrCmp $1 "" "${Index}-End"
787     StrCmp $1 "." "${Index}-Next"
788     StrCmp $1 ".." "${Index}-Next"
789       Push $0
790       Push $1
791       Push $9
792       Push "$9$1\"
793       Call un.RemoveEmptyDirs
794       Pop $9
795       Pop $1
796       Pop $0
797     "${Index}-Remove:"
798     RMDir "$INSTDIR$9$1"
799     "${Index}-Next:"
800     FindNext $0 $1
801     Goto "${Index}-Loop"
802   "${Index}-End:"
803   FindClose $0
804   !undef Index
805 FunctionEnd
806
807 Section "un.$Name_Section91" SEC91
808   SectionIn 1 2 3 RO
809   SetShellVarContext all
810
811   !insertmacro MacroAllExtensions DeleteContextMenu
812   !insertmacro MacroAllExtensions UnRegisterExtensionSection
813   !insertmacro DeleteContextMenuExt "Directory"
814
815   ;remove activex plugin
816   UnRegDLL "$INSTDIR\axvlc.dll"
817   Delete /REBOOTOK "$INSTDIR\axvlc.dll"
818   Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
819
820   ;remove mozilla plugin
821   Push $R0
822   Push $R1
823   Push $R2
824
825   !define Index 'Line${__LINE__}'
826   StrCpy $R1 "0"
827
828   "${Index}-Loop:"
829
830     ; Check for Key
831     EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
832     StrCmp $R0 "" "${Index}-End"
833     IntOp $R1 $R1 + 1
834     ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
835     StrCmp $R2 "" "${Index}-Loop" ""
836
837     ; old files (0.8.5 and before) that may be lying around
838     Delete /REBOOTOK "$R2\npvlc.dll"
839     Delete /REBOOTOK "$R2\libvlc.dll"
840     Delete /REBOOTOK "$R2\vlcintf.xpt"
841     Goto "${Index}-Loop"
842
843   "${Index}-End:"
844   !undef Index
845   Delete /REBOOTOK "$INSTDIR\npvlc.dll"
846   Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
847
848   RMDir "$SMPROGRAMS\VideoLAN"
849   RMDir /r $SMPROGRAMS\VideoLAN
850
851   FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
852   UninstallLoop:
853     ClearErrors
854     FileRead $UninstallLog $R0
855     IfErrors UninstallEnd
856     Push $R0
857     Call un.TrimNewLines
858     Pop $R0
859     Delete "$INSTDIR\$R0"
860     Goto UninstallLoop
861   UninstallEnd:
862   FileClose $UninstallLog
863   Delete "$INSTDIR\uninstall.log"
864   Delete "$INSTDIR\uninstall.exe"
865   Push "\"
866   Call un.RemoveEmptyDirs
867   RMDir "$INSTDIR"
868
869   DeleteRegKey HKLM Software\VideoLAN
870
871   DeleteRegKey HKCR Applications\vlc.exe
872   DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
873   DeleteRegKey HKCR DVD\shell\PlayWithVLC
874   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
875   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
876   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
877   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
878   DeleteRegKey HKLM Software\Clients\Media\VLC
879   DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
880   DeleteRegKey HKCR "VLC.MediaFile"
881
882   DeleteRegKey HKLM \
883     "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
884
885   DeleteRegKey HKLM \
886     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
887
888   Delete "$DESKTOP\VLC media player.lnk"
889
890   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
891   DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
892   SetAutoClose true
893 SectionEnd
894
895 Section /o "un.$Name_Section92" SEC92
896   !insertmacro delprefs
897 SectionEnd
898
899 ; Uninstaller section descriptions
900 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
901   !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
902   !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
903 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
904
905 ;Function un.onUninstSuccess
906 ;  HideWindow
907 ;  MessageBox MB_ICONINFORMATION|MB_OK \
908 ;    "$(^Name) was successfully removed from your computer."
909 ;FunctionEnd
910
911 Function un.onInit
912   !insertmacro MUI_UNGETLANGUAGE
913
914   !include "languages\english.nsh"
915   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
916   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
917   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
918   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
919   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
920   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
921   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
922   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
923   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
924   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
925   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
926   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
927   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
928   French:
929   !include "languages\french.nsh"
930   Goto EndLanguageCmp
931   German:
932   !include "languages\german.nsh"
933   Goto EndLanguageCmp
934   Italian:
935   !include "languages\italian.nsh"
936   Goto EndLanguageCmp
937   Hungarian:
938   !include "languages\hungarian.nsh"
939   Goto EndLanguageCmp
940   Romanian:
941   !include "languages\romanian.nsh"
942   Goto EndLanguageCmp
943   Catalan:
944   !include "languages\catalan.nsh"
945   Goto EndLanguageCmp
946   Bulgarian:
947   !include "languages\bulgarian.nsh"
948   Goto EndLanguageCmp
949   Slovak:
950   !include "languages\slovak.nsh"
951   Goto EndLanguageCmp
952   Polish:
953   !include "languages\polish.nsh"
954   Goto EndLanguageCmp
955   Dutch:
956   !include "languages\dutch.nsh"
957   Goto EndLanguageCmp
958   Schinese:
959   !include "languages\schinese.nsh"
960   Goto EndLanguageCmp
961   Finnish:
962   !include "languages\finnish.nsh"
963   Goto EndLanguageCmp
964   Brazilian:
965   !include "languages\brazilian_portuguese.nsh"
966   EndLanguageCmp:
967
968 FunctionEnd