diff options
author | der richter <der.richter@gmx.de> | 2024-02-22 19:38:46 +0100 |
---|---|---|
committer | der richter <der.richter@gmx.de> | 2024-02-24 20:04:16 +0100 |
commit | 56b1078bfd46c1ff8c456050c8198016009837a0 (patch) | |
tree | b2e4d1a7c1b76f0ef602c4264b72202c38e7f06a /TOOLS | |
parent | 00f1743ae2fca1c3381046176ab495f846831017 (diff) | |
download | mpv-56b1078bfd46c1ff8c456050c8198016009837a0.tar.bz2 mpv-56b1078bfd46c1ff8c456050c8198016009837a0.tar.xz |
osxbundle: use dylib script directly instead of in a subprocess
before errors and outputs where ignored from the subscript and the main
script didn't fail nor did it output anything.
with this change the script properly outputs everything to stdout and
stderr. in the case the dylib script fails the whole script fails now.
the main function in dylib_unhell was kept since it can still be used
individually without the oscbundle script. the script had to be renamed
with an underscore to make it importable.
Diffstat (limited to 'TOOLS')
-rwxr-xr-x | TOOLS/dylib_unhell.py (renamed from TOOLS/dylib-unhell.py) | 6 | ||||
-rwxr-xr-x | TOOLS/osxbundle.py | 3 |
2 files changed, 5 insertions, 4 deletions
diff --git a/TOOLS/dylib-unhell.py b/TOOLS/dylib_unhell.py index a029a03d9a..9cba3adb2f 100755 --- a/TOOLS/dylib-unhell.py +++ b/TOOLS/dylib_unhell.py @@ -236,8 +236,8 @@ def remove_dev_tools_rapths(binary): for path in get_rpaths_dev_tools(binary): install_name_tool_delete_rpath(path, binary) -def main(): - binary = os.path.abspath(sys.argv[1]) +def process(binary): + binary = os.path.abspath(binary) if not os.path.exists(lib_path(binary)): os.makedirs(lib_path(binary)) print(">> gathering all linked libraries") @@ -258,4 +258,4 @@ def main(): process_vulkan_loader(binary, "VkLayer_khronos_synchronization2.json", "vulkan/explicit_layer.d", "layer") if __name__ == "__main__": - main() + process(sys.argv[1]) diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py index 1c769a06ab..1a9cfb4a6e 100755 --- a/TOOLS/osxbundle.py +++ b/TOOLS/osxbundle.py @@ -3,6 +3,7 @@ import os import shutil import sys import fileinput +import dylib_unhell from optparse import OptionParser def sh(command): @@ -77,7 +78,7 @@ def main(): if options.deps: print("> bundling dependencies") - print(sh(" ".join([os.path.join(src_path, "TOOLS/dylib-unhell.py"), target_binary(binary_name)]))) + dylib_unhell.process(target_binary(binary_name)) print("> signing bundle with ad-hoc pseudo identity") sign_bundle(binary_name) |