def init(self):
        self._log.heading("Initializing remote server release source")
        self._log.debug("Initializing remote server release source with URL '{0}'", self._manifestUrl)

        response = urllib.request.urlopen(self._manifestUrl)
        manifestData = response.read().decode('utf-8')

        self._log.debug("Got manifest with data: \n{0}".format(manifestData))

        self._manifest = YamlSerializer.deserialize(manifestData)

        for info in self._manifest.releases:
            info.url = urllib.parse.urljoin(self._manifestUrl, info.localPath)
            info.localPath = None
            self._releaseInfos.append(info)
Beispiel #2
0
    def getAllPackageInfos(self):
        if not self._packageInfos:
            self._packageInfos = []

            for name in self.getAllPackageNames():
                path = self._varMgr.expandPath('[UnityPackagesDir]/{0}'.format(name))

                installInfoFilePath = os.path.join(path, InstallInfoFileName)

                info = PackageInfo()
                info.name = name
                info.path = path

                if self._sys.fileExists(installInfoFilePath):
                    installInfo = YamlSerializer.deserialize(self._sys.readFileAsText(installInfoFilePath))
                    info.installInfo = installInfo

                self._packageInfos.append(info)

        return self._packageInfos