1 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
2 ; NSIS installer script for vlc ;
3 ; (http://nsis.sourceforge.net) ;
4 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
6 !include "languages\declaration.nsh"
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"
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}"
19 !define MUI_LANGDLL_REGISTRY_ROOT "HKLM"
20 !define MUI_LANGDLL_REGISTRY_KEY "${PRODUCT_DIR_REGKEY}"
21 !define MUI_LANGDLL_REGISTRY_VALUENAME "Language"
23 !define INSTALL_ACTIVEX
24 !define INSTALL_MOZILLA
26 ;;;;;;;;;;;;;;;;;;;;;;;;;
27 ; General configuration ;
28 ;;;;;;;;;;;;;;;;;;;;;;;;;
30 Name "${PRODUCT_NAME} ${PRODUCT_VERSION}"
31 @HAVE_WIN64_FALSE@ OutFile ..\vlc-${VERSION}-win32.exe
32 @HAVE_WIN64_TRUE@ OutFile ..\vlc-${VERSION}-win64.exe
33 InstallDir "$@PROGRAMFILES@\VideoLAN\VLC"
34 !ifdef NSIS_LZMA_COMPRESS_WHOLE
37 SetCompressor /SOLID lzma
42 BrandingText "${PRODUCT_GROUP} ${PRODUCT_NAME}"
44 InstType $Name_InstTypeRecommended
45 InstType $Name_InstTypeMinimum
46 InstType $Name_InstTypeFull
48 RequestExecutionLevel user
54 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
55 ; NSIS Modern User Interface configuration ;
56 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
58 ; MUI 1.67 compatible ------
62 !define MUI_ABORTWARNING
63 !define MUI_ICON "vlc.ico"
64 !define MUI_UNICON "vlc.ico"
65 !define MUI_COMPONENTSPAGE_SMALLDESC
69 !define MUI_WELCOMEPAGE_TITLE_3LINES
70 !insertmacro MUI_PAGE_WELCOME
72 !define MUI_LICENSEPAGE_BUTTON $(^NextBtn)
73 !define MUI_LICENSEPAGE_TEXT_BOTTOM $License_NextText
74 !insertmacro MUI_PAGE_LICENSE "COPYING.txt"
76 !insertmacro MUI_PAGE_COMPONENTS
78 !insertmacro MUI_PAGE_DIRECTORY
80 !insertmacro MUI_PAGE_INSTFILES
82 !define MUI_FINISHPAGE_LINK $Link_VisitWebsite
83 !define MUI_FINISHPAGE_LINK_LOCATION "http://www.videolan.org/vlc/"
84 !define MUI_FINISHPAGE_NOREBOOTSUPPORT
85 !insertmacro MUI_PAGE_FINISH
88 !insertmacro MUI_UNPAGE_CONFIRM
89 !insertmacro MUI_UNPAGE_COMPONENTS
90 !insertmacro MUI_UNPAGE_INSTFILES
91 !insertmacro MUI_UNPAGE_FINISH
94 !insertmacro MUI_LANGUAGE "English" # first language is the default language
95 !insertmacro MUI_LANGUAGE "French"
96 !insertmacro MUI_LANGUAGE "German"
97 !insertmacro MUI_LANGUAGE "Spanish"
98 !insertmacro MUI_LANGUAGE "SimpChinese"
99 !insertmacro MUI_LANGUAGE "TradChinese"
100 !insertmacro MUI_LANGUAGE "Japanese"
101 !insertmacro MUI_LANGUAGE "Korean"
102 !insertmacro MUI_LANGUAGE "Italian"
103 !insertmacro MUI_LANGUAGE "Dutch"
104 !insertmacro MUI_LANGUAGE "Danish"
105 !insertmacro MUI_LANGUAGE "Swedish"
106 !insertmacro MUI_LANGUAGE "Norwegian"
107 !insertmacro MUI_LANGUAGE "Finnish"
108 !insertmacro MUI_LANGUAGE "Greek"
109 !insertmacro MUI_LANGUAGE "Russian"
110 !insertmacro MUI_LANGUAGE "Portuguese"
111 !insertmacro MUI_LANGUAGE "PortugueseBR"
112 !insertmacro MUI_LANGUAGE "Arabic"
113 !insertmacro MUI_LANGUAGE "Polish"
114 !insertmacro MUI_LANGUAGE "Romanian"
115 !insertmacro MUI_LANGUAGE "Slovak"
116 !insertmacro MUI_LANGUAGE "Serbian"
117 !insertmacro MUI_LANGUAGE "Czech"
118 !insertmacro MUI_LANGUAGE "Hungarian"
119 !insertmacro MUI_LANGUAGE "Catalan"
120 !insertmacro MUI_LANGUAGE "Bulgarian"
121 !insertmacro MUI_LANGUAGE "Estonian"
122 !insertmacro MUI_LANGUAGE "Lithuanian"
123 !insertmacro MUI_LANGUAGE "Basque"
125 ; Reserve files for solid compression
126 !insertmacro MUI_RESERVEFILE_LANGDLL
127 !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
131 ;;;;;;;;;;;;;;;;;;;;;;;
132 ; Macro and Functions ;
133 ;;;;;;;;;;;;;;;;;;;;;;;
135 !include helpers/extensions.nsh
137 !include helpers/install.nsh
139 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
140 ; Delete prefs Macro ;
141 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
145 !define Index 'Line${__LINE__}'
148 ; this will loop through all the logged users and "virtual" windows users
149 ; (it looks like users are only present in HKEY_USERS when they are logged in)
151 EnumRegKey $1 HKU "" $0
152 StrCmp $1 "" "${Index}-End"
154 ReadRegStr $2 HKU "$1\Software\Microsoft\Windows\CurrentVersion\Explorer\Shell Folders" AppData
155 StrCmp $2 "" "${Index}-Loop"
162 ;;;;;;;;;;;;;;;;;;;;;;
163 ; Installer sections ;
166 ;;;;;;;;;;;;;;;;;;;;;;
168 Section $Name_Section01 SEC01
170 SetShellVarContext all
171 SetOutPath "$INSTDIR"
173 !insertmacro OpenUninstallLog
175 ; VLC.exe, libvlc.dll
176 !insertmacro InstallFile vlc.exe
177 !insertmacro InstallFile vlc.exe.manifest
178 !insertmacro InstallFile vlc-cache-gen.exe
181 !insertmacro InstallFile *.dll
184 !insertmacro InstallFile *.txt
187 !insertmacro InstallFolder plugins
188 !insertmacro InstallFolder locale
189 !insertmacro InstallFolder sdk
190 @BUILD_SKINS_TRUE@ !insertmacro InstallFolder skins
191 @BUILD_LUA_TRUE@ !insertmacro InstallFolder lua
193 ; Generate the cache and add it to uninstall.log
194 ExecWait "$INSTDIR\vlc-cache-gen.exe $INSTDIR\plugins"
195 FindFirst $0 $1 "$INSTDIR\plugins\*.dat"
196 FileWrite $UninstallLog "plugins\$1$\r$\n"
201 WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}"
202 FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
203 WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/doc/"
204 FileWrite $UninstallLog "Documentation.url$\r$\n"
205 WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" "${PRODUCT_WEB_SITE}/vlc/skins.php"
206 FileWrite $UninstallLog "New_Skins.url$\r$\n"
208 !insertmacro CloseUninstallLog
210 ; Add VLC to "recommended programs" for the following extensions
211 WriteRegStr HKCR Applications\vlc.exe "" ""
212 WriteRegStr HKCR Applications\vlc.exe "FriendlyAppName" "VLC media player"
213 WriteRegStr HKCR Applications\vlc.exe\shell\Open "" $ContextMenuEntry_PlayWith
214 WriteRegStr HKCR Applications\vlc.exe\shell\Open\command "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
215 !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
217 ; Windows default programs Registration
218 ; Vista and above detection
219 ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
221 StrCmp $R1 '6' lbl_vista lbl_done
224 WriteRegStr HKLM "Software\RegisteredApplications" "VLC" "Software\Clients\Media\VLC\Capabilities"
225 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationName" "VLC media player"
226 WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
227 WriteRegStr HKLM "Software\Clients\Media\VLC" "" "VLC media player"
228 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "HideIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /HideIcons /S"
229 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ShowIconsCommand" "$\"$INSTDIR\spad-setup.exe$\" /ShowIcons /S"
230 WriteRegStr HKLM "Software\Clients\Media\VLC\InstallInfo" "ReinstallCommand" "$\"$INSTDIR\spad-setup.exe$\" /Reinstall /S"
231 WriteRegDWORD HKLM "Software\Clients\Media\VLC\InstallInfo" "IconsVisible" 0x001
236 Section $Name_Section02a SEC02a
238 CreateDirectory "$SMPROGRAMS\VideoLAN"
239 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player.lnk" \
240 "$INSTDIR\vlc.exe" ""
241 CreateShortCut "$SMPROGRAMS\VideoLAN\VLC media player skinned.lnk" \
242 "$INSTDIR\vlc.exe" "-Iskins"
243 CreateShortCut "$SMPROGRAMS\VideoLAN\Documentation.lnk" \
244 "$INSTDIR\Documentation.url"
245 CreateShortCut "$SMPROGRAMS\VideoLAN\Release Notes.lnk" \
246 "$INSTDIR\NEWS.txt" ""
247 CreateShortCut "$SMPROGRAMS\VideoLAN\${PRODUCT_GROUP} Website.lnk" \
248 "$INSTDIR\${PRODUCT_GROUP} Website.url"
249 CreateShortCut "$SMPROGRAMS\VideoLAN\Reset VLC media player preferences and cache files.lnk" \
250 "$INSTDIR\vlc.exe" "--reset-config --reset-plugins-cache vlc://quit"
253 Section $Name_Section02b SEC02b
255 CreateShortCut "$DESKTOP\VLC media player.lnk" \
256 "$INSTDIR\vlc.exe" ""
259 SectionGroup /e !$Name_Section34
260 !ifdef INSTALL_MOZILLA
261 Section $Name_Section03 SEC03
264 SetOutPath "$INSTDIR"
265 !insertmacro OpenUninstallLog
266 !insertmacro InstallFile npvlc.dll
267 !insertmacro InstallFile npvlc.dll.manifest
268 !insertmacro CloseUninstallLog
270 !define Moz "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
271 WriteRegStr HKLM ${Moz} "Description" "VLC Multimedia Plugin"
272 WriteRegStr HKLM ${Moz} "Path" "$INSTDIR\npvlc.dll"
273 WriteRegStr HKLM ${Moz} "Product" "VLC media player"
274 WriteRegStr HKLM ${Moz} "Vendor" "VideoLAN"
275 WriteRegStr HKLM ${Moz} "Version" "${VERSION}"
279 !ifdef INSTALL_ACTIVEX
280 Section $Name_Section04 SEC04
283 SetOutPath "$INSTDIR"
284 !insertmacro OpenUninstallLog
285 !insertmacro InstallFile axvlc.dll
286 !insertmacro InstallFile axvlc.dll.manifest
287 !insertmacro CloseUninstallLog
288 @HAVE_WIN64_FALSE@ RegDLL "$INSTDIR\axvlc.dll"
289 @HAVE_WIN64_TRUE@ ExecWait 'regsvr32.exe /s "$INSTDIR\axvlc.dll"'
295 Section $Name_Section05 SEC05
297 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
298 WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
299 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
300 WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" $ContextMenuEntry_PlayWith
301 WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
302 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
304 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
305 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" $Action_OnArrivalDVD
306 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
307 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
308 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "Open"
309 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
311 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
312 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" $Action_OnArrivalAudioCD
313 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
314 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
315 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "Open"
316 WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
318 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival" ""
319 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Action" $Action_OnArrivalVCDMovie
320 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
321 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeProgID" "VLC.VCDMovie"
322 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "InvokeVerb" "Open"
323 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
325 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival" ""
326 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Action" $Action_OnArrivalSVCDMovie
327 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
328 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeProgID" "VLC.SVCDMovie"
329 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "InvokeVerb" "Open"
330 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival" "Provider" "VideoLAN VLC media player"
332 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival" ""
333 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Action" $Action_OnArrivalDVDAudio
334 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
335 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeProgID" "VLC.OPENFolder"
336 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "InvokeVerb" "Open"
337 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival" "Provider" "VideoLAN VLC media player"
339 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival" ""
340 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Action" $Action_OnArrivalVideoFiles
341 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
342 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
343 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "InvokeVerb" "Open"
344 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival" "Provider" "VideoLAN VLC media player"
346 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival" ""
347 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Action" $Action_OnArrivalMusicFiles
348 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
349 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeProgID" "VLC.OPENFolder"
350 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "InvokeVerb" "Open"
351 WriteRegStr HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival" "Provider" "VideoLAN VLC media player"
353 WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
354 WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Open"
355 WriteRegStr HKCR "VLC.DVDMovie\shell\Open\command" "" \
356 '"$INSTDIR\vlc.exe" --started-from-file dvd:///%1'
357 WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
359 WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
360 WriteRegStr HKCR "VLC.CDAudio\shell" "" "Open"
361 WriteRegStr HKCR "VLC.CDAudio\shell\Open\command" "" \
362 '"$INSTDIR\vlc.exe" --started-from-file cdda:///%1'
363 WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
365 WriteRegStr HKCR "VLC.VCDMovie" "" "VLC VCD Movie"
366 WriteRegStr HKCR "VLC.VCDMovie\shell" "" "Open"
367 WriteRegStr HKCR "VLC.VCDMovie\shell\Open\command" "" \
368 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
369 WriteRegStr HKCR "VLC.VCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
371 WriteRegStr HKCR "VLC.SVCDMovie" "" "VLC SVCD Movie"
372 WriteRegStr HKCR "VLC.SVCDMovie\shell" "" "Open"
373 WriteRegStr HKCR "VLC.SVCDMovie\shell\Open\command" "" \
374 '"$INSTDIR\vlc.exe" --started-from-file vcd:///%1'
375 WriteRegStr HKCR "VLC.SVCDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
377 WriteRegStr HKCR "VLC.OPENFolder" "" "VLC Play content"
378 WriteRegStr HKCR "VLC.OPENFolder\shell" "" "Open"
379 WriteRegStr HKCR "VLC.OPENFolder\shell\Open\command" "" \
380 '"$INSTDIR\vlc.exe" %1'
381 WriteRegStr HKCR "VLC.OPENFolder\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
386 SectionGroup /e !$Name_Section06 SEC06
387 SectionGroup $Name_SectionGroupAudio
388 !insertmacro MacroAudioExtensions RegisterExtensionSection
390 SectionGroup $Name_SectionGroupVideo
391 !insertmacro MacroVideoExtensions RegisterExtensionSection
393 SectionGroup $Name_SectionGroupOther
394 !insertmacro MacroOtherExtensions RegisterExtensionSection
395 !insertmacro MacroSkinExtensions RegisterSkinExtensionSection
399 Section $Name_Section07 SEC07
401 !insertmacro MacroAllExtensions AddContextMenu
402 !insertmacro AddContextMenuExt "Directory"
405 Section /o $Name_Section08 SEC08
406 !insertmacro delprefs
409 ; Installer section descriptions
410 !insertmacro MUI_FUNCTION_DESCRIPTION_BEGIN
411 !insertmacro MUI_DESCRIPTION_TEXT ${SEC01} $Desc_Section01
412 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02a} $Desc_Section02a
413 !insertmacro MUI_DESCRIPTION_TEXT ${SEC02b} $Desc_Section02b
414 !ifdef INSTALL_MOZILLA
415 !insertmacro MUI_DESCRIPTION_TEXT ${SEC03} $Desc_Section03
417 !ifdef INSTALL_ACTIVEX
418 !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} $Desc_Section04
420 !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} $Desc_Section05
421 !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} $Desc_Section06
422 !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} $Desc_Section07
423 !insertmacro MUI_DESCRIPTION_TEXT ${SEC08} $Desc_Section08
424 !insertmacro MUI_FUNCTION_DESCRIPTION_END
429 @HAVE_WIN64_TRUE@ !include "x64.nsh"
430 @HAVE_WIN64_TRUE@ ${If} ${RunningX64}
431 @HAVE_WIN64_TRUE@ ${Else}
432 @HAVE_WIN64_TRUE@ MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on 64bits operating systems.$\nYour operating system is 32bits.$\n$\nPlease get the 32 BITS version."
433 @HAVE_WIN64_TRUE@ Quit
434 @HAVE_WIN64_TRUE@ ${Endif}
435 ${If} ${AtLeastWinXP}
437 ${AndIf} ${AtMostServicePack} 1
444 @HAVE_WIN64_TRUE@ SetRegView 64
445 ReadRegStr $INSTDIR HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir"
446 StrCmp $INSTDIR "" 0 UAC_Elevate
447 StrCpy $INSTDIR "$@PROGRAMFILES@\VideoLAN\VLC"
451 StrCmp 1223 $0 UAC_ElevationAborted
452 StrCmp 0 $0 0 UAC_Err
453 StrCmp 1 $1 0 UAC_Success
457 MessageBox mb_iconstop "Unable to elevate, error $0"
460 UAC_ElevationAborted:
461 MessageBox mb_iconstop "This installer requires admin access, aborting!"
465 MessageBox MB_OK|MB_ICONSTOP "This version of VLC only runs on Windows XP SP2 and newer."
470 StrCmp 3 $1 0 UAC_ElevationAborted
471 MessageBox mb_iconstop "This installer requires admin access, try again"
473 !insertmacro MUI_LANGDLL_DISPLAY
475 !include "languages\english.nsh"
476 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
477 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
478 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
479 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
480 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
481 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
482 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
483 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
484 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
485 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
486 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
487 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
488 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
489 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
490 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
491 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
492 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
493 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
494 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
495 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
496 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
497 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
498 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
499 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
500 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
501 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
502 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
504 !include "languages\french.nsh"
507 !include "languages\german.nsh"
510 !include "languages\italian.nsh"
513 !include "languages\hungarian.nsh"
516 !include "languages\romanian.nsh"
519 !include "languages\catalan.nsh"
522 !include "languages\bulgarian.nsh"
525 !include "languages\slovak.nsh"
528 !include "languages\polish.nsh"
531 !include "languages\dutch.nsh"
534 !include "languages\danish.nsh"
537 !include "languages\schinese.nsh"
540 !include "languages\finnish.nsh"
543 !include "languages\japanese.nsh"
546 !include "languages\bengali.nsh"
549 !include "languages\punjabi.nsh"
552 !include "languages\slovenian.nsh"
555 !include "languages\spanish.nsh"
558 !include "languages\estonian.nsh"
561 !include "languages\lithuanian.nsh"
564 !include "languages\basque.nsh"
567 !include "languages\serbian.nsh"
570 !include "languages\Russian.nsh"
573 !include "languages\hebrew.nsh"
576 !include "languages\galician.nsh"
579 !include "languages\swedish.nsh"
582 !include "languages\brazilian_portuguese.nsh"
585 ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
589 MessageBox MB_YESNO|MB_ICONEXCLAMATION $Message_AlreadyInstalled /SD IDNO IDNO done
594 ExecWait '$R0 _?=$INSTDIR' ;Do not copy the uninstaller to a temp file
599 Function .OnInstFailed
603 Function .OnInstSuccess
609 WriteUninstaller "$INSTDIR\uninstall.exe"
610 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
611 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "Version" "${VERSION}"
612 WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "" "$INSTDIR\vlc.exe"
614 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
615 "DisplayName" "$(^Name)"
616 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
617 "UninstallString" "$INSTDIR\uninstall.exe"
618 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
619 "InstallLocation" "$INSTDIR"
620 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
621 "DisplayIcon" "$INSTDIR\vlc.exe"
622 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
623 "DisplayVersion" "${PRODUCT_VERSION}"
624 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
625 "URLInfoAbout" "${PRODUCT_WEB_SITE}"
626 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
627 "Publisher" "${PRODUCT_PUBLISHER}"
628 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
629 "VersionMajor" "@VERSION_MAJOR@"
630 WriteRegStr ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
631 "VersionMinor" "@VERSION_MINOR@"
634 ;;;;;;;;;;;;;;;;;;;;;;;;
635 ; Uninstaller sections ;
636 ;;;;;;;;;;;;;;;;;;;;;;;;
638 ; TrimNewlines (copied from NSIS documentation)
639 ; input, top of stack (e.g. whatever$\r$\n)
640 ; output, top of stack (replaces, with e.g. whatever)
641 ; modifies no other variables.
643 Function un.TrimNewlines
652 StrCmp $R2 "$\r" loop
653 StrCmp $R2 "$\n" loop
655 IntCmp $R1 0 no_trim_needed
664 Function un.RemoveEmptyDirs
666 !define Index 'Line${__LINE__}'
667 FindFirst $0 $1 "$INSTDIR$9*"
668 StrCmp $0 "" "${Index}-End"
670 StrCmp $1 "" "${Index}-End"
671 StrCmp $1 "." "${Index}-Next"
672 StrCmp $1 ".." "${Index}-Next"
677 Call un.RemoveEmptyDirs
691 Section "un.$Name_Section91" SEC91
693 SetShellVarContext all
695 !insertmacro MacroAllExtensions DeleteContextMenu
696 !insertmacro MacroAllExtensions UnRegisterExtensionSection
697 !insertmacro MacroSkinExtensions UnRegisterExtensionSection
698 !insertmacro DeleteContextMenuExt "Directory"
700 ;remove activex plugin
701 @HAVE_WIN64_FALSE@ UnRegDLL "$INSTDIR\axvlc.dll"
702 @HAVE_WIN64_TRUE@ ExecWait 'regsvr32.exe /s /u "$INSTDIR\axvlc.dll"'
703 Delete /REBOOTOK "$INSTDIR\axvlc.dll"
704 Delete /REBOOTOK "$INSTDIR\axvlc.dll.manifest"
706 ;remove mozilla plugin
711 !define Index 'Line${__LINE__}'
717 EnumRegKey $R0 HKLM "SOFTWARE\Mozilla" "$R1"
718 StrCmp $R0 "" "${Index}-End"
720 ReadRegStr $R2 HKLM "SOFTWARE\Mozilla\$R0\Extensions" "Plugins"
721 StrCmp $R2 "" "${Index}-Loop" ""
723 ; old files (0.8.5 and before) that may be lying around
724 Delete /REBOOTOK "$R2\npvlc.dll"
725 Delete /REBOOTOK "$R2\libvlc.dll"
726 Delete /REBOOTOK "$R2\vlcintf.xpt"
731 Delete /REBOOTOK "$INSTDIR\npvlc.dll"
732 Delete /REBOOTOK "$INSTDIR\npvlc.dll.manifest"
734 RMDir "$SMPROGRAMS\VideoLAN"
735 RMDir /r $SMPROGRAMS\VideoLAN
737 FileOpen $UninstallLog "$INSTDIR\uninstall.log" r
740 FileRead $UninstallLog $R0
741 IfErrors UninstallEnd
745 Delete "$INSTDIR\$R0"
748 FileClose $UninstallLog
749 Delete "$INSTDIR\uninstall.log"
750 Delete "$INSTDIR\uninstall.exe"
752 Call un.RemoveEmptyDirs
755 DeleteRegKey HKLM Software\VideoLAN
757 DeleteRegKey HKCR Applications\vlc.exe
758 DeleteRegKey HKCR AudioCD\shell\PlayWithVLC
759 DeleteRegKey HKCR DVD\shell\PlayWithVLC
760 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival"
761 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival
762 DeleteRegValue HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival"
763 DeleteRegKey HKLM Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival
764 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoCDMovieOnArrival" "VLCPlayVCDMovieOnArrival"
765 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVCDMovieOnArrival
766 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlaySuperVideoCDMovieOnArrival" "VLCPlaySVCDMovieOnArrival"
767 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlaySVCDMovieOnArrival
768 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDAudioOnArrival" "VLCPlayDVDAudioOnArrival"
769 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDAudioOnArrival
770 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayVideoFilesOnArrival" "VLCPlayVideoFilesOnArrival"
771 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayVideoFilesOnArrival
772 DeleteRegValue HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayMusicFilesOnArrival" "VLCPlayMusicFilesOnArrival"
773 DeleteRegKey HKLM SOFTWARE\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayMusicFilesOnArrival
775 DeleteRegKey HKLM Software\Clients\Media\VLC
776 DeleteRegValue HKLM "Software\RegisteredApplications" "VLC"
777 DeleteRegKey HKCR "VLC.MediaFile"
778 DeleteRegKey HKCR "VLC.DVDMovie"
779 DeleteRegKey HKCR "VLC.CDAudio"
780 DeleteRegKey HKCR "VLC.VCDMovie"
781 DeleteRegKey HKCR "VLC.SVCDMovie"
782 DeleteRegKey HKCR "VLC.OPENFolder"
786 "SOFTWARE\MozillaPlugins\@videolan.org/vlc,version=${VERSION}"
789 "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
791 Delete "$DESKTOP\VLC media player.lnk"
793 DeleteRegKey ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}"
794 DeleteRegKey HKLM "${PRODUCT_DIR_REGKEY}"
798 Section /o "un.$Name_Section92" SEC92
799 !insertmacro delprefs
802 ; Uninstaller section descriptions
803 !insertmacro MUI_UNFUNCTION_DESCRIPTION_BEGIN
804 !insertmacro MUI_DESCRIPTION_TEXT ${SEC91} $Desc_Section91
805 !insertmacro MUI_DESCRIPTION_TEXT ${SEC92} $Desc_Section92
806 !insertmacro MUI_UNFUNCTION_DESCRIPTION_END
808 Function un.OnUnInstFailed
812 Function un.OnUnInstSuccess
814 Delete "$INSTDIR\UAC.dll"
821 StrCmp 1223 $0 UAC_ElevationAborted
822 StrCmp 0 $0 0 UAC_Err
823 StrCmp 1 $1 0 UAC_Success
827 MessageBox mb_iconstop "Unable to elevate, error $0"
830 UAC_ElevationAborted:
831 MessageBox mb_iconstop "This installer requires admin access, aborting!"
836 StrCmp 3 $1 0 UAC_ElevationAborted
837 MessageBox mb_iconstop "This installer requires admin access, try again"
840 !insertmacro MUI_UNGETLANGUAGE
842 !include "languages\english.nsh"
843 StrCmp $LANGUAGE ${LANG_FRENCH} French 0
844 StrCmp $LANGUAGE ${LANG_GERMAN} German 0
845 StrCmp $LANGUAGE ${LANG_ITALIAN} Italian 0
846 StrCmp $LANGUAGE ${LANG_HUNGARIAN} Hungarian 0
847 StrCmp $LANGUAGE ${LANG_ROMANIAN} Romanian 0
848 StrCmp $LANGUAGE ${LANG_CATALAN} Catalan 0
849 StrCmp $LANGUAGE ${LANG_BULGARIAN} Bulgarian 0
850 StrCmp $LANGUAGE ${LANG_SLOVAK} Slovak 0
851 StrCmp $LANGUAGE ${LANG_POLISH} Polish 0
852 StrCmp $LANGUAGE ${LANG_DUTCH} Dutch 0
853 StrCmp $LANGUAGE ${LANG_DANISH} Danish 0
854 StrCmp $LANGUAGE ${LANG_SIMPCHINESE} SChinese 0
855 StrCmp $LANGUAGE ${LANG_FINNISH} Finnish 0
856 StrCmp $LANGUAGE ${LANG_JAPANESE} Japanese 0
857 ; StrCmp $LANGUAGE ${LANG_BENGALI} Bengali 0
858 ; StrCmp $LANGUAGE ${LANG_PUNJABI} Punjabi 0
859 ; StrCmp $LANGUAGE ${LANG_SLOVENIAN} Slovenian 0
860 StrCmp $LANGUAGE ${LANG_SPANISH} Spanish 0
861 StrCmp $LANGUAGE ${LANG_ESTONIAN} Estonian 0
862 StrCmp $LANGUAGE ${LANG_LITHUANIAN} Lithuanian 0
863 StrCmp $LANGUAGE ${LANG_BASQUE} Basque 0
864 StrCmp $LANGUAGE ${LANG_SERBIAN} Serbian 0
865 StrCmp $LANGUAGE ${LANG_RUSSIAN} Russian 0
866 StrCmp $LANGUAGE ${LANG_HEBREW} Hebrew 0
867 StrCmp $LANGUAGE ${LANG_GALICIAN} Galician 0
868 StrCmp $LANGUAGE ${LANG_SWEDISH} Swedish 0
869 StrCmp $LANGUAGE ${LANG_PORTUGUESEBR} Brazilian EndLanguageCmp
871 !include "languages\french.nsh"
874 !include "languages\german.nsh"
877 !include "languages\italian.nsh"
880 !include "languages\hungarian.nsh"
883 !include "languages\romanian.nsh"
886 !include "languages\catalan.nsh"
889 !include "languages\bulgarian.nsh"
892 !include "languages\slovak.nsh"
895 !include "languages\polish.nsh"
898 !include "languages\dutch.nsh"
901 !include "languages\danish.nsh"
904 !include "languages\schinese.nsh"
907 !include "languages\finnish.nsh"
910 !include "languages\japanese.nsh"
913 !include "languages\bengali.nsh"
916 !include "languages\punjabi.nsh"
919 !include "languages\slovenian.nsh"
922 !include "languages\spanish.nsh"
925 !include "languages\estonian.nsh"
928 !include "languages\lithuanian.nsh"
931 !include "languages\basque.nsh"
934 !include "languages\serbian.nsh"
937 !include "languages\russian.nsh"
940 !include "languages\hebrew.nsh"
943 !include "languages\galician.nsh"
946 !include "languages\swedish.nsh"
949 !include "languages\brazilian_portuguese.nsh"