本文整理汇总了Python中launcher.launcher_config.LauncherConfig.set_kickstart_from_model方法的典型用法代码示例。如果您正苦于以下问题:Python LauncherConfig.set_kickstart_from_model方法的具体用法?Python LauncherConfig.set_kickstart_from_model怎么用?Python LauncherConfig.set_kickstart_from_model使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类launcher.launcher_config.LauncherConfig
的用法示例。
在下文中一共展示了LauncherConfig.set_kickstart_from_model方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: start_local_game_amiga
# 需要导入模块: from launcher.launcher_config import LauncherConfig [as 别名]
# 或者: from launcher.launcher_config.LauncherConfig import set_kickstart_from_model [as 别名]
def start_local_game_amiga(cls):
# make sure x_kickstart_file is initialized
LauncherConfig.set_kickstart_from_model()
# if not Config.get("x_kickstart_file"): # or not \
# # os.path.exists(Config.get("kickstart_file")):
# fsui.show_error(
# gettext("No kickstart found for this model. Use the 'Import "
# "Kickstarts' function from the menu."))
# return
cs = Amiga.get_model_config(
LauncherConfig.get("amiga_model"))["ext_roms"]
if len(cs) > 0:
# extended kickstart ROM is needed
if not LauncherConfig.get("x_kickstart_ext_file"):
fsui.show_error(
gettext("No extended kickstart found for this model. "
"Try 'scan' function."))
return
config = LauncherConfig.copy()
prepared_config = cls.prepare_config(config)
model = LauncherConfig.get("amiga_model")
if model.startswith("CD32"):
platform = "CD32"
elif model == "CDTV":
platform = "CDTV"
else:
platform = "Amiga"
name = LauncherSettings.get("config_name")
uuid = LauncherConfig.get("x_game_uuid")
from fsgs.SaveStateHandler import SaveStateHandler
save_state_handler = SaveStateHandler(fsgs, name, platform, uuid)
from fsgs.amiga.LaunchHandler import LaunchHandler
launch_handler = LaunchHandler(fsgs, name, prepared_config,
save_state_handler)
from .ui.launcher_window import LauncherWindow
task = AmigaLaunchTask(launch_handler)
# dialog = LaunchDialog(MainWindow.instance, launch_handler)
dialog = LaunchDialog(
LauncherWindow.current(), gettext("Launching FS-UAE"), task)
dialog.show()
def on_show_license_information(license_text):
unused(license_text)
# FIXME: don't depend on wx here
# noinspection PyUnresolvedReferences
# import wx
# license_dialog = wx.MessageDialog(
# dialog, license_text, _("Terms of Use"),
# wx.OK | wx.CANCEL | wx.CENTRE)
# license_dialog.CenterOnParent()
# result = license_dialog.ShowModal()
# return result == wx.ID_OK
# FIXME
return True
fsgs.file.on_show_license_information = on_show_license_information
LauncherConfig.set("__running", "1")
task.start()