Esempio n. 1
0
    def openFile(self):
#executing file
        add_link_dictionary = self.download_info_file_list[9]
        file_path = add_link_dictionary['file_path']

        if os.path.isfile(file_path):
            osCommands.xdgOpen(file_path)

        self.close()
Esempio n. 2
0
    def openFolder(self):
#open download folder
        add_link_dictionary = self.download_info_file_list[9]
        file_path = add_link_dictionary ['file_path']

        file_name = os.path.basename(file_path)

        file_path_split = file_path.split(file_name)

        del file_path_split[-1]

        download_path = file_name.join(file_path_split)

        if os.path.isdir(download_path):
            osCommands.xdgOpen(download_path)
        self.close()
Esempio n. 3
0
    def updateCheck(self, button):
        self.check_button.setText('Checking...')

        try:
            # get information dictionary from github
            updatesource = requests.get(
                'https://persepolisdm.github.io/version')

            updatesource_text = updatesource.text
            updatesource_dict = ast.literal_eval(updatesource_text)

            # get latest stable version
            server_version = updatesource_dict['version']

            # Comparison
            if float(server_version) > float(self.client_version):
                self.status_label.setText(
                    'A newer Persepolis release is available')

                if os_type == 'Windows':
                    self.winUpdatedl()  # this function download latest release
                    # find system architect
                    if platform.architecture()[0] == '64bit':
                        osCommands.xdgOpen(dictvalue['win64dlurl'])
                    elif platform.architecture()[0] == '32bit':
                        osCommands.xdgOpen(dictvalue['win32dlurl'])

                elif os_type == 'Darwin':
                    osCommands.xdgOpen(
                        dictvalue['macdlurl']
                    )  # it will download latest release for mac

            elif float(server_version) == float(self.client_version):
                self.status_label.setText('Latest version is installed :)')

            elif float(server_version) < float(self.client_version):
                self.status_label.setText('You are using beta version')

        except Exception as e:
            self.status_label.setText(
                'an error occured while checking update.')

        self.check_button.setText('Check for new update')
Esempio n. 4
0
 def reportPushButtonPressed(self, button):
     osCommands.xdgOpen('https://github.com/persepolisdm/persepolis/issues')