コード例 #1
0
ファイル: updates.py プロジェクト: smazoyer/PyUpdater
    def _win_overwrite_restart(self):  # pragma: no cover
        # Windows: Moves update to current directory of running
        #          application then restarts application using
        #          new update.
        exe_name = self.name + '.exe'
        current_app = os.path.join(self.current_app_dir, exe_name)
        updated_app = os.path.join(self.update_folder, exe_name)

        update_info = dict(data_dir=self.data_dir, updated_app=updated_app)
        r = Restarter(current_app, **update_info)
        r.process()
コード例 #2
0
ファイル: updates.py プロジェクト: dlernstrom/PyUpdater
    def _win_overwrite_app_restart(self):  # pragma: no cover
        # Windows: Moves update to current directory of running
        #          application then restarts application using
        #          new update.
        exe_name = self.name + '.exe'
        current_app = os.path.join(self.current_app_dir, exe_name)
        updated_app = os.path.join(self.update_folder, exe_name)

        update_info = dict(data_dir=self.data_dir, updated_app=updated_app)
        r = Restarter(current_app, **update_info)
        r.restart()
コード例 #3
0
ファイル: updates.py プロジェクト: smazoyer/PyUpdater
    def _restart(self):  # pragma: no cover
        log.debug('Restarting')
        current_app = os.path.join(self.current_app_dir, self.name)
        if dsdev_utils.system.get_system() == 'mac':
            # Must be dealing with Mac .app application
            if not os.path.exists(current_app):
                log.debug('Must be a .app bundle')
                current_app += '.app'
                mac_app_binary_dir = os.path.join(current_app, 'Contents',
                                                  'MacOS')
                _file = os.listdir(mac_app_binary_dir)

                # We are making an assumption here that only 1
                # executable will be in the MacOS folder.
                current_app = os.path.join(mac_app_binary_dir, _file[0])

        r = Restarter(current_app)
        r.process()
コード例 #4
0
ファイル: updates.py プロジェクト: dlernstrom/PyUpdater
    def _restart(self):  # pragma: no cover
        # Oh yes i did just pull that new binary into
        # the currently running process and kept it pushing
        # like nobody's business. Windows what???
        log.info('Restarting')
        current_app = os.path.join(self.current_app_dir, self.name)
        if jms_utils.system.get_system() == 'mac':
            # Must be dealing with Mac .app application
            if not os.path.exists(current_app):
                log.debug('Must be a .app bundle')
                current_app += '.app'
                mac_app_binary_dir = os.path.join(current_app, 'Contents',
                                                  'MacOS')
                file_ = os.listdir(mac_app_binary_dir)
                # We are making an assumption here that only 1
                # executable will be in the MacOS folder.
                current_app = os.path.join(mac_app_binary_dir, file_[0])

        r = Restarter(current_app)
        r.restart()
コード例 #5
0
ファイル: updates.py プロジェクト: awesome-python/PyUpdater
    def _restart(self):  # pragma: no cover
        # Oh yes i did just pull that new binary into
        # the currently running process and kept it pushing
        # like nobody's business. Windows what???
        log.debug('Restarting')
        current_app = os.path.join(self.current_app_dir, self.name)
        if dsdev_utils.system.get_system() == 'mac':
            # Must be dealing with Mac .app application
            if not os.path.exists(current_app):
                log.debug('Must be a .app bundle')
                current_app += '.app'
                mac_app_binary_dir = os.path.join(current_app, 'Contents',
                                                  'MacOS')
                file_ = os.listdir(mac_app_binary_dir)
                # We are making an assumption here that only 1
                # executable will be in the MacOS folder.
                current_app = os.path.join(mac_app_binary_dir, file_[0])

        r = Restarter(current_app)
        r.restart()