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