npapi-vlc | branch: master | Petter Reinholdtsen <[email protected]> | Wed May 11 15:36:02 2016 +0200| [72e1bb0ca2c1a27592e492fa1db8109d2a707f9d] | committer: Petter Reinholdtsen
Add rule to generate MIME list for MacOSX from vlchsell.cpp. Introduce new script gen-vlc-r-in to generate the MacOSX resource file from the list of MIME types in vlcshell.cpp. > https://code.videolan.org/videolan/npapi-vlc/commit/72e1bb0ca2c1a27592e492fa1db8109d2a707f9d --- npapi/Makefile.am | 3 +++ npapi/gen-vlc-r-in | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 67 insertions(+) diff --git a/npapi/Makefile.am b/npapi/Makefile.am index 3119388..4deb130 100644 --- a/npapi/Makefile.am +++ b/npapi/Makefile.am @@ -161,3 +161,6 @@ VLC-Plugin.plugin: $(lib_LTLIBRARIES) find "$(top_builddir)/VLC-Plugin.plugin" -type f -exec chmod ugo+r '{}' \; endif # Mac + +package/vlc.r.in: vlcshell.cpp + ./gen-vlc-r-in > package/vlc.r.in diff --git a/npapi/gen-vlc-r-in b/npapi/gen-vlc-r-in new file mode 100755 index 0000000..8a6a216 --- /dev/null +++ b/npapi/gen-vlc-r-in @@ -0,0 +1,64 @@ +#!/bin/sh +# +# Generate package/vlc.r.in from the mime types listed in vlcshell.cpp + +set -e + +# Extract all mime type lines, minus the quicktime ones, which are +# unwanted on MacOS X. +lines() { + awk '/static char mimetype/,/ ;/ {print}' vlcshell.cpp | \ + grep -v static | \ + grep -v '^ ;' | \ + grep -vi "quicktime" +} + + +cat <<EOF +/***************************************************************************** + * VLC Plugin description for OS X + *****************************************************************************/ + +/* Definitions of system resource types */ + +data 'carb' (0) +{ +}; + +/* The first string in the array is a plugin description, + * the second is the plugin name */ +resource 'STR#' (126) +{ + { + "VLC media player Web Plugin @VERSION@" + "<BR>@COPYRIGHT_MESSAGE@" + "<BR><A HREF='http://www.videolan.org'>http://www.videolan.org</A>", + "VLC Web Plugin" + }; +}; + +/* A description for each MIME type in resource 128 */ +resource 'STR#' (127) +{ + { +EOF + +lines | sed 's/ *".*:.*:\(.*\);"/ "\1",/' | + sed 's%^ */% /%' + +cat <<EOF + }; +}; + +/* A series of pairs of strings... first MIME type, then file extension(s) */ +resource 'STR#' (128,"MIME Type") +{ + { +EOF +lines | sed 's/ *"\(.*\):\(.*\):.*;"/ "\1", "\2",/' | + sed 's%^ */% /%' +cat <<EOF + }; +}; + +EOF _______________________________________________ vlc-commits mailing list [email protected] https://mailman.videolan.org/listinfo/vlc-commits
