More install_name_tool fixes

This commit is contained in:
rdb 2010-01-06 10:39:41 +00:00
parent 8f5b9b9d90
commit d82b2d6a96

View File

@ -4867,12 +4867,13 @@ def MakeInstallerOSX():
oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname) oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname)
# Execute install_name_tool to make them reference an absolute path # Execute install_name_tool to make them reference an absolute path
if (not os.path.islink(libname)): if (libname.endswith(".dylib") and not os.path.islink(libname)):
oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True) oscmd("install_name_tool -id /Developer/Panda3D/lib/%s %s" % (base, libname), True)
oscmd("otool -L %s | grep .%s.dylib > %s/tmp/otool-libs.txt" % (libname, VERSION, GetOutputDir()), True) oscmd("otool -L %s | grep .%s.dylib > %s/tmp/otool-libs.txt" % (libname, VERSION, GetOutputDir()), True)
for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
if len(line.strip()) > 0 and not line.strip().endswith(":"): if len(line.strip()) > 0 and not line.strip().endswith(":"):
libdep = line.strip().split(" ", 1)[0] libdep = line.strip().split(" ", 1)[0]
if not libdep.startswith("/Developer/Panda3D/lib/"):
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True) oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True)
# Scripts to configure this version of Panda3D (in environment.plist) # Scripts to configure this version of Panda3D (in environment.plist)
@ -4918,6 +4919,7 @@ def MakeInstallerOSX():
for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"): for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
if len(line.strip()) > 0 and not line.strip().endswith(":"): if len(line.strip()) > 0 and not line.strip().endswith(":"):
libdep = line.strip().split(" ", 1)[0] libdep = line.strip().split(" ", 1)[0]
if not libdep.startswith("/Developer/Panda3D/lib/"):
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True) oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True)
if PkgSkip("PYTHON")==0: if PkgSkip("PYTHON")==0: