Panda3D

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

## Classes
class | Package
class | PackageVersion
class | Patchfile

## Public Member Functions
| __init__ (self, installDir)
| buildPatch (self, v1, v2, package, patchFilename)
| buildPatchChains (self)
| buildPatches (self, packageNames=None)
| buildPatchFile (self, origFilename, newFilename, patchFilename, printOrigName, printNewName)
| cleanup (self)
| getPackageVersion (self, key)
| getPatchChainToCurrent (self, descFilename, fileSpec)
| processAllPackages (self)
| processPackage (self, package)
| processSomePackages (self, packageNames)
| readContentsFile (self)
| readPackageDescFile (self, descFilename)
| recordPatchfile (self, patchfile)
| writeContentsFile (self)

## Public Attributes
| contentsDoc = doc
| installDir = installDir
list | packages = []
dict | packageVersions = {}
dict | patchFilenames = {}

## Detailed Description

     This class will operate on an existing package install
    directory, as generated by the Packager, and create patchfiles
    between versions as needed.  It is also used at runtime, to apply
    the downloaded patches.

## Constructor & Destructor Documentation

## ◆ __init__()

__init__ | ( |  | self,
|  |  | installDir )

## Member Function Documentation

## ◆ buildPatch()

buildPatch | ( |  | self,
|  |  | v1,
|  |  | v2,
|  |  | package,
|  |  | patchFilename )

     Builds a patch from PackageVersion v1 to PackageVersion
    v2, and stores it in patchFilename.pz.  Returns true on
    success, false on failure.

## ◆ buildPatchChains()

buildPatchChains | ( |  | self | ) |

     Builds up the chains of PackageVersions and the patchfiles
    that connect them.

## ◆ buildPatches()

buildPatches | ( |  | self,
|  |  | packageNames = None )

     Makes the patches required in a particular directory
    structure on disk.  If packageNames is None, this makes
    patches for all packages; otherwise, it should be a list of
    package name strings, limiting the set of packages that are
    processed.

## ◆ buildPatchFile()

buildPatchFile | ( |  | self,
|  |  | origFilename,
|  |  | newFilename,
|  |  | patchFilename,
|  |  | printOrigName,
|  |  | printNewName )

     Creates a patch file from origFilename to newFilename,
    storing the result in patchFilename.  Returns true on success,
    false on failure.

## ◆ cleanup()

cleanup | ( |  | self | ) |

     Should be called on exit to remove temporary files and
    such created during processing.

## ◆ getPackageVersion()

getPackageVersion | ( |  | self,
|  |  | key )

     Returns a shared PackageVersion object for the indicated
    key.

## ◆ getPatchChainToCurrent()

getPatchChainToCurrent | ( |  | self,
|  |  | descFilename,
|  |  | fileSpec )

     Reads the package defined in the indicated desc file, and
    constructs a patch chain from the version represented by
    fileSpec to the current version of this package, if possible.
    Returns the patch chain if successful, or None otherwise.

## ◆ processAllPackages()

processAllPackages | ( |  | self | ) |

     Walks through the list of packages, and builds missing
    patches for each one.

## ◆ processPackage()

processPackage | ( |  | self,
|  |  | package )

     Builds missing patches for the indicated package.

## ◆ processSomePackages()

processSomePackages | ( |  | self,
|  |  | packageNames )

     Builds missing patches only for the named packages.

## ◆ readContentsFile()

readContentsFile | ( |  | self | ) |

     Reads the contents.xml file at the beginning of
    processing.

## ◆ readPackageDescFile()

readPackageDescFile | ( |  | self,
|  |  | descFilename )

     Reads a desc file associated with a particular package,
    and adds the package to self.packages.  Returns the Package
    object, or None on failure.

## ◆ recordPatchfile()

recordPatchfile | ( |  | self,
|  |  | patchfile )

     Adds the indicated patchfile to the patch chains.

## ◆ writeContentsFile()

writeContentsFile | ( |  | self | ) |

     Writes the contents.xml file at the end of processing.

## Member Data Documentation

## ◆ contentsDoc

contentsDoc = doc

## ◆ installDir

installDir = installDir

## ◆ packages

list packages = []

## ◆ packageVersions

dict packageVersions = {}

## ◆ patchFilenames

dict patchFilenames = {}