Commit 3e2e7f2a authored by Jean-Philippe André's avatar Jean-Philippe André

Package Win32: add .vlt and .wsz extensions

To open skins, you have to use a special command, thus a different
ShellAssociation.
Entries are not selected by default (as they may be associated to
the VLC Skin Editor)
parent 79d1e54c
......@@ -146,7 +146,7 @@ RequestExecutionLevel user
; 1. File type associations ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Function that register one extension for VLC
;; Function that registers one extension for VLC
Function RegisterExtension
; back up old value for extension $R0 (eg. ".opt")
ReadRegStr $1 HKCR "$R0" ""
......@@ -173,6 +173,33 @@ ForVista:
ToEnd:
FunctionEnd
;; Function that registers one skin extension for VLC
Function RegisterSkinExtension
; back up old value for extension $R0 (eg. ".opt")
ReadRegStr $1 HKCR "$R0" ""
StrCmp $1 "" NoBackup
StrCmp $1 "VLC$R0" "NoBackup"
WriteRegStr HKCR "$R0" "VLC.backup" $1
NoBackup:
WriteRegStr HKCR "$R0" "" "VLC$R0"
ReadRegStr $0 HKCR "VLC$R0" ""
WriteRegStr HKCR "VLC$R0" "" "VLC skin file ($R0)"
WriteRegStr HKCR "VLC$R0\shell" "" "Open"
WriteRegStr HKCR "VLC$R0\shell\Open" "" ""
WriteRegStr HKCR "VLC$R0\shell\Open\command" "" '"$INSTDIR\vlc.exe" -Iskins --skins2-last "%1"'
WriteRegStr HKCR "VLC$R0\DefaultIcon" "" '"$INSTDIR\vlc.exe",0'
;;; Vista Only part
; Vista and above detection
ReadRegStr $R1 HKLM "SOFTWARE\Microsoft\Windows NT\CurrentVersion" CurrentVersion
StrCpy $R2 $R1 1
StrCmp $R2 '6' ForVista ToEnd
ForVista:
WriteRegStr HKLM "Software\Clients\Media\VLC\Capabilities\FileAssociations" "$R0" "VLC$R0"
ToEnd:
FunctionEnd
;; Function that removes one extension that VLC owns.
Function un.RegisterExtension
;start of restore script
......@@ -201,6 +228,16 @@ FunctionEnd
SectionEnd
!macroend
!macro RegisterSkinExtensionSection EXT
Section /o ${EXT}
SectionIn 1 3
Push $R0
StrCpy $R0 ${EXT}
Call RegisterSkinExtension
Pop $R0
SectionEnd
!macroend
!macro UnRegisterExtensionSection EXT
Push $R0
StrCpy $R0 ${EXT}
......@@ -287,6 +324,11 @@ FunctionEnd
!insertmacro ${_action} ".xspf"
!macroend
!macro MacroSkinExtensions _action
!insertmacro ${_action} ".vlt"
!insertmacro ${_action} ".wsz"
!macroend
; One macro to rule them all
!macro MacroAllExtensions _action
!insertmacro MacroAudioExtensions ${_action}
......@@ -595,6 +637,7 @@ SectionGroup /e !$Name_Section06 SEC06
SectionGroupEnd
SectionGroup $Name_SectionGroupOther
!insertmacro MacroOtherExtensions RegisterExtensionSection
!insertmacro MacroSkinExtensions RegisterSkinExtensionSection
SectionGroupEnd
SectionGroupEnd
......@@ -832,6 +875,7 @@ Section "un.$Name_Section91" SEC91
!insertmacro MacroAllExtensions DeleteContextMenu
!insertmacro MacroAllExtensions UnRegisterExtensionSection
!insertmacro MacroSkinExtensions UnRegisterExtensionSection
!insertmacro DeleteContextMenuExt "Directory"
;remove activex plugin
......
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