def run(self): if AddOnDB().hasKey(self.addOnName): if checkUpdate(self.addOnName)[0]: print "ok" self.downloader = CurseDownloader(AddOnDB().value(self.addOnName)[1]) self.downloader.loadFinished.connect(self.download) self.downloader.load()
def run(self): latestVersions = [] for addonName in self.addons: update, version = checkUpdate(addonName) latestVersions.append(version) self.versionChecked.emit() self.checkComplete.emit(latestVersions) self.exec_()
def checkAndInstallUpdate(firstInstall: bool = False) -> None: """ this function checks if BEE has an update, if so, ask the user if he wants to update it """ # load current bee version beeVersion: str = config.load('beeVersion') logger.info(f'installed BEE version: {beeVersion}') if firstInstall is False: # bee isn't installed, can't update if beeVersion is None: return # check updates data = utilities.checkUpdate( beeRepoUrl, VersionInfo.parse(beeVersion if not firstInstall else '0.0.0')) logger.info(f'latest BEE version: {data.version}') if data.version is None: # no update available, can't update logger.info('no update available') return if not firstInstall: # show bee update available dialog dialog = wx.RichMessageDialog( parent=wx.GetTopLevelWindows()[0], message= f'BEE2.4 {data.version} is available for download, update now?\n{data.description}', caption='BEE update available!', style=wx.YES_NO | wx.YES_DEFAULT | wx.STAY_ON_TOP | wx.ICON_INFORMATION) choice = dialog.ShowModal() # if user says no, don't update if choice == wx.ID_NO: logger.debug('user cancelled install') return # user said yes logger.debug(f'updating from BEE {beeVersion} to BEE {data.version}!') config.dynConfig['beeUpdateUrl'] = data.url installBee()
async def appDateCheck(): """ Checks app updates """ if not utilities.isonline(): # if we're not online return false return False data = utilities.checkUpdate( 'https://github.com/ENDERZOMBI102/BEE-manipulator', config.version ) if data.url is None: if getattr(root, 'instance', False): wx.MessageBox( parent=root.instance, message='No updates found!', caption='BEE Manipulator' ) return data = wx.GenericMessageDialog( parent=getattr(root, 'instance', None), message=f'An update for the app is available, do you want to update now?\n\n{data.description}', caption=f'Update Available - new version: {data.version}', style=wx.YES_NO | wx.ICON_WARNING | wx.STAY_ON_TOP | wx.NO_DEFAULT ) if data.ShowModal() == wx.ID_NO: return # user don't want to update utilities.update()