]> git.sesse.net Git - vlc/blob - extras/package/win32/vlc.win32.nsi.in
Win32 installer: change "I agree" button to "Next" in license page
[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 "recomended 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
463   lbl_done:
464 SectionEnd
465
466 Section $Name_Section02a SEC02a
467   SectionIn 1 2 3
468   CreateDirectory "$SMPROGRAMS\VideoLAN"
469   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings"
470   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Audio"
471   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to DirectX (default).lnk" \
472     "$INSTDIR\vlc.exe" "--aout aout_directx --save-config vlc://quit"
473   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Audio\Set Audio mode to Waveout.lnk" \
474     "$INSTDIR\vlc.exe" "--aout waveout --save-config vlc://quit"
475   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Interface"
476 @BUILD_SKINS_TRUE@  CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Skinnable.lnk" \
477 @BUILD_SKINS_TRUE@    "$INSTDIR\vlc.exe" "-I skins --save-config vlc://quit"
478   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Interface\Set Main Interface to Qt (default).lnk" \
479     "$INSTDIR\vlc.exe" "-I qt --save-config vlc://quit"
480   CreateDirectory "$SMPROGRAMS\VideoLAN\Quick Settings\Video"
481   ; FIXME add detection for Vista. Direct3D will be default there, for all others it's DirectX
482   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D.lnk" \
483     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --directx-hw-yuv --save-config vlc://quit"
484   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to Direct3D (no hardware acceleration).lnk" \
485     "$INSTDIR\vlc.exe" "--vout direct3d --overlay --no-directx-hw-yuv --save-config vlc://quit"
486   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX.lnk" \
487     "$INSTDIR\vlc.exe" "--vout directx --overlay --directx-hw-yuv --save-config vlc://quit"
488   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no hardware acceleration).lnk" \
489     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --no-directx-hw-yuv --save-config vlc://quit"
490   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to DirectX (no video overlay).lnk" \
491     "$INSTDIR\vlc.exe" "--vout directx --no-overlay --directx-hw-yuv --save-config vlc://quit"
492   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Video\Set Video mode to OpenGL.lnk" \
493     "$INSTDIR\vlc.exe" "--vout opengl --overlay --save-config vlc://quit"
494   CreateShortCut "$SMPROGRAMS\VideoLAN\Quick Settings\Reset VLC media player preferences and cache files.lnk" \
495     "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
496   CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
497     "$INSTDIR\Documentation.url"
498   CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
499     "$INSTDIR\NEWS.txt" ""
500   CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
501     "$INSTDIR\${PRODUCT_GROUP} Website.url"
502   CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
503     "$INSTDIR\vlc.exe" ""
504 SectionEnd
505
506 Section $Name_Section02b SEC02b
507   SectionIn 1 2 3
508   CreateShortCut "$DESKTOP\VLC media player.lnk" \
509     "$INSTDIR\vlc.exe" ""
510 SectionEnd
511
512 !ifdef INSTALL_MOZILLA
513 Section /o $Name_Section03 SEC03
514   SectionIn 3
515
516   SetOutPath "$INSTDIR"
517   !insertmacro OpenUninstallLog
518   !insertmacro InstallFile mozilla\npvlc.dll
519   !insertmacro InstallFile mozilla\npvlc.dll.manifest
520   !insertmacro CloseUninstallLog
521
522   !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
523   WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
524   WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
525   WriteRegStr HKLM ${Moz} "Product" "VLC media player"
526   WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
527   WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
528
529  ; for very old version of mozilla, these lines may be needed
530  ;Push $R0
531  ;Push $R1
532  ;Push $R2
533
534  ;!define Index 'Line${__LINE__}'
535  ;StrCpy $R1 "0"
536
537  ;"${Index}-Loop:"
538
539  ;  ; Check for Key
540  ;  EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
541  ;  StrCmp $R0 "" "${Index}-End"
542  ;  IntOp $R1 $R1 + 1
543  ;  ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
544  ;  StrCmp $R2 "" "${Index}-Loop" ""
545
546  ;  CopyFiles "$INSTDIR\npvlc.dll" "$R2"
547  ;  !ifdef LIBVLC_DLL
548  ;  CopyFiles ${LIBVLC_DLL} "$R2"
549  ;  !endif
550  ;  !ifdef LIBVLC_CONTROL_DLL
551  ;  CopyFiles ${LIBVLC_CONTROL_DLL} "$R2"
552  ;  !endif
553  ;  Goto "${Index}-Loop"
554
555  ;"${Index}-End:"
556  ;!undef Index
557
558 SectionEnd
559 !endif
560
561 !ifdef INSTALL_ACTIVEX
562 Section $Name_Section04 SEC04
563   SectionIn 3
564   SetOutPath "$INSTDIR"
565   !insertmacro OpenUninstallLog
566   !insertmacro InstallFile activex\axvlc.dll
567   !insertmacro InstallFile activex\axvlc.dll.manifest
568   !insertmacro CloseUninstallLog
569   RegDLL "$INSTDIR\axvlc.dll"
570 SectionEnd
571 !endif
572
573
574 Section $Name_Section05 SEC05
575   SectionIn 1 2 3
576   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
577   WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
578     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
579   WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
580   WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
581     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
582
583   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
584   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
585   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
586   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
587   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
588   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
589
590   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
591   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
592   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
593   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
594   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
595   WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
596   WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
597   WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
598   WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
599     '"$INSTDIR\vlc.exe" --started-from-file dvd://%1'
600   WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
601   WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
602   WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
603   WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
604     '"$INSTDIR\vlc.exe" --started-from-file cdda://%1'
605   WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
606
607 SectionEnd
608
609
610 SectionGroup /e !$Name_Section06 SEC06
611   SectionGroup $Name_SectionGroupAudio
612     !insertmacro MacroAudioExtensions RegisterExtensionSection
613   SectionGroupEnd
614   SectionGroup $Name_SectionGroupVideo
615     !insertmacro MacroVideoExtensions RegisterExtensionSection
616   SectionGroupEnd
617   SectionGroup $Name_SectionGroupOther
618     !insertmacro MacroOtherExtensions RegisterExtensionSection
619   SectionGroupEnd
620 SectionGroupEnd
621
622 Section $Name_Section07 SEC07
623   SectionIn 1 3
624   !insertmacro MacroAllExtensions AddContextMenu
625   !insertmacro AddContextMenuExt "Directory"
626 SectionEnd
627
628 Section $Name_Section08 SEC08
629   !insertmacro delprefs
630 SectionEnd
631
632 ; Installer section descriptions
633 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
634   !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
635   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
636   !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
637 @BUILD_MOZILLA_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
638 @BUILD_ACTIVEX_TRUE@ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
639   !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
640   !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
641   !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
642   !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
643 !insertmacro MUI_FUNCTION_DESCRIPTION_END
644
645 ;;; Start function
646 Function .onInit
647   !insertmacro MUI_LANGDLL_DISPLAY
648
649   !include "languages\english.nsh"
650   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
651   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
652   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
653   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
654   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
655   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
656   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
657   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
658   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
659   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
660   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
661   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
662   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
663   French:
664   !include "languages\french.nsh"
665   Goto EndLanguageCmp
666   German:
667   !include "languages\german.nsh"
668   Goto EndLanguageCmp
669   Italian:
670   !include "languages\italian.nsh"
671   Goto EndLanguageCmp
672   Hungarian:
673   !include "languages\hungarian.nsh"
674   Goto EndLanguageCmp
675   Romanian:
676   !include "languages\romanian.nsh"
677   Goto EndLanguageCmp
678   Catalan:
679   !include "languages\catalan.nsh"
680   Goto EndLanguageCmp
681   Bulgarian:
682   !include "languages\bulgarian.nsh"
683   Goto EndLanguageCmp
684   Slovak:
685   !include "languages\slovak.nsh"
686   Goto EndLanguageCmp
687   Polish:
688   !include "languages\polish.nsh"
689   Goto EndLanguageCmp
690   Dutch:
691   !include "languages\dutch.nsh"
692   Goto EndLanguageCmp
693   Schinese:
694   !include "languages\schinese.nsh"
695   Goto EndLanguageCmp
696   Finnish:
697   !include "languages\finnish.nsh"
698   Goto EndLanguageCmp
699   Brazilian:
700   !include "languages\brazilian_portuguese.nsh"
701   EndLanguageCmp:
702
703   ReadRegStr $R0  ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
704   "UninstallString"
705   StrCmp $R0 "" done
706
707   MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled IDNO done
708
709   ;Run the uninstaller
710   ;uninst:
711     ClearErrors
712     ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
713   done:
714
715 FunctionEnd
716
717 ;; End function
718 Section -Post
719   WriteUninstaller "$INSTDIR\uninstall.exe"
720   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
721   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
722   WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
723
724   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
725     "DisplayName" "$(^Name)"
726   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
727     "UninstallString" "$INSTDIR\uninstall.exe"
728   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
729     "InstallLocation" "$INSTDIR"
730   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
731     "DisplayIcon" "$INSTDIR\vlc.exe"
732   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
733     "DisplayVersion" "${PRODUCT_VERSION}"
734   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
735     "URLInfoAbout" "${PRODUCT_WEB_SITE}"
736   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
737     "Publisher" "${PRODUCT_PUBLISHER}"
738   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
739     "VersionMajor"  "@VERSION_MAJOR@"
740   WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
741     "VersionMinor" "@VERSION_MINOR@"
742 SectionEnd
743
744 ;;;;;;;;;;;;;;;;;;;;;;;;
745 ; Uninstaller sections ;
746 ;;;;;;;;;;;;;;;;;;;;;;;;
747
748 ; TrimNewlines (copied from NSIS documentation)
749 ; input, top of stack  (e.g. whatever$\r$\n)
750 ; output, top of stack (replaces, with e.g. whatever)
751 ; modifies no other variables.
752
753 Function un.TrimNewlines
754  Exch $R0
755  Push $R1
756  Push $R2
757  StrCpy $R1 0
758
759  loop:
760    IntOp $R1 $R1 - 1
761    StrCpy $R2 $R0 1 $R1
762    StrCmp $R2 "$\r" loop
763    StrCmp $R2 "$\n" loop
764    IntOp $R1 $R1 + 1
765    IntCmp $R1 0 no_trim_needed
766    StrCpy $R0 $R0 $R1
767
768  no_trim_needed:
769    Pop $R2
770    Pop $R1
771    Exch $R0
772 FunctionEnd
773
774 Function un.RemoveEmptyDirs
775   Pop $9
776   !define Index 'Line${__LINE__}'
777   FindFirst $0 $1 "$INSTDIR$9*"
778   StrCmp $0 "" "${Index}-End"
779   "${Index}-Loop:"
780     StrCmp $1 "" "${Index}-End"
781     StrCmp $1 "." "${Index}-Next"
782     StrCmp $1 ".." "${Index}-Next"
783       Push $0
784       Push $1
785       Push $9
786       Push "$9$1\"
787       Call un.RemoveEmptyDirs
788       Pop $9
789       Pop $1
790       Pop $0
791     "${Index}-Remove:"
792     RMDir "$INSTDIR$9$1"
793     "${Index}-Next:"
794     FindNext $0 $1
795     Goto "${Index}-Loop"
796   "${Index}-End:"
797   FindClose $0
798   !undef Index
799 FunctionEnd
800
801 Section "un.$Name_Section91" SEC91
802   SectionIn 1 2 3 RO
803   SetShellVarContext all
804
805   !insertmacro MacroAllExtensions DeleteContextMenu
806   !insertmacro MacroAllExtensions UnRegisterExtensionSection
807   !insertmacro DeleteContextMenuExt "Directory"
808
809   ;remove activex plugin
810   UnRegDLL "$INSTDIR\axvlc.dll"
811   Delete /REBOOTOK "$INSTDIR\axvlc.dll"
812   Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
813
814   ;remove mozilla plugin
815   Push $R0
816   Push $R1
817   Push $R2
818
819   !define Index 'Line${__LINE__}'
820   StrCpy $R1 "0"
821
822   "${Index}-Loop:"
823
824     ; Check for Key
825     EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
826     StrCmp $R0 "" "${Index}-End"
827     IntOp $R1 $R1 + 1
828     ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
829     StrCmp $R2 "" "${Index}-Loop" ""
830
831     ; old files (0.8.5 and before) that may be lying around
832     Delete /REBOOTOK "$R2\npvlc.dll"
833     Delete /REBOOTOK "$R2\libvlc.dll"
834     Delete /REBOOTOK "$R2\vlcintf.xpt"
835     Goto "${Index}-Loop"
836
837   "${Index}-End:"
838   !undef Index
839   Delete /REBOOTOK "$INSTDIR\npvlc.dll"
840   Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
841
842   RMDir "$SMPROGRAMS\VideoLAN"
843   RMDir /r $SMPROGRAMS\VideoLAN
844
845   FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
846   UninstallLoop:
847     ClearErrors
848     FileRead $UninstallLog $R0
849     IfErrors UninstallEnd
850     Push $R0
851     Call un.TrimNewLines
852     Pop $R0
853     Delete "$INSTDIR\$R0"
854     Goto UninstallLoop
855   UninstallEnd:
856   FileClose $UninstallLog
857   Delete "$INSTDIR\uninstall.log"
858   Delete "$INSTDIR\uninstall.exe"
859   Push "\"
860   Call un.RemoveEmptyDirs
861   RMDir "$INSTDIR"
862
863   DeleteRegKey HKLM Software\VideoLAN
864
865   DeleteRegKey HKCR Applications\vlc.exe
866   DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
867   DeleteRegKey HKCR DVD\shell\PlayWithVLC
868   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
869   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
870   DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
871   DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
872   DeleteRegKey HKLM Software\Clients\Media\VLC
873   DeleteRegKey HKCR "VLC.MediaFile"
874
875   DeleteRegKey HKLM \
876     "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
877
878   DeleteRegKey HKLM \
879     "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
880
881   Delete "$DESKTOP\VLC media player.lnk"
882
883   DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
884   DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
885   SetAutoClose true
886 SectionEnd
887
888 Section /o "un.$Name_Section92" SEC92
889   !insertmacro delprefs
890 SectionEnd
891
892 ; Uninstaller section descriptions
893 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
894   !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
895   !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
896 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
897
898 ;Function un.onUninstSuccess
899 ;  HideWindow
900 ;  MessageBox MB_ICONINFORMATION|MB_OK \
901 ;    "$(^Name) was successfully removed from your computer."
902 ;FunctionEnd
903
904 Function un.onInit
905   !insertmacro MUI_UNGETLANGUAGE
906
907   !include "languages\english.nsh"
908   StrCmp $LANGUAGE ${LANG_FRENCH} French 0
909   StrCmp $LANGUAGE ${LANG_GERMAN} German 0
910   StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
911   StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
912   StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
913   StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
914   StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
915   StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
916   StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
917   StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
918   StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
919   StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
920   StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
921   French:
922   !include "languages\french.nsh"
923   Goto EndLanguageCmp
924   German:
925   !include "languages\german.nsh"
926   Goto EndLanguageCmp
927   Italian:
928   !include "languages\italian.nsh"
929   Goto EndLanguageCmp
930   Hungarian:
931   !include "languages\hungarian.nsh"
932   Goto EndLanguageCmp
933   Romanian:
934   !include "languages\romanian.nsh"
935   Goto EndLanguageCmp
936   Catalan:
937   !include "languages\catalan.nsh"
938   Goto EndLanguageCmp
939   Bulgarian:
940   !include "languages\bulgarian.nsh"
941   Goto EndLanguageCmp
942   Slovak:
943   !include "languages\slovak.nsh"
944   Goto EndLanguageCmp
945   Polish:
946   !include "languages\polish.nsh"
947   Goto EndLanguageCmp
948   Dutch:
949   !include "languages\dutch.nsh"
950   Goto EndLanguageCmp
951   Schinese:
952   !include "languages\schinese.nsh"
953   Goto EndLanguageCmp
954   Finnish:
955   !include "languages\finnish.nsh"
956   Goto EndLanguageCmp
957   Brazilian:
958   !include "languages\brazilian_portuguese.nsh"
959   EndLanguageCmp:
960
961 FunctionEnd