diff options
author | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-12-16 10:56:25 +0100 |
---|---|---|
committer | Stefano Pigozzi <stefano.pigozzi@gmail.com> | 2012-12-16 10:56:25 +0100 |
commit | 51c98619c8d039b4cf459910a3a934637cb69e05 (patch) | |
tree | 441409193703f5dd0d5351e1b34ec76d0811fcc6 /TOOLS/osxbundle.py | |
parent | 4c95f545d37d44dc3ec96eaa3192ef7ac5752dbe (diff) | |
download | mpv-51c98619c8d039b4cf459910a3a934637cb69e05.tar.bz2 mpv-51c98619c8d039b4cf459910a3a934637cb69e05.tar.xz |
osxbundle: print meaningful error when a dylib is missing
If one of the bundled libraries is pointing to a missing dylib stop the
bundling and exit with an error. This can happen if the user uninstalled a
dependency after he built the binary/libraries.
Diffstat (limited to 'TOOLS/osxbundle.py')
-rwxr-xr-x | TOOLS/osxbundle.py | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py index d0c4b7e62b..8005f8c8c4 100755 --- a/TOOLS/osxbundle.py +++ b/TOOLS/osxbundle.py @@ -64,7 +64,13 @@ def run_install_name_tool(target_file, dylib_path, dest_dir, root=True): def cp_dylibs(target_file, dest_dir): for dylib_path in user_dylib_lst(target_file): dylib_dest_path = os.path.join(dest_dir, os.path.basename(dylib_path)) - shutil.copy(dylib_path, dylib_dest_path) + + try: + shutil.copy(dylib_path, dylib_dest_path) + except IOError: + sys.exit("%s uses library %s which is not available anymore" % \ + (target_file, dylib_path) ) + os.chmod(dylib_dest_path, 0o755) cp_dylibs(dylib_dest_path, dest_dir) |