Panda3D

- Main Page
- Packages
- Classes

- Class List
- Class Index
- Class Hierarchy
- Class Members

Classes | Public Member Functions | Public Attributes

# PatchMaker Class Reference

List of all members.

## Classes
class | Package
class | PackageVersion
class | Patchfile
## Public Member Functions
def | __init__
def | buildPatch
def | buildPatchChains
def | buildPatches
def | buildPatchFile
def | cleanup
def | getPackageVersion
def | getPatchChainToCurrent
def | processAllPackages
def | processPackage
def | processSomePackages
def | readContentsFile
def | readPackageDescFile
def | recordPatchfile
def | writeContentsFile
## Public Attributes
| contentsDoc
| installDir
| packages
| packageVersions
| 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

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

## Member Function Documentation

def 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.

def buildPatchChains | ( |  | self | ) |

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

def 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.

def 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.

def cleanup | ( |  | self | ) |

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

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

    Returns a shared PackageVersion object for the indicated
    key.

def 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.

def processAllPackages | ( |  | self | ) |

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

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

    Builds missing patches for the indicated package.

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

    Builds missing patches only for the named packages.

def readContentsFile | ( |  | self | ) |

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

def 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.

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

    Adds the indicated patchfile to the patch chains.

def writeContentsFile | ( |  | self | ) |

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

## Member Data Documentation

contentsDoc

installDir

packages

packageVersions

patchFilenames

All Classes Namespaces Functions Variables Enumerations Enumerator Properties