fix bug with conflicting prc filenames

This commit is contained in:
David Rose 2009-11-26 20:00:57 +00:00
parent f872dfbfce
commit 590f95ed11

View File

@ -414,7 +414,7 @@ class Packager:
""" Installs the package, either as a p3d application, or """ Installs the package, either as a p3d application, or
as a true package. Either is implemented with a as a true package. Either is implemented with a
Multifile. """ Multifile. """
self.multifile = Multifile() self.multifile = Multifile()
# Write the multifile to a temporary filename until we # Write the multifile to a temporary filename until we
@ -1641,7 +1641,9 @@ class Packager:
if package not in self.requires: if package not in self.requires:
self.requires.append(package) self.requires.append(package)
for filename in package.targetFilenames.keys(): for filename in package.targetFilenames.keys():
self.skipFilenames[filename] = True ext = Filename(filename).getExtension()
if ext not in self.packager.nonuniqueExtensions:
self.skipFilenames[filename] = True
for moduleName, mdef in package.moduleNames.items(): for moduleName, mdef in package.moduleNames.items():
self.skipModules[moduleName] = mdef self.skipModules[moduleName] = mdef
@ -1740,6 +1742,10 @@ class Packager:
# processing. # processing.
self.binaryExtensions = [ 'ttf', 'mid' ] self.binaryExtensions = [ 'ttf', 'mid' ]
# Files that can have an existence in multiple different
# packages simultaneously without conflict.
self.nonuniqueExtensions = [ 'prc' ]
# Files that represent an executable or shared library. # Files that represent an executable or shared library.
if self.platform.startswith('win'): if self.platform.startswith('win'):
self.executableExtensions = [ 'dll', 'pyd', 'exe' ] self.executableExtensions = [ 'dll', 'pyd', 'exe' ]
@ -2124,7 +2130,7 @@ class Packager:
def endPackage(self): def endPackage(self):
""" Closes the current package specification. This actually """ Closes the current package specification. This actually
generates the package file. Returns the finished package.""" generates the package file. Returns the finished package."""
if not self.currentPackage: if not self.currentPackage:
raise PackagerError, 'unmatched endPackage' raise PackagerError, 'unmatched endPackage'