コード例 #1
0
    def install(self):
        success = super(pcsxr, self).install()
        if not success:
            return False
        config_path = os.path.expanduser('~/.pcsxr')
        if not os.path.exists(config_path):
            os.makedirs(config_path)

        # Bios
        bios_path = os.path.expanduser('~/.pcsxr/bios')
        if not os.path.exists(bios_path):
            os.makedirs(bios_path)
        dlg = QuestionDialog({
            'question': ("Do you want to select a Playstation BIOS file?\n\n"
                         "The BIOS is the core code running the machine.\n"
                         "PCSX-Reloaded includes an emulated BIOS, but it is "
                         "still incomplete. \n"
                         "Using an original BIOS avoids some bugs and reduced "
                         "compatibility \n"
                         "with some games."),
            'title': "Use BIOS file?",
        })
        if dlg.result == dlg.YES:
            bios_dlg = FileDialog("Select a BIOS file")
            bios_src = bios_dlg.filename
            shutil.copy(bios_src, bios_path)
            # Save bios in config
            bios_path = os.path.join(bios_path, os.path.basename(bios_src))
            runner_config = LutrisConfig(runner='pcsxr')
            runner_config.config_type = 'runner'
            runner_config.runner_config = {'pcsxr': {'bios': bios_path}}
            runner_config.save()
        return True
コード例 #2
0
ファイル: hatari.py プロジェクト: Kehlyos/lutris
 def install(self):
     success = super(hatari, self).install()
     if not success:
         return False
     config_path = os.path.expanduser('~/.hatari')
     if not os.path.exists(config_path):
         os.makedirs(config_path)
     bios_path = os.path.expanduser('~/.hatari/bios')
     if not os.path.exists(bios_path):
         os.makedirs(bios_path)
     dlg = QuestionDialog({
         'question': "Do you want to select an Atari ST BIOS file?",
         'title': "Use BIOS file?",
     })
     if dlg.result == dlg.YES:
         bios_dlg = FileDialog("Select a BIOS file")
         bios_filename = bios_dlg.filename
         shutil.copy(bios_filename, bios_path)
         bios_path = os.path.join(bios_path,
                                  os.path.basename(bios_filename))
         runner_config = LutrisConfig(runner='hatari')
         runner_config.config_type = 'runner'
         runner_config.runner_config = {'hatari': {'bios_file': bios_path}}
         runner_config.save()
     return True
コード例 #3
0
 def install(self):
     success = super(atari800, self).install()
     if not success:
         return False
     config_path = os.path.expanduser("~/.atari800")
     if not os.path.exists(config_path):
         os.makedirs(config_path)
     bios_archive = os.path.join(config_path, 'atari800-bioses.zip')
     dlg = DownloadDialog(self.bios_url, bios_archive)
     dlg.run()
     if not os.path.exists(bios_archive):
         ErrorDialog("Could not download Atari800 BIOS archive")
         return
     extract_archive(bios_archive, config_path)
     os.remove(bios_archive)
     runner_config = LutrisConfig(runner='atari800')
     runner_config.config_type = 'runner'
     runner_config.runner_config = {'atari800': {'bios_path': config_path}}
     runner_config.save()
コード例 #4
0
ファイル: hatari.py プロジェクト: ERIIX/lutris
 def install(self):
     success = super(hatari, self).install()
     if not success:
         return False
     config_path = os.path.expanduser('~/.hatari')
     if not os.path.exists(config_path):
         os.makedirs(config_path)
     bios_path = os.path.expanduser('~/.hatari/bios')
     if not os.path.exists(bios_path):
         os.makedirs(bios_path)
     dlg = QuestionDialog({
         'question': "Do you want to select an Atari ST BIOS file?",
         'title': "Use BIOS file?",
     })
     if dlg.result == dlg.YES:
         bios_dlg = FileDialog("Select a BIOS file")
         bios_filename = bios_dlg.filename
         shutil.copy(bios_filename, bios_path)
         bios_path = os.path.join(bios_path, os.path.basename(bios_filename))
         runner_config = LutrisConfig(runner='hatari')
         runner_config.config_type = 'runner'
         runner_config.runner_config = {'hatari': {'bios_file': bios_path}}
         runner_config.save()
     return True