コード例 #1
0
    def __init__(self, parent):
        StatusElement.__init__(self, parent)
        self.error_icon = Image("launcher:res/16/error.png")
        self.warning_icon = Image("launcher:res/16/warning_3.png")
        self.notice_icon = Image("launcher:res/16/information.png")
        self.icons = [
            self.error_icon,
            self.warning_icon,
            self.notice_icon,
        ]
        self.coordinates = []
        self.warnings = []
        self.game_notice = ""
        self.variant_notice = ""
        self.variant_warning = ""
        self.variant_error = ""
        self.joy_emu_conflict = ""
        self.using_joy_emu = False
        self.kickstart_file = ""
        self.x_kickstart_file_sha1 = ""
        self.update_available = ""
        self.__error = ""
        self.x_missing_files = ""
        self.download_page = ""
        self.download_file = ""
        self.amiga_model = ""
        self.amiga_model_calculated = ""
        self.chip_memory = ""
        self.chip_memory_calculated = 0
        self.outdated_plugins = []
        self.custom_config = set()
        self.custom_uae_config = set()
        self.settings_config_keys = set()

        plugin_manager = PluginManager.instance()
        for plugin in plugin_manager.plugins():
            if plugin.outdated:
                self.outdated_plugins.append(plugin.name)

        ConfigBehavior(self, [
            "x_game_notice", "x_variant_notice", "x_variant_warning",
            "x_variant_error", "x_joy_emu_conflict", "amiga_model",
            "x_kickstart_file_sha1", "kickstart_file", "download_page",
            "download_file", "x_missing_files", "__error",
            "chip_memory", "jit_compiler"])
        SettingsBehavior(self, ["__update_available"])

        LauncherConfig.add_listener(self)
        for key in JOYSTICK_KEYS:
            self.on_config(key, LauncherConfig.get(key))
        for key in LauncherConfig.keys():
            if LauncherConfig.is_custom_uae_option(key):
                self.on_config(key, LauncherConfig.get(key))
            elif LauncherConfig.is_custom_option(key):
                self.on_config(key, LauncherConfig.get(key))

        LauncherSettings.add_listener(self)
        for key in LauncherSettings.keys():
            if LauncherConfig.is_config_only_option(key):
                self.on_setting(key, LauncherSettings.get(key))
コード例 #2
0
ファイル: sys.py プロジェクト: EdwardBetts/fs-uae-launcher
def expansion_exec(exe_name, argv):
    executable = PluginManager.instance().find_executable(exe_name)
    p = executable.popen(
        argv[1:], stdin=subprocess.PIPE, stdout=subprocess.PIPE,
        stderr=subprocess.STDOUT,
        bufsize=0)
    return p
コード例 #3
0
def expansion_exec(exe_name, argv):
    executable = PluginManager.instance().find_executable(exe_name)
    p = executable.popen(argv[1:],
                         stdin=subprocess.PIPE,
                         stdout=subprocess.PIPE,
                         stderr=subprocess.STDOUT,
                         bufsize=0)
    return p
コード例 #4
0
def app_main():
    executable = PluginManager.instance().find_executable("retroarch")

    args = sys.argv[1:]
    libretro_core = find_libretro_core("nestopia_libretro")
    args.extend(["-L", libretro_core])

    process = executable.popen(args)
    process.wait()
コード例 #5
0
ファイル: gamedriver.py プロジェクト: hroncok/fs-uae-launcher
 def cheats_file(self, name):
     try:
         plugin = PluginManager.instance().plugin("Cheats")
     except LookupError:
         return None
     path = plugin.data_file_path(name)
     if os.path.exists(path):
         return path
     return None
コード例 #6
0
 def cheats_file(self, name):
     try:
         plugin = PluginManager.instance().plugin("Cheats")
     except LookupError:
         return None
     path = plugin.data_file_path(name)
     if os.path.exists(path):
         return path
     return None
コード例 #7
0
ファイル: gamedriver.py プロジェクト: hroncok/fs-uae-launcher
 def run(self):
     executable = PluginManager.instance().find_executable(
         self.emulator.name)
     if executable is None and self.emulator.allow_system_emulator:
         executable_path = shutil.which(self.emulator.name)
         if executable_path is not None:
             executable = Executable(executable_path)
     if executable is None:
         raise LookupError("Could not find emulator " +
                           repr(self.emulator.name))
     self.emulator.process = self.start_emulator(executable)
