def __init__(self): self.currentShortCommit = "UNKNOWN" self.currentLongCommit = "UNKNOWN" self.currentBranch = "UNKNOWN" self.title = "MakeHuman Community" self.version = makehuman.getVersionDigitsStr() self.isRelease = makehuman.isRelease() self.fullTitle = None self._checkForGitInfo() self._checkForVersionFile() if self.fullTitle is None: if self.isRelease: self.fullTitle = self.title + " " + self.version else: self.fullTitle = self.title + " (" + self.currentBranch + ":" + self.currentShortCommit + ")"
def onClicked(event): import makehuman from core import G self.rev = None self.revid = None self.branch = None self.version = 'v' + makehuman.getVersionDigitsStr() try: hg = makehuman.get_revision_hg_info() if hg: self.rev = 'r' + hg[0] self.revid = '(' + hg[1] + ')' self.branch = hg[2] except: pass if self.rev and self.revid and self.branch: version_string = ' '.join([self.version, self.branch, self.rev, self.revid]) else: version_string = self.version G.app.clipboard().setText(version_string)
def getVersionNumberAsString(self): """Returns the string representation of the version number, for example '1.0.2'.""" self.trace() return makehuman.getVersionDigitsStr()