3
0
Fork 0

bins have different relative path to libs

small_fixes
reg_ 13 years ago
parent 11283444a7
commit 0080827b41

@ -30,9 +30,11 @@ print("Fixing %s..." % component)
basename = os.path.basename(component) basename = os.path.basename(component)
try: try:
name, ext = basename.rsplit('.', 1) name, ext = basename.rsplit('.', 1)
is_library = True
except ValueError: except ValueError:
name = basename name = basename
ext = '' ext = ''
is_library = False
libname = u'lib%s%s.0.dylib' % (name[0].upper(), name[1:]) libname = u'lib%s%s.0.dylib' % (name[0].upper(), name[1:])
# run otool to get a list of deps. # run otool to get a list of deps.
@ -62,7 +64,10 @@ for line in otool_out.split('\n'):
match = re.match(r'lib([a-z\_\-\d]+)([\.?\d]*)\.dylib', _basename) match = re.match(r'lib([a-z\_\-\d]+)([\.?\d]*)\.dylib', _basename)
if match: if match:
print("match: %s" % match.groups()[0]) print("match: %s" % match.groups()[0])
newpath = u'@executable_path/../Frameworks/lib%s.dylib' % match.groups()[0] if is_library:
newpath = u'@executable_path/../Frameworks/lib%s.dylib' % match.groups()[0]
else:
newpath = u'@executable_path/../../Frameworks/lib%s.dylib' % match.groups()[0]
print('install_name_tool -change %s %s %s' % (path, newpath, component)) print('install_name_tool -change %s %s %s' % (path, newpath, component))
os.system('install_name_tool -change %s %s %s' % (path, newpath, component)) os.system('install_name_tool -change %s %s %s' % (path, newpath, component))
continue continue

Loading…
Cancel
Save