fix install_name_tool being called on the wrong libraries

This commit is contained in:
rdb 2012-10-03 10:21:15 +00:00
parent 88ef2618eb
commit 24aaac9e22

View File

@ -5869,8 +5869,13 @@ def MakeInstallerOSX():
oscmd("cp -R doc/ReleaseNotes dstroot/base/Developer/Panda3D/ReleaseNotes")
if os.path.isdir(GetOutputDir()+"/plugins"):
oscmd("cp -R %s/plugins dstroot/base/Developer/Panda3D/plugins" % GetOutputDir())
install_libs = []
for base in os.listdir(GetOutputDir()+"/lib"):
if (not base.endswith(".a")):
install_libs.append(base)
for base in install_libs:
libname = "dstroot/base/Developer/Panda3D/lib/" + base
# We really need to specify -R in order not to follow symlinks
# On OSX, just specifying -P is not enough to do that.
@ -5883,7 +5888,7 @@ def MakeInstallerOSX():
for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
if len(line.strip()) > 0 and not line.strip().endswith(":"):
libdep = line.strip().split(" ", 1)[0]
if not libdep.startswith("/"):
if os.path.basename(libdep) in install_libs:
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), libname), True)
# Temporary script that should clean up the poison that the early 1.7.0 builds injected into environment.plist
@ -5943,7 +5948,7 @@ def MakeInstallerOSX():
for line in open(GetOutputDir()+"/tmp/otool-libs.txt", "r"):
if len(line.strip()) > 0 and not line.strip().endswith(":"):
libdep = line.strip().split(" ", 1)[0]
if not libdep.startswith("/"):
if os.path.basename(libdep) in install_libs:
oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, os.path.basename(libdep), binname), True)
if PkgSkip("PYTHON")==0: