diff options
Diffstat (limited to 'TOOLS')
-rwxr-xr-x | TOOLS/mpv_identify.sh | 8 | ||||
-rwxr-xr-x | TOOLS/osxbundle.py | 71 | ||||
-rw-r--r-- | TOOLS/osxbundle/mpv.app/Contents/Info.plist | 2 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/Makefile | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/filterutils.c | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/filterutils.h | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/rectangle.c | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/showqscale.c | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/telecine.c | 21 | ||||
-rw-r--r-- | TOOLS/vf_dlopen/tile.c | 21 |
10 files changed, 205 insertions, 23 deletions
diff --git a/TOOLS/mpv_identify.sh b/TOOLS/mpv_identify.sh index b3bc0481ef..0c4dfc5b02 100755 --- a/TOOLS/mpv_identify.sh +++ b/TOOLS/mpv_identify.sh @@ -45,6 +45,10 @@ if [ $# -lt 2 ]; then exit 1 fi +if [ -z "$MPV" ]; then + MPV="mpv" +fi + __midentify__LF=" " @@ -86,6 +90,8 @@ __midentify__allprops=" fps width height + dwidth + dheight sub " @@ -98,7 +104,7 @@ for __midentify__key in $__midentify__allprops; do eval unset $__midentify__nextprefix$__midentify__key done -__midentify__output=`mpv --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=0 "$@"` +__midentify__output=`$MPV --playing-msg="$__midentify__propstr" --vo=null --ao=null --frames=1 --quiet "$@"` __midentify__fileindex=0 __midentify__prefix= while :; do diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py index 8005f8c8c4..e0f240797f 100755 --- a/TOOLS/osxbundle.py +++ b/TOOLS/osxbundle.py @@ -4,6 +4,7 @@ import os import re import shutil import sys +from optparse import OptionParser def sh(command): return os.popen(command).read() @@ -28,27 +29,27 @@ def user_dylib_lst(input_file): return [lib for lib in dylib_lst(input_file).split("\n") if is_user_lib(lib, input_file)] -def bundle_name(): +def bundle_name(binary_name): return "%s.app" % binary_name -def target_plist(): - return os.path.join(bundle_name(), 'Contents', 'Info.plist') +def target_plist(binary_name): + return os.path.join(bundle_name(binary_name), 'Contents', 'Info.plist') -def target_directory(): - return os.path.join(bundle_name(), 'Contents', 'MacOS') +def target_directory(binary_name): + return os.path.join(bundle_name(binary_name), 'Contents', 'MacOS') -def target_binary(): - return os.path.join(target_directory(), binary_name) +def target_binary(binary_name): + return os.path.join(target_directory(binary_name), binary_name) -def copy_bundle(): - if os.path.isdir(bundle_name()): - shutil.rmtree(bundle_name()) +def copy_bundle(binary_name): + if os.path.isdir(bundle_name(binary_name)): + shutil.rmtree(bundle_name(binary_name)) shutil.copytree( - os.path.join('TOOLS', 'osxbundle', bundle_name()), - bundle_name()) + os.path.join('TOOLS', 'osxbundle', bundle_name(binary_name)), + bundle_name(binary_name)) -def copy_binary(): - shutil.copy(binary_name, target_binary()) +def copy_binary(binary_name): + shutil.copy(binary_name, target_binary(binary_name)) def run_install_name_tool(target_file, dylib_path, dest_dir, root=True): new_dylib_path = os.path.join("@executable_path", "lib", @@ -83,12 +84,40 @@ def fix_dylibs_paths(target_file, dest_dir, root=True): def apply_plist_template(plist_file, version): sh("sed -i -e 's/{{VERSION}}/%s/g' %s" % (version, plist_file)) -version = sh("TOOLS/osxbundle/version.sh").strip() +def bundle_dependencies(binary_name): + lib_bundle_directory = os.path.join(target_directory(binary_name), "lib") + cp_dylibs(binary_name, lib_bundle_directory) + fix_dylibs_paths(target_binary(binary_name), lib_bundle_directory) -print("Creating Mac OS X application bundle (version: %s)..." % version) +def main(): + version = sh("TOOLS/osxbundle/version.sh").strip() -copy_bundle() -copy_binary() -apply_plist_template(target_plist(), version) -cp_dylibs(sys.argv[1], os.path.join(target_directory(), "lib")) -fix_dylibs_paths(target_binary(), os.path.join(target_directory(), "lib")) + usage = "usage: %prog [options] arg" + parser = OptionParser(usage) + parser.add_option("-s", "--skip-deps", action="store_false", dest="deps", + default=True, + help="don't bundle the dependencies") + + (options, args) = parser.parse_args() + + if len(args) != 1: + parser.error("incorrect number of arguments") + else: + binary_name = args[0] + + print("Creating Mac OS X application bundle (version: %s)..." % version) + print("> copying bundle skeleton") + copy_bundle(binary_name) + print("> copying binary") + copy_binary(binary_name) + print("> generating Info.plist") + apply_plist_template(target_plist(binary_name), version) + + if options.deps: + print("> bundling dependencies") + bundle_dependencies(binary_name) + + print("done.") + +if __name__ == "__main__": + main() diff --git a/TOOLS/osxbundle/mpv.app/Contents/Info.plist b/TOOLS/osxbundle/mpv.app/Contents/Info.plist index 472542fe92..d19c83564e 100644 --- a/TOOLS/osxbundle/mpv.app/Contents/Info.plist +++ b/TOOLS/osxbundle/mpv.app/Contents/Info.plist @@ -173,7 +173,7 @@ <key>CFBundleIconFile</key> <string>icon</string> <key>CFBundleIdentifier</key> - <string>org.mpv-player.standalone</string> + <string>io.mpv</string> <key>CFBundleInfoDictionaryVersion</key> <string>6.0</string> <key>CFBundleName</key> diff --git a/TOOLS/vf_dlopen/Makefile b/TOOLS/vf_dlopen/Makefile index ed315fe365..332c890821 100644 --- a/TOOLS/vf_dlopen/Makefile +++ b/TOOLS/vf_dlopen/Makefile @@ -1,3 +1,24 @@ +# +# Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> +# +# This file is part of mpv's vf_dlopen examples. +# +# mpv's vf_dlopen examples are free software; you can redistribute them and/or +# modify them under the terms of the GNU Lesser General Public License as +# published by the Free Software Foundation; either version 2.1 of the +# License, or (at your option) any later version. +# +# mpv's vf_dlopen examples are distributed in the hope that they will be +# useful, but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser +# General Public License for more details. +# +# You should have received a copy of the GNU Lesser General Public +# License along with mpv's vf_dlopen examples; if not, write to the Free +# Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +# 02110-1301 USA +# + FILTERS = showqscale telecine tile rectangle COMMON = filterutils.o diff --git a/TOOLS/vf_dlopen/filterutils.c b/TOOLS/vf_dlopen/filterutils.c index e2f14092de..2bafd93dba 100644 --- a/TOOLS/vf_dlopen/filterutils.c +++ b/TOOLS/vf_dlopen/filterutils.c @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + #include <assert.h> #include <string.h> diff --git a/TOOLS/vf_dlopen/filterutils.h b/TOOLS/vf_dlopen/filterutils.h index 4b4229d8ea..791adae50d 100644 --- a/TOOLS/vf_dlopen/filterutils.h +++ b/TOOLS/vf_dlopen/filterutils.h @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + void copy_plane( unsigned char *dest, unsigned dest_stride, const unsigned char *src, unsigned src_stride, diff --git a/TOOLS/vf_dlopen/rectangle.c b/TOOLS/vf_dlopen/rectangle.c index 758ad7701c..1492ec221e 100644 --- a/TOOLS/vf_dlopen/rectangle.c +++ b/TOOLS/vf_dlopen/rectangle.c @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/TOOLS/vf_dlopen/showqscale.c b/TOOLS/vf_dlopen/showqscale.c index 9bece60a4f..df1f65d51e 100644 --- a/TOOLS/vf_dlopen/showqscale.c +++ b/TOOLS/vf_dlopen/showqscale.c @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/TOOLS/vf_dlopen/telecine.c b/TOOLS/vf_dlopen/telecine.c index 1b3db26a20..5a6a2115bc 100644 --- a/TOOLS/vf_dlopen/telecine.c +++ b/TOOLS/vf_dlopen/telecine.c @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + #include <assert.h> #include <stdio.h> #include <stdlib.h> diff --git a/TOOLS/vf_dlopen/tile.c b/TOOLS/vf_dlopen/tile.c index 0e9a14fb62..ad9f72ebdc 100644 --- a/TOOLS/vf_dlopen/tile.c +++ b/TOOLS/vf_dlopen/tile.c @@ -1,3 +1,24 @@ +/* + * Copyright (c) 2012 Rudolf Polzer <divVerent@xonotic.org> + * + * This file is part of mpv's vf_dlopen examples. + * + * mpv's vf_dlopen examples are free software; you can redistribute them and/or + * modify them under the terms of the GNU Lesser General Public License as + * published by the Free Software Foundation; either version 2.1 of the + * License, or (at your option) any later version. + * + * mpv's vf_dlopen examples are distributed in the hope that they will be + * useful, but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser + * General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with mpv's vf_dlopen examples; if not, write to the Free + * Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA + * 02110-1301 USA + */ + #include <assert.h> #include <stdio.h> #include <stdlib.h> |