Panda3D

Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
Packager.Package Class Reference

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

## Public Attributes
| arch = self.packager.arch
list | components = []
int | compressionLevel = 0
dict | configs = {}
list | excludedFilenames = []
list | extracts = []
list | files = []
| freezer = FreezeTool.Freezer(platform = self.packager.platform)
| host = None
dict | ignoredDirFiles = {}
str | importedMapsDir = 'imported_maps'
| mainModule = None
list | missingPackages = []
dict | moduleNames = {}
| multifile = Multifile()
| notify = packager.notify
| oldCompressedBasename
bool | p3dApplication = False
str | packageBasename = self.packageName
str | packageDesc = self.packageBasename + '.xml'
| packageDir = packageDir
str | packageFilename = packageDir + self.packageBasename
| packageFullpath = Filename(self.packager.p3dInstallDir, self.packageFilename)
str | packageImportDesc = self.packageBasename + '.import.xml'
str | packageName = packageName
| packager = packager
| packageSeq = SeqValue()
| packageSetVer = SeqValue()
list | patches = []
| patchVersion = None
bool | perPlatform = True
| platform = None
dict | platformSpecificConfig = self.configs.get('platform_specific', None)
list | requiredFilenames = []
list | requiredModules = []
list | requires = []
list | signParams = []
dict | skipFilenames = {}
dict | skipModules = {}
bool | solo = False
dict | sourceFilenames = {}
dict | targetFilenames = {}
| version = None

## 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__()

__init__ | ( |  | self,
|  |  | packageName,
|  |  | packager )

## Member Function Documentation

## ◆ addBamFile()

addBamFile | ( |  | self,
|  |  | file )

## ◆ addComponent()

addComponent | ( |  | self,
|  |  | file )

## ◆ addDcFile()

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()

addDcImports | ( |  | self,
|  |  | file )

     Adds the Python modules named by the indicated dc
    file.

## ◆ addEggFile()

addEggFile | ( |  | self,
|  |  | file )

## ◆ addExtensionModules()

addExtensionModules | ( |  | self | ) |

     Adds the extension modules detected by the freezer to
    the current list of files.

## ◆ addFile()

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()

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()

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()

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()

addPyFile | ( |  | self,
|  |  | file )

     Adds the indicated python file, identified by filename
    instead of by module name, to the package.

## ◆ cleanup()

cleanup | ( |  | self | ) |

## ◆ close()

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()

compressMultifile | ( |  | self | ) |

     Compresses the .mf file into an .mf.pz file.

## ◆ considerPlatform()

considerPlatform | ( |  | self | ) |

## ◆ excludeFile()

excludeFile | ( |  | self,
|  |  | filename )

     Excludes the named file (or glob pattern) from the
    package.

## ◆ getFileSpec()

getFileSpec | ( |  | self,
|  |  | element,
|  |  | pathname,
|  |  | newName )

     Returns an xcomponent or similar element with the file
    information for the indicated file.

## ◆ installMultifile()

installMultifile | ( |  | self | ) |

     Installs the package, either as a p3d application, or
    as a true package.  Either is implemented with a
    Multifile.

## ◆ installSolo()

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()

makeP3dInfo | ( |  | self | ) |

     Makes the p3d_info.xml file that defines the
    application startup parameters and such.

## ◆ readDescFile()

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()

readImportDescFile | ( |  | self,
|  |  | filename )

     Reads the import desc file.  Returns True on success,
    False on failure.

## ◆ requirePackage()

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()

writeDescFile | ( |  | self | ) |

     Makes the package.xml file that describes the package
    and its contents, for download.

## ◆ writeImportDescFile()

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 = self.packager.arch

## ◆ components

list components = []

## ◆ compressionLevel

compressionLevel = 0

## ◆ configs

dict configs = {}

## ◆ excludedFilenames

list excludedFilenames = []

## ◆ extracts

list extracts = []

## ◆ files

list files = []

## ◆ freezer

freezer = FreezeTool.Freezer(platform = self.packager.platform)

## ◆ host

host = None

## ◆ ignoredDirFiles

dict ignoredDirFiles = {}

## ◆ importedMapsDir

str importedMapsDir = 'imported_maps'

## ◆ mainModule

mainModule = None

## ◆ missingPackages

list missingPackages = []

## ◆ moduleNames

dict moduleNames = {}

## ◆ multifile

multifile = Multifile()

## ◆ notify

notify = packager.notify

## ◆ oldCompressedBasename

oldCompressedBasename

## ◆ p3dApplication

bool p3dApplication = False

## ◆ packageBasename

str packageBasename = self.packageName

## ◆ packageDesc

packageDesc = self.packageBasename + '.xml'

## ◆ packageDir

packageDir = packageDir

## ◆ packageFilename

packageFilename = packageDir + self.packageBasename

## ◆ packageFullpath

packageFullpath = Filename(self.packager.p3dInstallDir, self.packageFilename)

## ◆ packageImportDesc

packageImportDesc = self.packageBasename + '.import.xml'

## ◆ packageName

packageName = packageName

## ◆ packager

packager = packager

## ◆ packageSeq

packageSeq = SeqValue()

## ◆ packageSetVer

packageSetVer = SeqValue()

## ◆ patches

list patches = []

## ◆ patchVersion

patchVersion = None

## ◆ perPlatform

perPlatform = True

## ◆ platform

platform = None

## ◆ platformSpecificConfig

dict platformSpecificConfig = self.configs.get('platform_specific', None)

## ◆ requiredFilenames

list requiredFilenames = []

## ◆ requiredModules

list requiredModules = []

## ◆ requires

list requires = []

## ◆ signParams

list signParams = []

## ◆ skipFilenames

dict skipFilenames = {}

## ◆ skipModules

dict skipModules = {}

## ◆ solo

bool solo = False

## ◆ sourceFilenames

dict sourceFilenames = {}

## ◆ targetFilenames

dict targetFilenames = {}

## ◆ version

version = None