コード例 #8
0
 def run(self):
     executable = PluginManager.instance().find_executable(
         self.emulator.name
     )
     if executable is None and self.emulator.allow_system_emulator:
         executable_path = shutil.which(self.emulator.name)
         if executable_path is not None:
             executable = Executable(executable_path)
     if executable is None:
         raise LookupError(
             "Could not find emulator " + repr(self.emulator.name)
         )
     self.emulator.process = self.start_emulator(executable)
コード例 #9
0
 def install_mame_hash_file(self, name):
     # FIXME: Better to find data file based on path/provides rather than
     # hardcoding plugin name, but...
     plugin = PluginManager.instance().plugin("MAME-FS")
     src = plugin.data_file_path("hash/" + name)
     hash_dir = os.path.join(self.cwd.path, "hash")
     if not os.path.exists(hash_dir):
         os.makedirs(hash_dir)
     dst = os.path.join(hash_dir, name)
     # FIXME: Check if file is the same (no need to copy)
     if os.path.exists(dst) and filecmp.cmp(src, dst):
         print("[A5200] Hash file", name, "already in place")
         return
     print("[A5200] Installing hash/" + name)
     shutil.copy2(src, dst)
コード例 #10
0
def app_main():
    plugin_manager = PluginManager.instance()
    plugins = plugin_manager.plugins()
    provides = plugin_manager.provides()

    for plugin in plugins:
        print("# {} ({})".format(plugin.name, type(plugin).__name__))
        print(plugin.path)
        print("")

    print("# Provides:")
    for name in sorted(provides):
        plugin = provides[name]
        print("# {} ({})".format(name, plugin.name))
        # print("", plugin.provides()[name])

    print("")
コード例 #11
0
    def __init__(self, parent):
        super().__init__(parent)
        icon = fsui.Icon("plugins", "pkg:workspace")
        self.add_header(icon, gettext("Plugins"))

        self.list_view = fsui.ListView(self)
        self.list_view.set_min_height(140)
        # self.list_view.item_activated.connect(self.on_plugin_activated)
        image = fsui.Image("workspace:res/16/settings.png")
        plugin_manager = PluginManager.instance()
        for plugin in plugin_manager.plugins():
            text = "{0} ({1})".format(plugin.name, plugin.version)
            if plugin.outdated:
                text += " - " + gettext("This plugin is outdated").upper()
            print("[PLUGINS] {0}".format(text))
            self.list_view.add_item(text, icon=image)
        self.layout.add(self.list_view, fill=True, expand=True)
コード例 #12
0
    def __init__(self, parent):
        super().__init__(parent)
        icon = fsui.Icon("plugins", "pkg:workspace")
        self.add_header(icon, gettext("Plugins"))

        self.list_view = fsui.ListView(self)
        self.list_view.set_min_height(140)
        # self.list_view.item_activated.connect(self.on_plugin_activated)
        image = fsui.Image("workspace:res/16x16/settings.png")
        plugin_manager = PluginManager.instance()
        for plugin in plugin_manager.plugins():
            text = "{0} ({1})".format(plugin.name, plugin.version)
            if plugin.outdated:
                text += " - " + gettext("This plugin is outdated").upper()
            print("[PLUGINS] {0}".format(text))
            self.list_view.add_item(text, icon=image)
        self.layout.add(self.list_view, fill=True, expand=True)
コード例 #13
0
def app_main():
    plugin_manager = PluginManager.instance()
    plugins = plugin_manager.plugins()
    provides = plugin_manager.provides()

    for plugin in plugins:
        print("# {} ({})".format(plugin.name, type(plugin).__name__))
        print(plugin.path)
        print("")

    print("# Provides:")
    for name in sorted(provides):
        plugin = provides[name]
        print("# {} ({})".format(name, plugin.name))
        # print("", plugin.provides()[name])

    print("")
コード例 #14
0
 def find_executable(self, name):
     return PluginManager.instance().find_executable(name)
コード例 #15
0
 def find_resource(self, name):
     return PluginManager.instance().find_resource(name)
コード例 #16
0
def app_main():
    executable = PluginManager.instance().find_executable("mednafen-fs")
    process = executable.popen(sys.argv[1:])
    process.wait()
