Browse Source

More install_name_tool fixes

rdb 16 years ago
parent
commit
d82b2d6a96
1 changed files with 5 additions and 3 deletions
  1. 5 3
      makepanda/makepanda.py

+ 5 - 3
makepanda/makepanda.py

@@ -4867,13 +4867,14 @@ def MakeInstallerOSX():
             oscmd("cp -R " + GetOutputDir() + "/lib/" + base + " " + libname)
             
             # 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("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"):
                     if len(line.strip()) > 0 and not line.strip().endswith(":"):
                         libdep = line.strip().split(" ", 1)[0]
-                        oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, libname), True)
+                        if not libdep.startswith("/Developer/Panda3D/lib/"):
+                            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)
     oscmd("mkdir -p dstroot/scripts/base/")
@@ -4918,7 +4919,8 @@ 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]
-                    oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True)
+                    if not libdep.startswith("/Developer/Panda3D/lib/"):
+                        oscmd("install_name_tool -change %s /Developer/Panda3D/lib/%s %s" % (libdep, libdep, binname), True)
     
     if PkgSkip("PYTHON")==0:
         oscmd("mkdir -p dstroot/pythoncode/usr/bin")