summaryrefslogtreecommitdiffstats
path: root/TOOLS/osxbundle.py
diff options
context:
space:
mode:
authorStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-30 09:12:01 +0200
committerStefano Pigozzi <stefano.pigozzi@gmail.com>2013-06-30 09:14:25 +0200
commit0a1c49794531bf62dcbfb33e1f0adae5f14fe718 (patch)
treec269826bc8a056eb7982df92f143645a962c65bd /TOOLS/osxbundle.py
parent588eef86c27daec76b573866e1bf0a163bebd3cc (diff)
downloadmpv-0a1c49794531bf62dcbfb33e1f0adae5f14fe718.tar.bz2
mpv-0a1c49794531bf62dcbfb33e1f0adae5f14fe718.tar.xz
osxbundle: suggest some ways to correct missing dependencies
Hopefully this can give some more clues to users about what broke if they find themselves in this situation.
Diffstat (limited to 'TOOLS/osxbundle.py')
-rwxr-xr-xTOOLS/osxbundle.py13
1 files changed, 11 insertions, 2 deletions
diff --git a/TOOLS/osxbundle.py b/TOOLS/osxbundle.py
index e0f240797f..6cd2a227c5 100755
--- a/TOOLS/osxbundle.py
+++ b/TOOLS/osxbundle.py
@@ -5,6 +5,7 @@ import re
import shutil
import sys
from optparse import OptionParser
+from textwrap import dedent
def sh(command):
return os.popen(command).read()
@@ -69,8 +70,16 @@ def cp_dylibs(target_file, dest_dir):
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) )
+ if re.match("dylib$", target_file):
+ reinstall_what = target_file
+ else:
+ reinstall_what = dylib_path
+
+ sys.exit(dedent("""\
+ %s uses library %s which is not available anymore.
+ This is most likely because you uninstalled %s.
+ Please reinstall %s to fix it's dependencies.""" % \
+ (target_file, dylib_path, dylib_path, reinstall_what) ))
os.chmod(dylib_dest_path, 0o755)
cp_dylibs(dylib_dest_path, dest_dir)