Commit 35bb5df5 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Windows Installer improvements.

parent 8501e4a2
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!define PRODUCT_NAME "VLC media player" !define PRODUCT_NAME "VLC media player"
!define PRODUCT_VERSION '${VERSION}' !define PRODUCT_VERSION '0.9.0-git'
!define PRODUCT_GROUP "VideoLAN" !define PRODUCT_GROUP "VideoLAN"
!define PRODUCT_PUBLISHER "VideoLAN Team" !define PRODUCT_PUBLISHER "VideoLAN Team"
!define PRODUCT_WEB_SITE "http://www.videolan.org" !define PRODUCT_WEB_SITE "http://www.videolan.org"
...@@ -33,6 +33,7 @@ SetCompressor lzma ...@@ -33,6 +33,7 @@ SetCompressor lzma
!else !else
SetCompressor /SOLID lzma SetCompressor /SOLID lzma
!endif !endif
;ShowInstDetails show ;ShowInstDetails show
;ShowUnInstDetails show ;ShowUnInstDetails show
SetOverwrite ifnewer SetOverwrite ifnewer
...@@ -107,75 +108,21 @@ InstType "Full" ...@@ -107,75 +108,21 @@ InstType "Full"
!insertmacro MUI_LANGUAGE "Slovak" !insertmacro MUI_LANGUAGE "Slovak"
!insertmacro MUI_LANGUAGE "Czech" !insertmacro MUI_LANGUAGE "Czech"
!insertmacro MUI_RESERVEFILE_LANGDLL ; Reserve files for solid compression
!insertmacro MUI_RESERVEFILE_LANGDLL
; Reserve files
!insertmacro MUI_RESERVEFILE_INSTALLOPTIONS !insertmacro MUI_RESERVEFILE_INSTALLOPTIONS
; MUI end ------ ; MUI end ------
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
; Extension lists ; ; Macro and Functions ;
;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;
!macro MacroAudioExtensions _action ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!insertmacro ${_action} ".a52" ; 1. File type associations ;
!insertmacro ${_action} ".aac" ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!insertmacro ${_action} ".ac3"
!insertmacro ${_action} ".dts"
!insertmacro ${_action} ".flac"
!insertmacro ${_action} ".mka"
!insertmacro ${_action} ".mp1"
!insertmacro ${_action} ".mp2"
!insertmacro ${_action} ".mp3"
!insertmacro ${_action} ".ogg"
!insertmacro ${_action} ".spx"
!insertmacro ${_action} ".wav"
!insertmacro ${_action} ".wma"
!macroend
!macro MacroVideoExtensions _action
!insertmacro ${_action} ".asf"
!insertmacro ${_action} ".avi"
!insertmacro ${_action} ".divx"
!insertmacro ${_action} ".dv"
!insertmacro ${_action} ".m1v"
!insertmacro ${_action} ".m2v"
!insertmacro ${_action} ".mkv"
!insertmacro ${_action} ".mov"
!insertmacro ${_action} ".mp4"
!insertmacro ${_action} ".mpeg"
!insertmacro ${_action} ".mpeg1"
!insertmacro ${_action} ".mpeg2"
!insertmacro ${_action} ".mpeg4"
!insertmacro ${_action} ".mpg"
!insertmacro ${_action} ".mxf"
!insertmacro ${_action} ".ps"
!insertmacro ${_action} ".ts"
!insertmacro ${_action} ".ogm"
!insertmacro ${_action} ".vob"
!insertmacro ${_action} ".wmv"
!macroend
!macro MacroOtherExtensions _action
!insertmacro ${_action} ".asx"
!insertmacro ${_action} ".bin"
!insertmacro ${_action} ".cue"
!insertmacro ${_action} ".m3u"
!insertmacro ${_action} ".pls"
!insertmacro ${_action} ".vlc"
!macroend
!macro MacroAllExtensions _action
!insertmacro MacroAudioExtensions ${_action}
!insertmacro MacroVideoExtensions ${_action}
!insertmacro MacroOtherExtensions ${_action}
!macroend
;;;;;;;;;;;;;;;;;;;;;;;;;;
; File type associations ;
;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Function that register one extension for VLC
Function RegisterExtension Function RegisterExtension
; back up old value for extension $R0 (eg. ".opt") ; back up old value for extension $R0 (eg. ".opt")
ReadRegStr $1 HKCR "$R0" "" ReadRegStr $1 HKCR "$R0" ""
...@@ -190,20 +137,23 @@ NoBackup: ...@@ -190,20 +137,23 @@ NoBackup:
WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"' WriteRegStr HKCR "VLC$R0\shell\Play\command" "" '"$INSTDIR\vlc.exe" --started-from-file "%1"'
WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0' WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
;;; Vista Only part
; Vista detection ; Vista detection
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCpy $R2 $R1 3 StrCpy $R2 $R1 3
StrCmp $R2 '6.0' ForVista ToEnd StrCmp $R2 '6.0' ForVista ToEnd
ForVista: ForVista:
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0" WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
ToEnd:
ToEnd:
FunctionEnd FunctionEnd
;; Function that removes one extension that VLC owns.
Function un.RegisterExtension Function un.RegisterExtension
;start of restore script ;start of restore script
ReadRegStr $1 HKCR "$R0" "" ReadRegStr $1 HKCR "$R0" ""
StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it StrCmp $1 "VLC$R0" 0 NoOwn ; only do this if we own it
; Read the old value from Backup
ReadRegStr $1 HKCR "$R0" "VLC.backup" ReadRegStr $1 HKCR "$R0" "VLC.backup"
StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key StrCmp $1 "" 0 Restore ; if backup="" then delete the whole key
DeleteRegKey HKCR "$R0" DeleteRegKey HKCR "$R0"
...@@ -213,6 +163,7 @@ Restore: ...@@ -213,6 +163,7 @@ Restore:
DeleteRegValue HKCR "$R0" "VLC.backup" DeleteRegValue HKCR "$R0" "VLC.backup"
NoOwn: NoOwn:
DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings DeleteRegKey HKCR "VLC$R0" ;Delete key with association settings
DeleteRegKey HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations\VLC$R0" ; for vista
FunctionEnd FunctionEnd
!macro RegisterExtensionSection EXT !macro RegisterExtensionSection EXT
...@@ -236,10 +187,71 @@ FunctionEnd ...@@ -236,10 +187,71 @@ FunctionEnd
WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} "" WriteRegStr HKCR Applications\vlc.exe\SupportedTypes ${EXT} ""
!macroend !macroend
;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Context menu entries ; ; Extension lists Macros ;
;;;;;;;;;;;;;;;;;;;;;;;; ; Those macros calls the previous functions ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!macro MacroAudioExtensions _action
!insertmacro ${_action} ".a52"
!insertmacro ${_action} ".aac"
!insertmacro ${_action} ".ac3"
!insertmacro ${_action} ".dts"
!insertmacro ${_action} ".flac"
!insertmacro ${_action} ".mka"
!insertmacro ${_action} ".mp1"
!insertmacro ${_action} ".mp2"
!insertmacro ${_action} ".mp3"
!insertmacro ${_action} ".ogg"
!insertmacro ${_action} ".spx"
!insertmacro ${_action} ".wav"
!insertmacro ${_action} ".wma"
!macroend
!macro MacroVideoExtensions _action
!insertmacro ${_action} ".asf"
!insertmacro ${_action} ".avi"
!insertmacro ${_action} ".divx"
!insertmacro ${_action} ".dv"
!insertmacro ${_action} ".m1v"
!insertmacro ${_action} ".m2v"
!insertmacro ${_action} ".mkv"
!insertmacro ${_action} ".mov"
!insertmacro ${_action} ".mp4"
!insertmacro ${_action} ".mpeg"
!insertmacro ${_action} ".mpeg1"
!insertmacro ${_action} ".mpeg2"
!insertmacro ${_action} ".mpeg4"
!insertmacro ${_action} ".mpg"
!insertmacro ${_action} ".mxf"
!insertmacro ${_action} ".ps"
!insertmacro ${_action} ".ts"
!insertmacro ${_action} ".ogm"
!insertmacro ${_action} ".vob"
!insertmacro ${_action} ".wmv"
!macroend
!macro MacroOtherExtensions _action
!insertmacro ${_action} ".asx"
!insertmacro ${_action} ".bin"
!insertmacro ${_action} ".cue"
!insertmacro ${_action} ".m3u"
!insertmacro ${_action} ".pls"
!insertmacro ${_action} ".vlc"
!macroend
; One macro to rule them all
!macro MacroAllExtensions _action
!insertmacro MacroAudioExtensions ${_action}
!insertmacro MacroVideoExtensions ${_action}
!insertmacro MacroOtherExtensions ${_action}
!macroend
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; 2. Context menu entries ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Generic function for adding the context menu for one ext.
!macro AddContextMenuExt EXT !macro AddContextMenuExt EXT
WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player" WriteRegStr HKCR ${EXT}\shell\PlayWithVLC "" "Play with VLC media player"
WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"' WriteRegStr HKCR ${EXT}\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'
...@@ -267,9 +279,9 @@ FunctionEnd ...@@ -267,9 +279,9 @@ FunctionEnd
Pop $R0 Pop $R0
!macroend !macroend
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
; Delete prefs and cache ; ; 3. Delete prefs and cache ;
;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
!macro delprefs !macro delprefs
StrCpy $0 0 StrCpy $0 0
...@@ -290,8 +302,10 @@ FunctionEnd ...@@ -290,8 +302,10 @@ FunctionEnd
!undef Index !undef Index
!macroend !macroend
;;;;;;;;;;;;;;;
; 4. Logging ;
;;;;;;;;;;;;;;;
Var UninstallLog Var UninstallLog
!macro OpenUninstallLog !macro OpenUninstallLog
FileOpen $UninstallLog "$INSTDIR\uninstall.log" a FileOpen $UninstallLog "$INSTDIR\uninstall.log" a
FileSeek $UninstallLog 0 END FileSeek $UninstallLog 0 END
...@@ -302,6 +316,9 @@ Var UninstallLog ...@@ -302,6 +316,9 @@ Var UninstallLog
SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN SetFileAttributes "$INSTDIR\uninstall.log" HIDDEN
!macroend !macroend
;;;;;;;;;;;;;;;;;;;;
; 5. Installations ;
;;;;;;;;;;;;;;;;;;;;
!macro InstallFile FILEREGEX !macro InstallFile FILEREGEX
File "${FILEREGEX}" File "${FILEREGEX}"
!define Index 'Line${__LINE__}' !define Index 'Line${__LINE__}'
...@@ -347,10 +364,13 @@ Function InstallFolderInternal ...@@ -347,10 +364,13 @@ Function InstallFolderInternal
"${Index}-End:" "${Index}-End:"
!undef Index !undef Index
FunctionEnd FunctionEnd
;;; End of Macros
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
; Installer sections ; ; Installer sections ;
; The CORE of the ;
; installer ;
;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;
Section "Media player (required)" SEC01 Section "Media player (required)" SEC01
...@@ -360,6 +380,7 @@ Section "Media player (required)" SEC01 ...@@ -360,6 +380,7 @@ Section "Media player (required)" SEC01
!insertmacro OpenUninstallLog !insertmacro OpenUninstallLog
; VLC.exe, libvlc.dll
!insertmacro InstallFile vlc.exe !insertmacro InstallFile vlc.exe
!insertmacro InstallFile vlc.exe.manifest !insertmacro InstallFile vlc.exe.manifest
!ifdef LIBVLC_DLL !ifdef LIBVLC_DLL
...@@ -368,21 +389,29 @@ Section "Media player (required)" SEC01 ...@@ -368,21 +389,29 @@ Section "Media player (required)" SEC01
!ifdef LIBVLC_CONTROL_DLL !ifdef LIBVLC_CONTROL_DLL
!insertmacro InstallFile ${LIBVLC_CONTROL_DLL} !insertmacro InstallFile ${LIBVLC_CONTROL_DLL}
!endif !endif
; Text files
!insertmacro InstallFile *.txt !insertmacro InstallFile *.txt
; Subfolders
!insertmacro InstallFolder plugins !insertmacro InstallFolder plugins
!insertmacro InstallFolder locale !insertmacro InstallFolder locale
!insertmacro InstallFolder osdmenu !insertmacro InstallFolder osdmenu
!insertmacro InstallFolder skins !insertmacro InstallFolder skins
!insertmacro InstallFolder http !insertmacro InstallFolder http
!insertmacro InstallFolder share !insertmacro InstallFolder share
;!insertmacro InstallFolder scripts
; URLs
WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \ WriteIniStr "$INSTDIR\${PRODUCT_GROUP} Website.url" "InternetShortcut" "URL" \
"${PRODUCT_WEB_SITE}" "${PRODUCT_WEB_SITE}"
FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n" FileWrite $UninstallLog "${PRODUCT_GROUP} Website.url$\r$\n"
WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \ WriteIniStr "$INSTDIR\Documentation.url" "InternetShortcut" "URL" \
"${PRODUCT_WEB_SITE}/doc/" "${PRODUCT_WEB_SITE}/doc/"
FileWrite $UninstallLog "Documentation.url$\r$\n" FileWrite $UninstallLog "Documentation.url$\r$\n"
WriteIniStr "$INSTDIR\New_Skins.url" "InternetShortcut" "URL" \
"${PRODUCT_WEB_SITE}/vlc/skins.php"
FileWrite $UninstallLog "New_Skins.url$\r$\n"
!insertmacro CloseUninstallLog !insertmacro CloseUninstallLog
...@@ -394,37 +423,7 @@ Section "Media player (required)" SEC01 ...@@ -394,37 +423,7 @@ Section "Media player (required)" SEC01
'$INSTDIR\vlc.exe --started-from-file "%1"' '$INSTDIR\vlc.exe --started-from-file "%1"'
!insertmacro MacroAllExtensions WriteRegStrSupportedTypes !insertmacro MacroAllExtensions WriteRegStrSupportedTypes
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player" ; Vista Registration
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
"$INSTDIR\vlc.exe --started-from-file cdda:%1"
WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"
WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
"$INSTDIR\vlc.exe --started-from-file dvd:%1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play"
WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \
'$INSTDIR\vlc.exe --started-from-file dvd:%1'
WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play"
WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \
'$INSTDIR\vlc.exe --started-from-file cdda:%1'
WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
; Vista detection ; Vista detection
ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCpy $R1 $R0 3 StrCpy $R1 $R0 3
...@@ -436,7 +435,6 @@ Section "Media player (required)" SEC01 ...@@ -436,7 +435,6 @@ Section "Media player (required)" SEC01
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife" WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities" "ApplicationDescription" "VLC - The video swiss knife"
lbl_done: lbl_done:
SectionEnd SectionEnd
Section "Start Menu Shortcut" SEC02a Section "Start Menu Shortcut" SEC02a
...@@ -540,6 +538,41 @@ Section "ActiveX plugin" SEC04 ...@@ -540,6 +538,41 @@ Section "ActiveX plugin" SEC04
RegDLL "$INSTDIR\axvlc.dll" RegDLL "$INSTDIR\axvlc.dll"
SectionEnd SectionEnd
Section "Discs Playback" SEC05
SectionIn 1 2 3
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC" "" "Play with VLC media player"
WriteRegStr HKCR "AudioCD\shell\PlayWithVLC\command" "" \
"$INSTDIR\vlc.exe --started-from-file cdda:%1"
WriteRegStr HKCR "DVD\shell\PlayWithVLC" "" "Play with VLC media player"
WriteRegStr HKCR "DVD\shell\PlayWithVLC\command" "" \
"$INSTDIR\vlc.exe --started-from-file dvd:%1"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayDVDMovieOnArrival" "VLCPlayDVDMovieOnArrival" ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Action" "Play DVD movie"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeProgID" "VLC.DVDMovie"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "InvokeVerb" "play"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayDVDMovieOnArrival" "Provider" "VideoLAN VLC media player"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\EventHandlers\PlayCDAudioOnArrival" "VLCPlayCDAudioOnArrival" ""
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Action" "Play CD audio"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "DefaultIcon" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeProgID" "VLC.CDAudio"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "InvokeVerb" "play"
WriteRegStr HKLM "Software\Microsoft\Windows\CurrentVersion\Explorer\AutoplayHandlers\Handlers\VLCPlayCDAudioOnArrival" "Provider" "VideoLAN VLC media player"
WriteRegStr HKCR "VLC.DVDMovie" "" "VLC DVD Movie"
WriteRegStr HKCR "VLC.DVDMovie\shell" "" "Play"
WriteRegStr HKCR "VLC.DVDMovie\shell\Play\command" "" \
'$INSTDIR\vlc.exe --started-from-file dvd:%1'
WriteRegStr HKCR "VLC.DVDMovie\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
WriteRegStr HKCR "VLC.CDAudio" "" "VLC CD Audio"
WriteRegStr HKCR "VLC.CDAudio\shell" "" "Play"
WriteRegStr HKCR "VLC.CDAudio\shell\Play\command" "" \
'$INSTDIR\vlc.exe --started-from-file cdda:%1'
WriteRegStr HKCR "VLC.CDAudio\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
SectionEnd
SectionGroup "File type associations" SEC06 SectionGroup "File type associations" SEC06
SectionGroup "Audio Files" SectionGroup "Audio Files"
!insertmacro MacroAudioExtensions RegisterExtensionSection !insertmacro MacroAudioExtensions RegisterExtensionSection
...@@ -552,13 +585,13 @@ SectionGroup "File type associations" SEC06 ...@@ -552,13 +585,13 @@ SectionGroup "File type associations" SEC06
SectionGroupEnd SectionGroupEnd
SectionGroupEnd SectionGroupEnd
Section /o "Context Menus" SEC05 Section "Context Menus" SEC07
SectionIn 3 SectionIn 3
!insertmacro MacroAllExtensions AddContextMenu !insertmacro MacroAllExtensions AddContextMenu
!insertmacro AddContextMenuExt "Directory" !insertmacro AddContextMenuExt "Directory"
SectionEnd SectionEnd
Section /o "Delete preferences and cache" SEC07 Section /o "Delete preferences and cache" SEC08
!insertmacro delprefs !insertmacro delprefs
SectionEnd SectionEnd
...@@ -575,13 +608,16 @@ SectionEnd ...@@ -575,13 +608,16 @@ SectionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \ !insertmacro MUI_DESCRIPTION_TEXT ${SEC04} \
"The VLC ActiveX plugin" "The VLC ActiveX plugin"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \ !insertmacro MUI_DESCRIPTION_TEXT ${SEC05} \
"Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')" "DVD and CD playback registration"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \ !insertmacro MUI_DESCRIPTION_TEXT ${SEC06} \
"Sets VLC media player as the default application for the specified file type" "Sets VLC media player as the default application for the specified file type"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC07} \ !insertmacro MUI_DESCRIPTION_TEXT ${SEC07} \
"Add context menu items ('Play With VLC' and 'Add To VLC's Playlist')"
!insertmacro MUI_DESCRIPTION_TEXT ${SEC08} \
"Deletes VLC media player preferences and cache files leftover from previous installations" "Deletes VLC media player preferences and cache files leftover from previous installations"
!insertmacro MUI_FUNCTION_DESCRIPTION_END !insertmacro MUI_FUNCTION_DESCRIPTION_END
;;; Start function
Function .onInit Function .onInit
ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \ ReadRegStr $R0 ${PRODUCT_UNINST_ROOT_KEY} "${PRODUCT_UNINST_KEY}" \
"UninstallString" "UninstallString"
...@@ -600,15 +636,15 @@ Function .onInit ...@@ -600,15 +636,15 @@ Function .onInit
!insertmacro MUI_LANGDLL_DISPLAY !insertmacro MUI_LANGDLL_DISPLAY
;Win98 detection ;Win98 detection
ReadRegStr $R0 HKLM \ ReadRegStr $R0 HKLM "SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber
"SOFTWARE\Microsoft\Windows\CurrentVersion" VersionNumber StrCmp $R0 "4.9" lbl_win98
StrCmp $R0 '4.9' lbl_win98
lbl_win98: lbl_win98:
MessageBox MB_OK|MB_ICONQUESTION "Windows 98 ! Remember to install MSLU" IDOK MessageBox MB_OK|MB_ICONQUESTION "Windows 98 ! Remember to install MSLU" IDOK
FunctionEnd FunctionEnd
;; End function
Section -Post Section -Post
WriteUninstaller "$INSTDIR\uninstall.exe" WriteUninstaller "$INSTDIR\uninstall.exe"
WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR WriteRegStr HKLM "${PRODUCT_DIR_REGKEY}" "InstallDir" $INSTDIR
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment