Panda3D
Public Member Functions | Public Attributes | List of all members
Packager.Package Class Reference

Public Member Functions

def __init__ (self, packageName, packager)
 
def addBamFile (self, file)
 
def addComponent (self, file)
 
def addDcFile (self, file)
 
def addDcImports (self, file)
 
def addEggFile (self, file)
 
def addExtensionModules (self)
 
def addFile (self, *args, **kw)
 
def addFoundTexture (self, filename)
 
def addNode (self, node, filename, newName)
 
def addPrcFile (self, file)
 
def addPyFile (self, file)
 
def cleanup (self)
 
def close (self)
 
def compressMultifile (self)
 
def considerPlatform (self)
 
def excludeFile (self, filename)
 
def getFileSpec (self, element, pathname, newName)
 
def installMultifile (self)
 
def installSolo (self)
 
def makeP3dInfo (self)
 
def readDescFile (self)
 
def readImportDescFile (self, filename)
 
def requirePackage (self, package)
 
def writeDescFile (self)
 
def writeImportDescFile (self)
 

Public Attributes

 arch
 
 components
 
 compressionLevel
 
 configs
 
 excludedFilenames
 
 extracts
 
 files
 
 freezer
 
 host
 
 ignoredDirFiles
 
 importedMapsDir
 
 mainModule
 
 missingPackages
 
 moduleNames
 
 multifile
 
 notify
 
 oldCompressedBasename
 
 p3dApplication
 
 packageBasename
 
 packageDesc
 
 packageDir
 
 packageFilename
 
 packageFullpath
 
 packageImportDesc
 
 packageName
 
 packager
 
 packageSeq
 
 packageSetVer
 
 patches
 
 patchVersion
 
 perPlatform
 
 platform
 
 platformSpecificConfig
 
 requiredFilenames
 
 requiredModules
 
 requires
 
 signParams
 
 skipFilenames
 
 skipModules
 
 solo
 
 sourceFilenames
 
 targetFilenames
 
 version
 

Detailed Description

This is the full information on a particular package we
are constructing.  Don't confuse it with PackageEntry, above,
which contains only the information found in the toplevel
contents.xml file.

Constructor & Destructor Documentation

◆ __init__()

def __init__ (   self,
  packageName,
  packager 
)

Member Function Documentation

◆ addBamFile()

def addBamFile (   self,
  file 
)

◆ addComponent()

def addComponent (   self,
  file 
)

◆ addDcFile()

def addDcFile (   self,
  file 
)
Adds a dc file to the archive.  A dc file gets its
internal comments and parameter names stripped out of the
final result automatically.  This is as close as we can
come to "compiling" a dc file, since all of the remaining
symbols are meaningful at runtime. 

◆ addDcImports()

def addDcImports (   self,
  file 
)
Adds the Python modules named by the indicated dc
file. 

◆ addEggFile()

def addEggFile (   self,
  file 
)

◆ addExtensionModules()

def addExtensionModules (   self)
Adds the extension modules detected by the freezer to
the current list of files. 

◆ addFile()

def addFile (   self,
args,
**  kw 
)
Adds the named file to the package.  Returns the file
object, or None if it was not added by this call. 

◆ addFoundTexture()

def addFoundTexture (   self,
  filename 
)
Adds the newly-discovered texture to the output, if it has
not already been included.  Returns the new name within the
package tree. 

◆ addNode()

def addNode (   self,
  node,
  filename,
  newName 
)
Converts the indicated node to a bam stream, and adds the
bam file to the multifile under the indicated newName. 

◆ addPrcFile()

def addPrcFile (   self,
  file 
)
Adds a prc file to the archive.  Like the dc file,
this strips comments and such before adding.  It's also
possible to set prcEncryptionKey and/or prcSignCommand to
further manipulate prc files during processing. 

◆ addPyFile()

def addPyFile (   self,
  file 
)
Adds the indicated python file, identified by filename
instead of by module name, to the package. 

◆ cleanup()

def cleanup (   self)

◆ close()

def close (   self)
Writes out the contents of the current package.  Returns True
if the package was constructed successfully, False if one or more
required files or modules are missing. 

◆ compressMultifile()

def compressMultifile (   self)
Compresses the .mf file into an .mf.pz file. 

◆ considerPlatform()

def considerPlatform (   self)

◆ excludeFile()

def excludeFile (   self,
  filename 
)
Excludes the named file (or glob pattern) from the
package. 

◆ getFileSpec()

def getFileSpec (   self,
  element,
  pathname,
  newName 
)
Returns an xcomponent or similar element with the file
information for the indicated file. 

◆ installMultifile()

def installMultifile (   self)
Installs the package, either as a p3d application, or
as a true package.  Either is implemented with a
Multifile. 

◆ installSolo()

def installSolo (   self)
Installs the package as a "solo", which means we
simply copy the one file into the install directory.  This
is primarily intended for the "coreapi" plugin, which is
just a single dll and a jpg file; but it can support other
kinds of similar "solo" packages as well. 

◆ makeP3dInfo()

def makeP3dInfo (   self)
Makes the p3d_info.xml file that defines the
application startup parameters and such. 

◆ readDescFile()

def readDescFile (   self)
Reads the existing package.xml file before rewriting
it.  We need this to preserve the list of patches, and
similar historic data, between sessions. 

◆ readImportDescFile()

def readImportDescFile (   self,
  filename 
)
Reads the import desc file.  Returns True on success,
False on failure. 

◆ requirePackage()

def requirePackage (   self,
  package 
)
Indicates a dependency on the given package.  This
also implicitly requires all of the package's requirements
as well (though this transitive requirement happens at
runtime, not here at build time). 

◆ writeDescFile()

def writeDescFile (   self)
Makes the package.xml file that describes the package
and its contents, for download. 

◆ writeImportDescFile()

def writeImportDescFile (   self)
Makes the package.import.xml file that describes the
package and its contents, for other packages and
applications that may wish to "require" this one. 

Member Data Documentation

◆ arch

arch

◆ components

components

◆ compressionLevel

compressionLevel

◆ configs

configs

◆ excludedFilenames

excludedFilenames

◆ extracts

extracts

◆ files

files

◆ freezer

freezer

◆ host

host

◆ ignoredDirFiles

ignoredDirFiles

◆ importedMapsDir

importedMapsDir

◆ mainModule

mainModule

◆ missingPackages

missingPackages

◆ moduleNames

moduleNames

◆ multifile

multifile

◆ notify

notify

◆ oldCompressedBasename

oldCompressedBasename

◆ p3dApplication

p3dApplication

◆ packageBasename

packageBasename

◆ packageDesc

packageDesc

◆ packageDir

packageDir

◆ packageFilename

packageFilename

◆ packageFullpath

packageFullpath

◆ packageImportDesc

packageImportDesc

◆ packageName

packageName

◆ packager

packager

◆ packageSeq

packageSeq

◆ packageSetVer

packageSetVer

◆ patches

patches

◆ patchVersion

patchVersion

◆ perPlatform

perPlatform

◆ platform

platform

◆ platformSpecificConfig

platformSpecificConfig

◆ requiredFilenames

requiredFilenames

◆ requiredModules

requiredModules

◆ requires

requires

◆ signParams

signParams

◆ skipFilenames

skipFilenames

◆ skipModules

skipModules

◆ solo

solo

◆ sourceFilenames

sourceFilenames

◆ targetFilenames

targetFilenames

◆ version

version