Browse Source

Some improvements that might not actually fix anything

rdb 14 years ago
parent
commit
857fc6e2d6
1 changed files with 8 additions and 4 deletions
  1. 8 4
      direct/src/p3d/Packager.py

+ 8 - 4
direct/src/p3d/Packager.py

@@ -1035,7 +1035,7 @@ class Packager:
             if Filename.fromOsSpecific(library).exists():
             if Filename.fromOsSpecific(library).exists():
                 return Filename.fromOsSpecific(library)
                 return Filename.fromOsSpecific(library)
 
 
-            # DSearchPath appears not to work well for directories.
+            # DSearchPath appears not to work for directories.
             fpath = []
             fpath = []
             fpath.append(Filename("/Library/Frameworks"))
             fpath.append(Filename("/Library/Frameworks"))
             fpath.append(Filename("/System/Library/Frameworks"))
             fpath.append(Filename("/System/Library/Frameworks"))
@@ -1146,9 +1146,12 @@ class Packager:
                         # that those often contain absolute paths, they
                         # that those often contain absolute paths, they
                         # aren't commonly on the library path either.
                         # aren't commonly on the library path either.
                         filename = self.__locateFrameworkLibrary(filename)
                         filename = self.__locateFrameworkLibrary(filename)
+                        filename.setBinary()
                     else:
                     else:
                         # It's just a normal library - find it on the path.
                         # It's just a normal library - find it on the path.
                         filename = Filename.fromOsSpecific(filename)
                         filename = Filename.fromOsSpecific(filename)
+                        filename.setBinary()
+
                         if filename.isLocal():
                         if filename.isLocal():
                             filename.resolveFilename(path)
                             filename.resolveFilename(path)
                         else:
                         else:
@@ -1165,7 +1168,7 @@ class Packager:
 
 
         def __parseDependenciesOSX(self, tempFile):
         def __parseDependenciesOSX(self, tempFile):
             """ Reads the indicated temporary file, the output from
             """ Reads the indicated temporary file, the output from
-            otool -L, to determine the list of dylib's this
+            otool -L, to determine the list of dylibs this
             executable file depends on. """
             executable file depends on. """
 
 
             lines = open(tempFile.toOsSpecific(), 'rU').readlines()
             lines = open(tempFile.toOsSpecific(), 'rU').readlines()
@@ -1205,12 +1208,12 @@ class Packager:
                 return None
                 return None
 
 
             if not ident.startswith("\177ELF"):
             if not ident.startswith("\177ELF"):
-                # Not an elf.  Beware of orcs.
+                # No elf magic!  Beware of orcs.
                 return None
                 return None
 
 
             # Make sure we read in the correct endianness and integer size
             # Make sure we read in the correct endianness and integer size
             byteOrder = "<>"[ord(ident[5]) - 1]
             byteOrder = "<>"[ord(ident[5]) - 1]
-            elfClass = ord(ident[4]) - 1 # 32-bits, 64-bits
+            elfClass = ord(ident[4]) - 1 # 0 = 32-bits, 1 = 64-bits
             headerStruct = byteOrder + ("HHIIIIIHHHHHH", "HHIQQQIHHHHHH")[elfClass]
             headerStruct = byteOrder + ("HHIIIIIHHHHHH", "HHIQQQIHHHHHH")[elfClass]
             sectionStruct = byteOrder + ("4xI8xIII8xI", "4xI16xQQI12xQ")[elfClass]
             sectionStruct = byteOrder + ("4xI8xIII8xI", "4xI16xQQI12xQ")[elfClass]
             dynamicStruct = byteOrder + ("iI", "qQ")[elfClass]
             dynamicStruct = byteOrder + ("iI", "qQ")[elfClass]
@@ -2354,6 +2357,7 @@ class Packager:
             GlobPattern('libnvidia*.so*'),
             GlobPattern('libnvidia*.so*'),
             GlobPattern('libpthread.so*'),
             GlobPattern('libpthread.so*'),
             GlobPattern('libthr.so*'),
             GlobPattern('libthr.so*'),
+            GlobPattern('ld-linux.so*'),
             ]
             ]
 
 
         # A Loader for loading models.
         # A Loader for loading models.