コード例 #17
0
    def __init__(self, parent):
        StatusElement.__init__(self, parent)
        self.error_icon = Image("launcher:res/16x16/error.png")
        self.warning_icon = Image("launcher:res/16x16/warning_3.png")
        self.notice_icon = Image("launcher:res/16x16/information.png")
        self.icons = [
            self.error_icon,
            self.warning_icon,
            self.notice_icon,
        ]
        self.coordinates = []
        self.warnings = []
        self.game_notice = ""
        self.variant_notice = ""
        self.variant_warning = ""
        self.variant_error = ""
        self.joy_emu_conflict = ""
        self.using_joy_emu = False
        self.kickstart_file = ""
        self.x_kickstart_file_sha1 = ""
        self.update_available = ""
        self.__error = ""
        self.x_missing_files = ""
        self.download_page = ""
        self.download_file = ""
        self.platform = ""
        self.amiga_model = ""
        self.amiga_model_calculated = ""
        self.chip_memory = ""
        self.chip_memory_calculated = 0
        self.outdated_plugins = []
        self.custom_config = set()
        self.custom_uae_config = set()
        self.settings_config_keys = set()

        plugin_manager = PluginManager.instance()
        for plugin in plugin_manager.plugins():
            if plugin.outdated:
                self.outdated_plugins.append(plugin.name)

        ConfigBehavior(self, [
            "x_game_notice", "x_variant_notice", "x_variant_warning",
            "x_variant_error", "x_joy_emu_conflict", "amiga_model",
            "x_kickstart_file_sha1", "kickstart_file", "download_page",
            "download_file", "x_missing_files", "__error",
            "chip_memory", "jit_compiler", "platform"])
        SettingsBehavior(self, ["__update_available"])

        LauncherConfig.add_listener(self)
        for key in JOYSTICK_KEYS:
            self.on_config(key, LauncherConfig.get(key))
        for key in LauncherConfig.keys():
            if LauncherConfig.is_custom_uae_option(key):
                self.on_config(key, LauncherConfig.get(key))
            elif LauncherConfig.is_custom_option(key):
                self.on_config(key, LauncherConfig.get(key))

        LauncherSettings.add_listener(self)
        for key in LauncherSettings.keys():
            if LauncherConfig.is_config_only_option(key):
                self.on_setting(key, LauncherSettings.get(key))
コード例 #18
0
 def run(self):
     executable = PluginManager.instance().find_executable(self.emulator)
     if executable is None:
         raise LookupError("Could not find emulator " + repr(self.emulator))
     return self.start_emulator(executable)
コード例 #19
0
 def find_executable(self, name):
     return PluginManager.instance().find_executable(name)
コード例 #20
0
 def find_resource(self, name):
     return PluginManager.instance().find_resource(name)
コード例 #21
0
 def find_libretro_core(name):
     # return "/usr/lib/x86_64-linux-gnu/libretro/{}.so".format(name)
     return PluginManager.instance().find_library_path(name)
コード例 #22
0
 def find_retroarch_shader(name):
     # FIXME: Better to find data file based on path/provides rather than
     # hardcoding plugin name, but...
     plugin = PluginManager.instance().plugin("RetroArch-FS")
     return plugin.data_file_path("shaders/shaders_glsl/" + name + ".glslp")
コード例 #23
0
def app_main():
    executable = PluginManager.instance().find_executable("mednafen-fs")
    process = executable.popen(sys.argv[1:])
    process.wait()
コード例 #24
0
 def find_retroarch_shader(name):
     # FIXME: Better to find data file based on path/provides rather than
     # hardcoding plugin name, but...
     plugin = PluginManager.instance().plugin("RetroArch-FS")
     return plugin.data_file_path("shaders/shaders_glsl/" + name + ".glslp")
コード例 #25
0
ファイル: runner.py プロジェクト: EdwardBetts/fs-uae-launcher
 def run(self):
     executable = PluginManager.instance().find_executable(self.emulator)
     if executable is None:
         raise LookupError("Could not find emulator " + repr(self.emulator))
     return self.start_emulator(executable)
コード例 #26
0
 def find_libretro_core(name):
     # return "/usr/lib/x86_64-linux-gnu/libretro/{}.so".format(name)
     return PluginManager.instance().find_library_path(name)