Răsfoiți Sursa

a few small fixes

David Rose 16 ani în urmă
părinte
comite
fe65b1ce40

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

@@ -323,6 +323,12 @@ class Packager:
             # only three settings: None (unset), True, or False.
             self.platformSpecificConfig = self.configs.get('platform_specific', None)
             if self.platformSpecificConfig is not None:
+                # First, convert it to an int, in case it's "0" or "1".
+                try:
+                    self.platformSpecificConfig = int(self.platformSpecificConfig)
+                except ValueError:
+                    pass
+                # Then, make it a bool.
                 self.platformSpecificConfig = bool(self.platformSpecificConfig)
                 del self.configs['platform_specific']
 
@@ -2655,7 +2661,8 @@ class Packager:
                 prefix += '/'
             for subfile in dirList:
                 filename = subfile.getFilename()
-                self.__recurseDir(filename, prefix + filename.getBasename())
+                self.__recurseDir(filename, prefix + filename.getBasename(),
+                                  unprocessed = unprocessed)
             return
 
         # It's a file name.  Add it.

+ 2 - 1
direct/src/p3d/panda3d.pdef

@@ -51,7 +51,8 @@ class panda3d(package):
            'direct.particles.*',
            'direct.showbase.*',
            'direct.showutil.*',
-           'direct.stdpy.*')
+           'direct.stdpy.*',
+           'direct.task.*')
 
     # Exclude these Panda3D libs; they are big and many applications don't
     # use them.  We define them as separate, optional packages, below,

+ 5 - 4
direct/src/showbase/VFSImporter.py

@@ -1,4 +1,4 @@
-from libpandaexpress import Filename, VirtualFileSystem, VirtualFileMountSystem
+from libpandaexpress import Filename, VirtualFileSystem, VirtualFileMountSystem, OFileStream, copyStream
 import sys
 import new
 import os
@@ -203,8 +203,9 @@ class VFSLoader:
             # It's a real file.
             filename = self.filename
         elif self.filename.exists():
-            # It's a virtual file, but it's shadowing a real file.
-            # Assume they're the same, and load the real one.
+            # It's a virtual file, but it's shadowing a real file in
+            # the same directory.  Assume they're the same, and load
+            # the real one.
             filename = self.filename
         else:
             # It's a virtual file with no real-world existence.  Dump
@@ -214,7 +215,7 @@ class VFSLoader:
                                           type = Filename.TDso)
             filename.setExtension(self.filename.getExtension())
             filename.setBinary()
-            sin = vfile.openReadFile()
+            sin = vfile.openReadFile(True)
             sout = OFileStream()
             if not filename.openWrite(sout):
                 raise IOError