mirror of https://github.com/mpv-player/mpv
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.
This commit is contained in:
parent
00f1743ae2
commit
56b1078bfd
|
@ -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])
|
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue