Panda3D
|
This class represents a downloadable Panda3D package file that can be (or has been) installed into the current runtime. It is the Python equivalent of the P3DPackage class in the core API.
def __init__ | ( | self, | |
host, | |||
packageName, | |||
packageVersion, | |||
platform = None , |
|||
solo = False , |
|||
asMirror = False |
|||
) |
def checkStatus | ( | self | ) |
Checks the current status of the desc file and the package contents on disk.
def downloadDescFile | ( | self, | |
http | |||
) |
Downloads the desc file for this particular package, synchronously, and then reads it. Returns true on success, false on failure.
def downloadDescFileGenerator | ( | self, | |
http | |||
) |
A generator function that implements downloadDescFile() one piece at a time. It yields one of stepComplete, stepFailed, or stepContinue.
def downloadPackage | ( | self, | |
http | |||
) |
Downloads the package file, synchronously, then uncompresses and unpacks it. Returns true on success, false on failure. This assumes that self.installPlans has already been filled in, which will have been done by self.__readDescFile().
def downloadPackageGenerator | ( | self, | |
http | |||
) |
A generator function that implements downloadPackage() one piece at a time. It yields one of stepComplete, stepFailed, or stepContinue.
def getDownloadEffort | ( | self | ) |
Returns the relative amount of effort it will take to download this package. The units are meaningless, except relative to other packges.
def getFormattedName | ( | self | ) |
Returns the name of this package, for output to the user. This will be the "public" name of the package, as formatted for user consumption; it will include capital letters and spaces where appropriate.
def getPackageDir | ( | self | ) |
Returns the directory in which this package is installed. This may not be known until the host's contents.xml file has been downloaded, which informs us of the host's own install directory.
def getPrevDownloadedEffort | ( | self | ) |
Returns a rough estimate of this package's total download effort, even if it is already downloaded.
def getUsage | ( | self | ) |
Returns the xusage element that is read from the usage.xml file, or None if there is no usage.xml file.
def hasCurrentDescFile | ( | self | ) |
Returns true if a desc file file has been successfully read for this package and is still current, false otherwise.
def installPackage | ( | self, | |
appRunner | |||
) |
Mounts the package and sets up system paths so it becomes available for use. Returns true on success, false on failure.
def markUsed | ( | self | ) |
Marks the package as having been used. This is normally called automatically by installPackage().
def setupFilenames | ( | self | ) |
This is called by the HostInfo when the package is read from contents.xml, to set up the internal filenames and such that rely on some of the information from contents.xml.
int downloadFactor = 1 [static] |
tuple notify = directNotify.newCategory("PackageInfo") [static] |
float patchFactor = 0.01 [static] |
int restartDownload = 3 [static] |
int stepComplete = 1 [static] |
int stepContinue = 4 [static] |
int stepFailed = 2 [static] |
float uncompressFactor = 0.01 [static] |
float unpackFactor = 0.01 [static] |
string UsageBasename = 'usage.xml' [static] |