all repos — mgba @ a3a615fa7f4b4216259850d0276db54075ff0b49

mGBA Game Boy Advance Emulator

Tools: Make deploy-mac work with symlinks
Jeffrey Pfau jeffrey@endrift.com
Tue, 02 Jun 2015 22:24:28 -0700
commit

a3a615fa7f4b4216259850d0276db54075ff0b49

parent

6ad402170c148bf6668e49767eceee040342a540

1 files changed, 9 insertions(+), 0 deletions(-)

jump to
M tools/deploy-mac.pytools/deploy-mac.py

@@ -67,6 +67,15 @@ if split[0] == '@executable_path':

split[:1] = execPath if split[0] == '/' and not os.access(joinPath(split), os.F_OK): split[:1] = root + try: + oldPath = joinPath(split) + while True: + linkPath = os.readlink(os.path.abspath(oldPath)) + oldPath = os.path.join(os.path.dirname(oldPath), linkPath) + except OSError as e: + if e.errno != errno.EINVAL: + raise + split = splitPath(oldPath) isFramework = False if not split[-1].endswith('.dylib'): isFramework = True