[vlc-commits] nsis: Allow some extensions to be registered but not associated
Hugo Beauzée-Luyssen
git at videolan.org
Tue Jan 31 10:12:48 CET 2017
vlc | branch: master | Hugo Beauzée-Luyssen <hugo at beauzee.fr> | Fri Jan 27 12:51:30 2017 +0100| [cd3e2a03ecc49476e4cac1acaa85363412b673ce] | committer: Hugo Beauzée-Luyssen
nsis: Allow some extensions to be registered but not associated
> http://git.videolan.org/gitweb.cgi/vlc.git/?a=commit;h=cd3e2a03ecc49476e4cac1acaa85363412b673ce
---
extras/package/win32/NSIS/helpers/extensions.nsh | 14 ++++++++++++++
extras/package/win32/NSIS/vlc.win32.nsi.in | 1 +
2 files changed, 15 insertions(+)
diff --git a/extras/package/win32/NSIS/helpers/extensions.nsh b/extras/package/win32/NSIS/helpers/extensions.nsh
index d19ccaa..e5c0bcb 100644
--- a/extras/package/win32/NSIS/helpers/extensions.nsh
+++ b/extras/package/win32/NSIS/helpers/extensions.nsh
@@ -79,6 +79,16 @@ FunctionEnd
${MementoSectionEnd}
!macroend
+!macro AssociateExtensionUnselectedSection TYPE EXT
+ ${MementoUnselectedSection} ${EXT} SEC_EXT_${TYPE}_${EXT}
+ SectionIn 1 3
+ Push $R0
+ StrCpy $R0 ${EXT}
+ Call AssociateExtension
+ Pop $R0
+ ${MementoSectionEnd}
+!macroend
+
!macro RegisterExtensionMacro TYPE EXT
Push $R0
StrCpy $R0 ${EXT}
@@ -231,6 +241,9 @@ FunctionEnd
!insertmacro ${_action} Other ".xspf"
!macroend
+!macro MacroUnassociatedExtensions _action
+!macroend
+
!macro MacroSkinExtensions _action
!insertmacro ${_action} Skin ".vlt"
!insertmacro ${_action} Skin ".wsz"
@@ -241,6 +254,7 @@ FunctionEnd
!insertmacro MacroAudioExtensions ${_action}
!insertmacro MacroVideoExtensions ${_action}
!insertmacro MacroOtherExtensions ${_action}
+ !insertmacro MacroUnassociatedExtensions ${_action}
!macroend
; Generic function for adding the context menu for one ext.
diff --git a/extras/package/win32/NSIS/vlc.win32.nsi.in b/extras/package/win32/NSIS/vlc.win32.nsi.in
index 731cd92..86ebf0d 100644
--- a/extras/package/win32/NSIS/vlc.win32.nsi.in
+++ b/extras/package/win32/NSIS/vlc.win32.nsi.in
@@ -420,6 +420,7 @@ SectionGroup /e !$Name_Section06 SEC06
SectionGroup $Name_SectionGroupOther
!insertmacro MacroOtherExtensions AssociateExtensionSection
!insertmacro MacroSkinExtensions AssociateSkinExtensionSection
+ !insertmacro MacroUnassociatedExtensions AssociateExtensionUnselectedSection
SectionGroupEnd
SectionGroupEnd
More information about the vlc-commits
mailing list