mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-30 00:32:57 -04:00
parent
bf6dbefdd2
commit
8d0d733da8
24
direct/src/dist/commands.py
vendored
24
direct/src/dist/commands.py
vendored
@ -1181,18 +1181,20 @@ class build_apps(setuptools.Command):
|
|||||||
dylib = dylib.replace('@loader_path/../Frameworks/', '')
|
dylib = dylib.replace('@loader_path/../Frameworks/', '')
|
||||||
elif dylib.startswith('@executable_path/../Frameworks/'):
|
elif dylib.startswith('@executable_path/../Frameworks/'):
|
||||||
dylib = dylib.replace('@executable_path/../Frameworks/', '')
|
dylib = dylib.replace('@executable_path/../Frameworks/', '')
|
||||||
elif dylib.startswith('@loader_path/'):
|
else:
|
||||||
dylib = dylib.replace('@loader_path/', '')
|
for prefix in ('@loader_path/', '@rpath/'):
|
||||||
|
if dylib.startswith(prefix):
|
||||||
|
dylib = dylib.replace(prefix, '')
|
||||||
|
|
||||||
# Do we need to flatten the relative reference?
|
# Do we need to flatten the relative reference?
|
||||||
if '/' in dylib and flatten:
|
if '/' in dylib and flatten:
|
||||||
new_dylib = '@loader_path/' + os.path.basename(dylib)
|
new_dylib = prefix + os.path.basename(dylib)
|
||||||
str_size = len(cmd_data) - 16
|
str_size = len(cmd_data) - 16
|
||||||
if len(new_dylib) < str_size:
|
if len(new_dylib) < str_size:
|
||||||
fp.seek(-str_size, os.SEEK_CUR)
|
fp.seek(-str_size, os.SEEK_CUR)
|
||||||
fp.write(new_dylib.encode('ascii').ljust(str_size, b'\0'))
|
fp.write(new_dylib.encode('ascii').ljust(str_size, b'\0'))
|
||||||
else:
|
else:
|
||||||
self.warn('Unable to rewrite dependency {}'.format(orig))
|
self.warn('Unable to rewrite dependency {}'.format(orig))
|
||||||
|
|
||||||
load_dylibs.append(dylib)
|
load_dylibs.append(dylib)
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user