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