Commit 080934b2 authored by Jean-Baptiste Kempf's avatar Jean-Baptiste Kempf

Windows Installer: Fix the bug of not showing context menus when you select a directory.

Patch by Hannes Domani.
parent fabc3dad
...@@ -225,22 +225,30 @@ FunctionEnd ...@@ -225,22 +225,30 @@ FunctionEnd
; Context menu entries ; ; Context menu entries ;
;;;;;;;;;;;;;;;;;;;;;;;; ;;;;;;;;;;;;;;;;;;;;;;;;
!macro AddContextMenuExt EXT
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\AddToPlaylistVLC "" "Add to VLC media player's Playlist"
WriteRegStr HKCR ${EXT}\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'
!macroend
!macro AddContextMenu EXT !macro AddContextMenu EXT
Push $R0 Push $R0
ReadRegStr $R0 HKCR ${EXT} "" ReadRegStr $R0 HKCR ${EXT} ""
WriteRegStr HKCR $R0\shell\PlayWithVLC "" "Play with VLC media player" !insertmacro AddContextMenuExt $R0
WriteRegStr HKCR $R0\shell\PlayWithVLC\command "" '$INSTDIR\vlc.exe --started-from-file --no-playlist-enqueue "%1"'
WriteRegStr HKCR $R0\shell\AddToPlaylistVLC "" "Add to VLC media player's Playlist"
WriteRegStr HKCR $R0\shell\AddToPlaylistVLC\command "" '$INSTDIR\vlc.exe --started-from-file --playlist-enqueue "%1"'
Pop $R0 Pop $R0
!macroend !macroend
!macro DeleteContextMenuExt EXT
DeleteRegKey HKCR ${EXT}\shell\PlayWithVLC
DeleteRegKey HKCR ${EXT}\shell\AddToPlaylistVLC
!macroend
!macro DeleteContextMenu EXT !macro DeleteContextMenu EXT
Push $R0 Push $R0
ReadRegStr $R0 HKCR ${EXT} "" ReadRegStr $R0 HKCR ${EXT} ""
DeleteRegKey HKCR $R0\shell\PlayWithVLC !insertmacro DeleteContextMenuExt $R0
DeleteRegKey HKCR $R0\shell\AddToPlaylistVLC
Pop $R0 Pop $R0
!macroend !macroend
...@@ -513,7 +521,7 @@ SectionGroupEnd ...@@ -513,7 +521,7 @@ SectionGroupEnd
Section /o "Context Menus" SEC05 Section /o "Context Menus" SEC05
SectionIn 3 SectionIn 3
!insertmacro MacroAllExtensions AddContextMenu !insertmacro MacroAllExtensions AddContextMenu
!insertmacro AddContextMenu "Directory" !insertmacro AddContextMenuExt "Directory"
SectionEnd SectionEnd
Section /o "Delete preferences and cache" SEC07 Section /o "Delete preferences and cache" SEC07
...@@ -641,7 +649,7 @@ Section "Uninstall" SEC91 ...@@ -641,7 +649,7 @@ Section "Uninstall" SEC91
!insertmacro MacroAllExtensions DeleteContextMenu !insertmacro MacroAllExtensions DeleteContextMenu
!insertmacro MacroAllExtensions UnRegisterExtensionSection !insertmacro MacroAllExtensions UnRegisterExtensionSection
!insertmacro DeleteContextMenu "Directory" !insertmacro DeleteContextMenuExt "Directory"
;remove activex plugin ;remove activex plugin
UnRegDLL "$INSTDIR\axvlc.dll" UnRegDLL "$INSTDIR\axvlc.dll"
......
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