Panda3D
Classes | Public Member Functions | Public Attributes | List of all members
PatchMaker Class Reference

Classes

class  Package
 
class  PackageVersion
 
class  Patchfile
 

Public Member Functions

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

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

◆ __init__()

def __init__ (   self,
  installDir 
)

Member Function Documentation

◆ buildPatch()

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.

◆ buildPatchChains()

def buildPatchChains (   self)
Builds up the chains of PackageVersions and the patchfiles
that connect them. 

◆ buildPatches()

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. 

◆ buildPatchFile()

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. 

◆ cleanup()

def cleanup (   self)
Should be called on exit to remove temporary files and
such created during processing. 

◆ getPackageVersion()

def getPackageVersion (   self,
  key 
)
Returns a shared PackageVersion object for the indicated
key. 

◆ getPatchChainToCurrent()

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. 

◆ processAllPackages()

def processAllPackages (   self)
Walks through the list of packages, and builds missing
patches for each one. 

◆ processPackage()

def processPackage (   self,
  package 
)
Builds missing patches for the indicated package. 

◆ processSomePackages()

def processSomePackages (   self,
  packageNames 
)
Builds missing patches only for the named packages. 

◆ readContentsFile()

def readContentsFile (   self)
Reads the contents.xml file at the beginning of
processing. 

◆ readPackageDescFile()

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. 

◆ recordPatchfile()

def recordPatchfile (   self,
  patchfile 
)
Adds the indicated patchfile to the patch chains. 

◆ writeContentsFile()

def writeContentsFile (   self)
Writes the contents.xml file at the end of processing. 

Member Data Documentation

◆ contentsDoc

contentsDoc

◆ installDir

installDir

◆ packages

packages

◆ packageVersions

packageVersions

◆ patchFilenames

patchFilenames