diff options
| author | fox <fox@fakecake.org> | 2026-07-02 15:13:53 +0300 |
|---|---|---|
| committer | fox <fox@fakecake.org> | 2026-07-02 15:13:53 +0300 |
| commit | b50f9a210bf451a199d1ea5e9e6adfd0f3565435 (patch) | |
| tree | 8d135c9c83fd187ed15c7cdc66c6c865fc3d5aff | |
| parent | 89385db52416231494cd542fe59ae434dc8467e0 (diff) | |
| parent | 6506c422a15677840aa8580f360ff13afc33e55d (diff) | |
| download | fungus-launcher-b50f9a210bf451a199d1ea5e9e6adfd0f3565435.tar.gz fungus-launcher-b50f9a210bf451a199d1ea5e9e6adfd0f3565435.tar.xz | |
Merge branch 'dev' into 'master'
Dev See merge request git/fungus-launcher!26
| -rw-r--r-- | .gitlab-ci.yml | 6 | ||||
| -rw-r--r-- | LICENSE | 2 | ||||
| -rw-r--r-- | README.md | 6 | ||||
| -rw-r--r-- | assets/faugus-launcher.png | bin | 10180 -> 0 bytes | |||
| -rw-r--r-- | assets/fungus-launcher.png | bin | 0 -> 1258029 bytes | |||
| -rw-r--r-- | assets/meson.build | 2 | ||||
| -rw-r--r-- | data/fungus-launcher.desktop.in (renamed from data/faugus-launcher.desktop.in) | 2 | ||||
| -rw-r--r-- | data/meson.build | 24 | ||||
| -rw-r--r-- | data/proton-manager.desktop.in | 4 | ||||
| -rw-r--r-- | data/run.desktop.in | 4 | ||||
| -rw-r--r-- | faugus/__init__.py | 49 | ||||
| -rw-r--r-- | fungus-launcher.py (renamed from faugus_launcher.py) | 4 | ||||
| -rw-r--r-- | fungus-launcher.spec (renamed from faugus-launcher.spec) | 17 | ||||
| -rw-r--r-- | fungus-proton-manager.py (renamed from faugus_proton_manager.py) | 20 | ||||
| -rw-r--r-- | fungus-run.py (renamed from faugus_run.py) | 2 | ||||
| -rw-r--r-- | fungus/__init__.py | 49 | ||||
| -rw-r--r-- | fungus/add_game_dialog.py (renamed from faugus/add_game_dialog.py) | 52 | ||||
| -rw-r--r-- | fungus/app.py (renamed from faugus/app.py) | 10 | ||||
| -rw-r--r-- | fungus/config_manager.py (renamed from faugus/config_manager.py) | 10 | ||||
| -rw-r--r-- | fungus/constants.py (renamed from faugus/constants.py) | 32 | ||||
| -rw-r--r-- | fungus/dark_theme.py (renamed from faugus/dark_theme.py) | 0 | ||||
| -rw-r--r-- | fungus/dialogs.py (renamed from faugus/dialogs.py) | 8 | ||||
| -rw-r--r-- | fungus/game_model.py (renamed from faugus/game_model.py) | 2 | ||||
| -rw-r--r-- | fungus/main_window.py (renamed from faugus/main_window.py) | 83 | ||||
| -rw-r--r-- | fungus/meson.build (renamed from faugus/meson.build) | 4 | ||||
| -rwxr-xr-x | fungus/path_manager.py (renamed from faugus/path_manager.py) | 0 | ||||
| -rw-r--r-- | fungus/run_manager.py (renamed from faugus/run_manager.py) | 51 | ||||
| -rw-r--r-- | fungus/settings_dialog.py (renamed from faugus/settings_dialog.py) | 22 | ||||
| -rw-r--r-- | fungus/umu_manager.py (renamed from faugus/umu_manager.py) | 4 | ||||
| -rw-r--r-- | fungus/utils.py (renamed from faugus/utils.py) | 10 | ||||
| -rw-r--r-- | meson.build | 10 | ||||
| -rw-r--r-- | ruff.toml | 2 | ||||
| -rw-r--r-- | scripts/build_test_rpm.sh | 12 | ||||
| -rw-r--r-- | scripts/check_handlers.py | 2 |
34 files changed, 266 insertions, 239 deletions
diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 1af9269..46ad024 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,9 +4,9 @@ stages: - deploy variables: - SPEC_FILE: faugus-launcher.spec + SPEC_FILE: fungus-launcher.spec VERSION: 1.15.13 - NEXUS_REPO: faugus-launcher + NEXUS_REPO: fungus-launcher DIST: .fc${FEDORA_VERSION} include: @@ -62,7 +62,7 @@ deploy-codeberg: - git config --global safe.directory "*" - git config --global http.proxy "${INFRA_HTTPS_PROXY}" - git config --global https.proxy "${INFRA_HTTPS_PROXY}" - - git remote add codeberg "https://x-access-token:${CODEBERG_PUSH_TOKEN}@codeberg.org/cthulhoo/faugus-launcher-fork.git" + - git remote add codeberg "https://x-access-token:${CODEBERG_PUSH_TOKEN}@codeberg.org/cthulhoo/fungus-launcher.git" - git push codeberg "HEAD:${CI_COMMIT_BRANCH}" rules: - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH && $CODEBERG_PUSH_TOKEN != null diff --git a/LICENSE b/LICENSE index f317970..28bd334 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ MIT License -Copyright (c) 2024 Faugus +Copyright (c) 2024 Fungus Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 8337a2d..522be18 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ -# Faugus Launcher (fork) +# Fungus Launcher -**Fork of the original [Faugus Launcher](https://github.com/Faugus/faugus-launcher)**. +**Fork of the original [Fungus Launcher](https://github.com/Fungus/fungus-launcher)**. A simple and lightweight app for running Windows games using [UMU-Launcher](https://github.com/Open-Wine-Components/umu-launcher). @@ -33,7 +33,7 @@ meson ninja pygobject requests pillow psutil icoextract bubblewrap meson setup builddir --prefix=$(pwd)/build meson install -C builddir -./build/bin/faugus-launcher +./build/bin/fungus-launcher ``` ### Build and install RPM locally diff --git a/assets/faugus-launcher.png b/assets/faugus-launcher.png deleted file mode 100644 index 75a0e6e..0000000 --- a/assets/faugus-launcher.png +++ /dev/null Binary files differdiff --git a/assets/fungus-launcher.png b/assets/fungus-launcher.png new file mode 100644 index 0000000..f1346a0 --- /dev/null +++ b/assets/fungus-launcher.png Binary files differdiff --git a/assets/meson.build b/assets/meson.build index 9bbb122..69bf216 100644 --- a/assets/meson.build +++ b/assets/meson.build @@ -1,4 +1,4 @@ install_data( - 'faugus-launcher.png', + 'fungus-launcher.png', install_dir: get_option('datadir') / 'icons' / 'hicolor' / '256x256' / 'apps', ) diff --git a/data/faugus-launcher.desktop.in b/data/fungus-launcher.desktop.in index d83fe0d..316f5e3 100644 --- a/data/faugus-launcher.desktop.in +++ b/data/fungus-launcher.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Name=Faugus Launcher (fork) +Name=Fungus Launcher Exec=@EXEC@ Icon=@ICON@ Categories=Game; diff --git a/data/meson.build b/data/meson.build index f9ff1a2..83a3912 100644 --- a/data/meson.build +++ b/data/meson.build @@ -1,33 +1,33 @@ -icon_name = 'faugus-launcher' +icon_name = 'fungus-launcher' -faugus_launcher_desktop = configure_file( - input: 'faugus-launcher.desktop.in', - output: 'faugus-launcher.desktop', +fungus_launcher_desktop = configure_file( + input: 'fungus-launcher.desktop.in', + output: 'fungus-launcher.desktop', configuration: { 'ICON': icon_name, - 'EXEC': 'faugus-launcher', + 'EXEC': 'fungus-launcher', } ) -faugus_proton_manager_desktop = configure_file( +fungus_proton_manager_desktop = configure_file( input: 'proton-manager.desktop.in', - output: 'faugus-proton-manager.desktop', + output: 'fungus-proton-manager.desktop', configuration: { 'ICON': icon_name, } ) -faugus_run_desktop = configure_file( +fungus_run_desktop = configure_file( input: 'run.desktop.in', - output: 'faugus-run.desktop', + output: 'fungus-run.desktop', configuration: { 'ICON': icon_name, } ) install_data( - faugus_launcher_desktop, - faugus_proton_manager_desktop, - faugus_run_desktop, + fungus_launcher_desktop, + fungus_proton_manager_desktop, + fungus_run_desktop, install_dir: get_option('datadir') / 'applications' ) diff --git a/data/proton-manager.desktop.in b/data/proton-manager.desktop.in index 6e032ac..ec8af55 100644 --- a/data/proton-manager.desktop.in +++ b/data/proton-manager.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Name=Faugus GE-Proton Manager (fork) -Exec=faugus-proton-manager +Name=Fungus GE-Proton Manager (fork) +Exec=fungus-proton-manager Icon=@ICON@ NoDisplay=true diff --git a/data/run.desktop.in b/data/run.desktop.in index 16a23e8..313918c 100644 --- a/data/run.desktop.in +++ b/data/run.desktop.in @@ -1,6 +1,6 @@ [Desktop Entry] Type=Application -Name=Faugus Run (fork) -Exec=faugus-run +Name=Fungus Run (fork) +Exec=fungus-run Icon=@ICON@ NoDisplay=true diff --git a/faugus/__init__.py b/faugus/__init__.py deleted file mode 100644 index d238f79..0000000 --- a/faugus/__init__.py +++ /dev/null @@ -1,49 +0,0 @@ -"""Faugus Launcher (fork) — a game library manager for Linux/Wine.""" - -__all__ = [ - "VERSION", - "ConfigManager", - "FaugusApp", - "Game", - "Main", - "PathManager", - "SandboxWarningDialog", - "SettingsDialog", - "app_dir", - "backup_dir", - "config_file_dir", - "desktop_dir", - "envar_dir", - "faugus_launcher_dir", - "faugus_png", - "faugus_run", - "format_title", - "icons_dir", - "load_games_json", - "save_games_json", - "update_game_field", - "update_games_and_config", -] - -__version__ = "0.1.0" - -from faugus.app import FaugusApp, update_games_and_config -from faugus.config_manager import ConfigManager -from faugus.constants import ( - VERSION, - app_dir, - backup_dir, - config_file_dir, - desktop_dir, - envar_dir, - faugus_launcher_dir, - faugus_png, - faugus_run, - icons_dir, -) -from faugus.dialogs import SandboxWarningDialog -from faugus.game_model import Game, load_games_json, save_games_json, update_game_field -from faugus.main_window import Main -from faugus.path_manager import PathManager -from faugus.settings_dialog import SettingsDialog -from faugus.utils import format_title diff --git a/faugus_launcher.py b/fungus-launcher.py index f371742..20faf80 100644 --- a/faugus_launcher.py +++ b/fungus-launcher.py @@ -14,10 +14,10 @@ else: dev_site_packages = os.path.join(base_dir, PYTHON_SITE_PACKAGES) sys.path.insert(0, dev_site_packages) -from faugus.app import FaugusApp +from fungus.app import FungusApp def main(): - app = FaugusApp() + app = FungusApp() app.run(sys.argv) if __name__ == "__main__": diff --git a/faugus-launcher.spec b/fungus-launcher.spec index 773a281..cd79d54 100644 --- a/faugus-launcher.spec +++ b/fungus-launcher.spec @@ -1,11 +1,11 @@ -Name: faugus-launcher +Name: fungus-launcher version: %{pkg_version} release: %{ci_pipeline_iid}.%{ci_commit_short_sha}%{?dist} Summary: A simple and lightweight app for running Windows games using UMU-Launcher License: MIT -URL: https://gitlab.fakecake.org/git/faugus-launcher.git -Source0: https://gitlab.fakecake.org/git/faugus-launcher/-/archive/master/%{name}-%{version}.tar.gz +URL: https://gitlab.fakecake.org/git/fungus-launcher.git +Source0: https://gitlab.fakecake.org/git/fungus-launcher/-/archive/master/%{name}-%{version}.tar.gz BuildArch: noarch BuildRequires: meson gtk-update-icon-cache python3-devel @@ -26,14 +26,11 @@ A simple and lightweight app for running Windows games using UMU-Launcher/UMU-Pr %files %license LICENSE -%{_bindir}/faugus-launcher -%{_bindir}/faugus-run - -%{_bindir}/faugus-proton-manager -%{python3_sitelib}/faugus/ +%{_bindir}/fungus-launcher +%{_bindir}/fungus-run +%{_bindir}/fungus-proton-manager +%{python3_sitelib}/fungus/ %{_datadir}/applications/*.desktop %{_datadir}/icons/hicolor/256x256/apps/*.png %changelog -* Tue Feb 24 2026 Faugus - 1.15.5-1 -- Release 1.15.5. diff --git a/faugus_proton_manager.py b/fungus-proton-manager.py index 3c96a39..ebb7f53 100644 --- a/faugus_proton_manager.py +++ b/fungus-proton-manager.py @@ -16,17 +16,17 @@ from pathlib import Path gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib # type: ignore -from faugus.dark_theme import apply_dark_theme -from faugus.path_manager import PathManager +from fungus.dark_theme import apply_dark_theme +from fungus.path_manager import PathManager -faugus_png = PathManager.get_icon('faugus-launcher.png') +fungus_png = PathManager.get_icon('fungus-launcher.png') STEAM_COMPATIBILITY_PATH = Path(PathManager.user_data("Steam/compatibilitytools.d")) # Determine the machine's native architecture for asset filtering. MACHINE_ARCH = platform.machine().lower() # e.g. "x86_64", "aarch64" -config_file_dir = PathManager.user_config('faugus-launcher/config.ini') -faugus_launcher_dir = PathManager.user_config('faugus-launcher') +config_file_dir = PathManager.user_config('fungus-launcher/config.ini') +fungus_launcher_dir = PathManager.user_config('fungus-launcher') class ConfigManager: def __init__(self): @@ -52,8 +52,8 @@ class ConfigManager: self.save_config() def save_config(self): - if not os.path.exists(faugus_launcher_dir): - os.makedirs(faugus_launcher_dir) + if not os.path.exists(fungus_launcher_dir): + os.makedirs(fungus_launcher_dir) with open(config_file_dir, 'w') as f: for key, value in self.config.items(): @@ -61,10 +61,10 @@ class ConfigManager: class ProtonDownloader(Gtk.Dialog): def __init__(self): - super().__init__(title="Faugus Proton Manager (fork)") + super().__init__(title="Fungus Proton Manager (fork)") self.set_resizable(False) self.set_modal(True) - self.set_icon_from_file(faugus_png) + self.set_icon_from_file(fungus_png) frame = Gtk.Frame() frame.set_margin_start(10) @@ -198,7 +198,7 @@ class ProtonDownloader(Gtk.Dialog): @property def _cache_dir(self): """Return the cache directory for proton release data.""" - cache = Path(faugus_launcher_dir) / "cache" + cache = Path(fungus_launcher_dir) / "cache" cache.mkdir(parents=True, exist_ok=True) return cache diff --git a/faugus_run.py b/fungus-run.py index a308669..5373a7a 100644 --- a/faugus_run.py +++ b/fungus-run.py @@ -9,7 +9,7 @@ dev_site_packages = os.path.join(base_dir, "lib", "python3.*", "site-packages") if os.path.exists(dev_site_packages): sys.path.insert(0, dev_site_packages) -from faugus.run_manager import main +from fungus.run_manager import main if __name__ == "__main__": main() diff --git a/fungus/__init__.py b/fungus/__init__.py new file mode 100644 index 0000000..cf867f4 --- /dev/null +++ b/fungus/__init__.py @@ -0,0 +1,49 @@ +"""Fungus Launcher — a game library manager for Linux/Wine.""" + +__all__ = [ + "VERSION", + "ConfigManager", + "FungusApp", + "Game", + "Main", + "PathManager", + "SandboxWarningDialog", + "SettingsDialog", + "app_dir", + "backup_dir", + "config_file_dir", + "desktop_dir", + "envar_dir", + "format_title", + "fungus_launcher_dir", + "fungus_png", + "fungus_run", + "icons_dir", + "load_games_json", + "save_games_json", + "update_game_field", + "update_games_and_config", +] + +__version__ = "0.1.0" + +from fungus.app import FungusApp, update_games_and_config +from fungus.config_manager import ConfigManager +from fungus.constants import ( + VERSION, + app_dir, + backup_dir, + config_file_dir, + desktop_dir, + envar_dir, + fungus_launcher_dir, + fungus_png, + fungus_run, + icons_dir, +) +from fungus.dialogs import SandboxWarningDialog +from fungus.game_model import Game, load_games_json, save_games_json, update_game_field +from fungus.main_window import Main +from fungus.path_manager import PathManager +from fungus.settings_dialog import SettingsDialog +from fungus.utils import format_title diff --git a/faugus/add_game_dialog.py b/fungus/add_game_dialog.py index 45c049e..9a675c2 100644 --- a/faugus/add_game_dialog.py +++ b/fungus/add_game_dialog.py @@ -17,29 +17,30 @@ import webbrowser from gi.repository import Gtk, Gdk, GdkPixbuf, GLib # type: ignore from PIL import Image -from faugus.config_manager import ConfigManager -from faugus.constants import ( +from fungus.config_manager import ConfigManager +from fungus.constants import ( app_dir, desktop_dir, - faugus_png, - faugus_run, + fungus_png, + fungus_run, icons_dir, prefixes_dir, ) -from faugus.utils import EntryTooltipMixin, format_title, is_safe_prefix_path, pick_folder, _validate_text +from fungus.utils import EntryTooltipMixin, format_title, is_safe_prefix_path, pick_folder, _validate_text class AddGame(EntryTooltipMixin, Gtk.Dialog): - def __init__(self, parent, file_path): + def __init__(self, parent, file_path, is_editing=False): """Build the AddGame dialog UI with two notebook pages and wire up all handlers.""" + self._is_editing = is_editing # Initialize the AddGame dialog super().__init__(title="New Game/App", parent=parent) # type: ignore[misc] self.set_resizable(False) self.set_modal(True) self.parent_window = parent - self.set_icon_from_file(faugus_png) + self.set_icon_from_file(fungus_png) self.icon_directory = f"{icons_dir}/icon_temp/" if not os.path.exists(self.icon_directory): @@ -344,6 +345,7 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): self.grid_runner.attach(self.label_runner, 0, 0, 1, 1) self.grid_runner.attach(self.combobox_runner, 0, 1, 1, 1) self.combobox_runner.set_hexpand(True) + self.combobox_runner.connect("changed", self.on_combobox_changed) self.label_shortcut.set_hexpand(True) self.grid_shortcut.add(self.checkbox_shortcut_desktop) @@ -448,6 +450,16 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): self.button_winetricks.set_visible(True) self.button_winecfg.set_visible(True) self.button_run.set_visible(True) + if not self._is_editing: + self.button_winetricks.set_sensitive(False) + self.button_winetricks.set_tooltip_text( + "This is only available after adding the game.") + self.button_winecfg.set_sensitive(False) + self.button_winecfg.set_tooltip_text( + "This is only available after adding the game.") + self.button_run.set_sensitive(False) + self.button_run.set_tooltip_text( + "This is only available after adding the game.") self.grid_protonfix.set_visible(True) self.button_shortcut_icon.set_image(self.set_image_shortcut_icon()) self.grid_page2.set_visible(True) @@ -469,7 +481,7 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): def populate_combobox_with_runners(self): """Fill the Proton runner combobox with available runners.""" - from faugus.utils import populate_combobox_with_runners as _pop + from fungus.utils import populate_combobox_with_runners as _pop _pop(self.combobox_runner) def on_entry_changed(self, widget, entry): @@ -534,11 +546,11 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): title = self.entry_title.get_text() title_formatted = format_title(title) - faugus_run_path = faugus_run + fungus_run_path = fungus_run def run_command(): process = subprocess.Popen( - [sys.executable, faugus_run_path, "--game", title_formatted, "--cmd", file_run], + [sys.executable, fungus_run_path, "--game", title_formatted, "--cmd", file_run], ) process.wait() GLib.idle_add(self.set_sensitive, True) @@ -563,8 +575,8 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): webbrowser.open("https://umu.openwinecomponents.org/") def set_image_shortcut_icon(self): - """Set the default icon (faugus_png) as the shortcut icon preview.""" - image_path = faugus_png + """Set the default icon (fungus_png) as the shortcut icon preview.""" + image_path = fungus_png shutil.copyfile(image_path, self.icon_temp) pixbuf = GdkPixbuf.Pixbuf.new_from_file(self.icon_temp) @@ -642,9 +654,9 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): if response == Gtk.ResponseType.ACCEPT: file_path = filechooser.get_filename() if not file_path or not is_valid_image(file_path): - dialog_image = Gtk.Dialog(title="Faugus Launcher", transient_for=self, modal=True) + dialog_image = Gtk.Dialog(title="Fungus Launcher", transient_for=self, modal=True) dialog_image.set_resizable(False) - dialog_image.set_icon_from_file(faugus_png) + dialog_image.set_icon_from_file(fungus_png) label = Gtk.Label() label.set_label("The selected file is not a valid image.") @@ -769,7 +781,7 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): self.checkbox_shortcut_appmenu.set_active(os.path.exists(applications_shortcut_path)) def on_button_winecfg_clicked(self, widget): - """Launch winecfg inside the Wine prefix via faugus_run.""" + """Launch winecfg inside the Wine prefix via fungus_run.""" self.set_sensitive(False) # Handle the click event of the Winecfg button validation_result = self.validate_fields(entry="prefix") @@ -780,11 +792,11 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): title = self.entry_title.get_text() title_formatted = format_title(title) - faugus_run_path = faugus_run + fungus_run_path = fungus_run def run_command(): process = subprocess.Popen( - [sys.executable, faugus_run_path, "--game", title_formatted, "--cmd", "winecfg"], + [sys.executable, fungus_run_path, "--game", title_formatted, "--cmd", "winecfg"], ) process.wait() GLib.idle_add(self.set_sensitive, True) @@ -800,7 +812,7 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): command_thread.start() def on_button_winetricks_clicked(self, widget): - """Launch winetricks inside the Wine prefix via faugus_run.""" + """Launch winetricks inside the Wine prefix via fungus_run.""" self.set_sensitive(False) # Handle the click event of the Winetricks button validation_result = self.validate_fields(entry="prefix") @@ -811,11 +823,11 @@ class AddGame(EntryTooltipMixin, Gtk.Dialog): title = self.entry_title.get_text() title_formatted = format_title(title) - faugus_run_path = faugus_run + fungus_run_path = fungus_run def run_command(): process = subprocess.Popen( - [sys.executable, faugus_run_path, "--game", title_formatted, "--cmd", "winetricks"], + [sys.executable, fungus_run_path, "--game", title_formatted, "--cmd", "winetricks"], ) process.wait() GLib.idle_add(self.set_sensitive, True) diff --git a/faugus/app.py b/fungus/app.py index f5df0fc..3752710 100644 --- a/faugus/app.py +++ b/fungus/app.py @@ -7,14 +7,14 @@ gi.require_version('Gtk', '3.0') gi.require_version('Gdk', '3.0') from gi.repository import Gtk, Gio # type: ignore -from faugus.dark_theme import apply_dark_theme -from faugus.utils import update_games_and_config +from fungus.dark_theme import apply_dark_theme +from fungus.utils import update_games_and_config -class FaugusApp(Gtk.Application): +class FungusApp(Gtk.Application): def __init__(self): super().__init__( - application_id="io.github.Faugus.faugus-launcher", + application_id="io.github.Fungus.fungus-launcher", flags=Gio.ApplicationFlags.HANDLES_OPEN, ) self.window = None @@ -28,7 +28,7 @@ class FaugusApp(Gtk.Application): def do_activate(self): if not self.window: - from faugus.main_window import Main + from fungus.main_window import Main self.window = Main(self) self.window.present() diff --git a/faugus/config_manager.py b/fungus/config_manager.py index 9974b3d..683718b 100644 --- a/faugus/config_manager.py +++ b/fungus/config_manager.py @@ -3,14 +3,14 @@ import configparser from pathlib import Path -from faugus.path_manager import PathManager +from fungus.path_manager import PathManager -__all__ = ["ConfigManager", "faugus_launcher_dir"] +__all__ = ["ConfigManager", "fungus_launcher_dir"] _CONFIG_SECTION = "settings" -faugus_launcher_dir = PathManager.user_config('faugus-launcher') -_config_path = Path(faugus_launcher_dir) / "config.ini" +fungus_launcher_dir = PathManager.user_config('fungus-launcher') +_config_path = Path(fungus_launcher_dir) / "config.ini" _DEFAULTS = { "default-runner": "GE-Proton", @@ -21,7 +21,7 @@ _DEFAULTS = { class ConfigManager: - """Thin wrapper around configparser for the faugus-launcher settings.""" + """Thin wrapper around configparser for the fungus-launcher settings.""" def __init__(self): self._config = configparser.ConfigParser() diff --git a/faugus/constants.py b/fungus/constants.py index 1c07b7a..ebf4b4e 100644 --- a/faugus/constants.py +++ b/fungus/constants.py @@ -5,7 +5,7 @@ import subprocess from pathlib import Path -from faugus.path_manager import PathManager +from fungus.path_manager import PathManager VERSION = "@VERSION@-@RELEASE@" @@ -17,33 +17,33 @@ def get_desktop_dir(): return str(Path.home() / 'Desktop') # ── User config / data paths ──────────────────────────────────────────── -faugus_launcher_dir = PathManager.user_config('faugus-launcher') -icons_dir = PathManager.user_config('faugus-launcher/icons') -config_file_dir = PathManager.user_config('faugus-launcher/config.ini') -envar_dir = PathManager.user_config('faugus-launcher/envar.txt') +fungus_launcher_dir = PathManager.user_config('fungus-launcher') +icons_dir = PathManager.user_config('fungus-launcher/icons') +config_file_dir = PathManager.user_config('fungus-launcher/config.ini') +envar_dir = PathManager.user_config('fungus-launcher/envar.txt') share_dir = PathManager.user_data() -backup_dir = PathManager.user_config("faugus-launcher/games-backup") +backup_dir = PathManager.user_config("fungus-launcher/games-backup") app_dir = PathManager.user_data('applications') -faugus_png = PathManager.get_icon('faugus-launcher.png') +fungus_png = PathManager.get_icon('fungus-launcher.png') # ── Binary / runtime paths ────────────────────────────────────────────── -faugus_run = PathManager.find_binary('faugus-run') -faugus_proton_manager = PathManager.find_binary('faugus-proton-manager') -umu_run = PathManager.user_data('faugus-launcher/umu-run') +fungus_run = PathManager.find_binary('fungus-run') +fungus_proton_manager = PathManager.find_binary('fungus-proton-manager') +umu_run = PathManager.user_data('fungus-launcher/umu-run') -games_json = PathManager.user_config('faugus-launcher/games.json') -prefixes_dir = PathManager.user_config('faugus-launcher/prefixes') -faugus_launcher_share_dir = PathManager.user_data('faugus-launcher') +games_json = PathManager.user_config('fungus-launcher/games.json') +prefixes_dir = PathManager.user_config('fungus-launcher/prefixes') +fungus_launcher_share_dir = PathManager.user_data('fungus-launcher') # ── Computed paths ───────────────────────────────────────────────────── desktop_dir = get_desktop_dir() # ── Flags & defaults ──────────────────────────────────────────────────── -faugus_backup = False +fungus_backup = False # ── Ensure required directories exist ─────────────────────────────────── -os.makedirs(faugus_launcher_share_dir, exist_ok=True) -os.makedirs(faugus_launcher_dir, exist_ok=True) +os.makedirs(fungus_launcher_share_dir, exist_ok=True) +os.makedirs(fungus_launcher_dir, exist_ok=True) os.makedirs(prefixes_dir, exist_ok=True) diff --git a/faugus/dark_theme.py b/fungus/dark_theme.py index 11987bd..11987bd 100644 --- a/faugus/dark_theme.py +++ b/fungus/dark_theme.py diff --git a/faugus/dialogs.py b/fungus/dialogs.py index 70b117d..9882ecb 100644 --- a/faugus/dialogs.py +++ b/fungus/dialogs.py @@ -6,7 +6,7 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk # type: ignore -from faugus.constants import faugus_png +from fungus.constants import fungus_png def show_warning_dialog( @@ -56,7 +56,7 @@ def show_warning_dialog( dialog.format_secondary_text(secondary) dialog.set_resizable(False) - dialog.set_icon_from_file(faugus_png) + dialog.set_icon_from_file(fungus_png) response = dialog.run() dialog.destroy() @@ -88,7 +88,7 @@ class SandboxWarningDialog(Gtk.MessageDialog): ) self.format_secondary_text(secondary) self.set_resizable(False) - self.set_icon_from_file(faugus_png) + self.set_icon_from_file(fungus_png) subprocess.Popen(["canberra-gtk-play", "-i", "dialog-warning"]) self.run() self.destroy() @@ -111,7 +111,7 @@ class SteamRuntimeWarningDialog(Gtk.MessageDialog): "Please open Settings → UMU-Launcher and update the runtime." ) self.set_resizable(False) - self.set_icon_from_file(faugus_png) + self.set_icon_from_file(fungus_png) subprocess.Popen(["canberra-gtk-play", "-i", "dialog-warning"]) self.run() self.destroy() diff --git a/faugus/game_model.py b/fungus/game_model.py index 3ca7705..d12b239 100644 --- a/faugus/game_model.py +++ b/fungus/game_model.py @@ -144,7 +144,7 @@ def backup_games_file(source_path, backup_dir=None): ``backup_dir`` constant (must be set before calling). """ if backup_dir is None: - from faugus.constants import backup_dir as _default_backup_dir + from fungus.constants import backup_dir as _default_backup_dir backup_dir = _default_backup_dir if not os.path.isfile(source_path): diff --git a/faugus/main_window.py b/fungus/main_window.py index 269d5ae..7964d2b 100644 --- a/faugus/main_window.py +++ b/fungus/main_window.py @@ -11,31 +11,32 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GdkPixbuf, GLib # type: ignore -from faugus.config_manager import ConfigManager -from faugus.constants import ( +from fungus.config_manager import ConfigManager +from fungus.constants import ( app_dir, backup_dir, - faugus_backup, + fungus_backup, games_json, config_file_dir, desktop_dir, - faugus_launcher_dir, - faugus_png, - faugus_run, + fungus_launcher_dir, + fungus_png, + fungus_run, icons_dir, + umu_run, VERSION, ) -from faugus.dialogs import show_warning_dialog -from faugus.game_model import ( +from fungus.dialogs import show_warning_dialog +from fungus.game_model import ( Game, backup_games_file, load_games_json, save_games_json, update_game_field, ) -from faugus.settings_dialog import SettingsDialog -from faugus.utils import format_title, is_safe_prefix_path -from faugus.umu_manager import ( +from fungus.settings_dialog import SettingsDialog +from fungus.utils import format_title, is_safe_prefix_path +from fungus.umu_manager import ( check_and_install_if_needed, is_umu_installed, ) @@ -44,10 +45,10 @@ from faugus.umu_manager import ( class Main(Gtk.ApplicationWindow): def __init__(self, app): """Initialize the main window, build the UI, and load config.""" - super().__init__(application=app, title="Faugus Launcher (fork)") - self.set_icon_from_file(faugus_png) + super().__init__(application=app, title="Fungus Launcher") + self.set_icon_from_file(fungus_png) self.connect("delete-event", self.on_close) - print(f"Faugus Launcher (fork) {VERSION}") + print(f"Fungus Launcher {VERSION}") self.start_maximized = False self.current_prefix = None @@ -60,7 +61,7 @@ class Main(Gtk.ApplicationWindow): self.processes = {} - self.working_directory = faugus_launcher_dir + self.working_directory = fungus_launcher_dir os.chdir(self.working_directory) self.provider = Gtk.CssProvider() @@ -339,7 +340,7 @@ class Main(Gtk.ApplicationWindow): def load_games(self): """Load games from games.json, filter hidden ones, and render the flowbox.""" - from faugus.game_model import load_games_json + from fungus.game_model import load_games_json games_data = load_games_json(games_json) self.games.clear() @@ -368,7 +369,7 @@ class Main(Gtk.ApplicationWindow): game_label = Gtk.Label.new(game.title) if not os.path.isfile(game_icon): - game_icon = faugus_png + game_icon = fungus_png self.flowbox_child = Gtk.FlowBoxChild() @@ -564,14 +565,14 @@ class Main(Gtk.ApplicationWindow): def on_button_add_clicked(self, widget): """Open the Add Game dialog.""" file_path = "" - from faugus.add_game_dialog import AddGame + from fungus.add_game_dialog import AddGame add_game_dialog = AddGame(self, file_path) add_game_dialog.connect("response", self.on_dialog_response, add_game_dialog) add_game_dialog.show() def on_button_edit_clicked(self, widget): """Open the Edit Game dialog pre-filled with the selected game's data.""" - from faugus.add_game_dialog import AddGame + from fungus.add_game_dialog import AddGame file_path = "" selected_children = self.flowbox.get_selected_children() @@ -579,7 +580,7 @@ class Main(Gtk.ApplicationWindow): game = selected_child.game if game: - edit_game_dialog = AddGame(self, file_path) + edit_game_dialog = AddGame(self, file_path, is_editing=True) edit_game_dialog.connect("response", self.on_edit_dialog_response, edit_game_dialog, game) model_runner = edit_game_dialog.combobox_runner.get_model() @@ -756,12 +757,12 @@ class Main(Gtk.ApplicationWindow): error_dialog.destroy() def _launch_game(self, game): - """Launch the given game via faugus_run.""" + """Launch the given game via fungus_run.""" game_directory = os.path.dirname(game.path) cwd = game_directory if game_directory and os.path.isdir(game_directory) else None self.process = subprocess.Popen( - [sys.executable, faugus_run, "--game", game.gameid], cwd=cwd) + [sys.executable, fungus_run, "--game", game.gameid], cwd=cwd) GLib.child_watch_add(self.process.pid, self.on_process_exit) @@ -781,7 +782,7 @@ class Main(Gtk.ApplicationWindow): modal=True ) dialog.set_resizable(False) - dialog.set_icon_from_file(faugus_png) + dialog.set_icon_from_file(fungus_png) content_area = dialog.get_content_area() content_area.set_border_width(0) @@ -862,9 +863,31 @@ class Main(Gtk.ApplicationWindow): return True prefix = os.path.normpath(add_game_dialog.entry_prefix.get_text()) + title = add_game_dialog.entry_title.get_text() + title_formatted = format_title(title) + protonfix = add_game_dialog.entry_protonfix.get_text() + runner = add_game_dialog.combobox_runner.get_active_text() + if prefix: os.makedirs(prefix, exist_ok=True) - title = add_game_dialog.entry_title.get_text() + # Initialize the Wine prefix via UMU + gameid = protonfix if protonfix else title_formatted + if gameid and runner: + env = os.environ.copy() + env["GAMEID"] = gameid + env["WINEPREFIX"] = prefix + env["PROTONPATH"] = runner + try: + subprocess.run( + [umu_run, "wineprefixcreate", "/usr/bin/true"], + env=env, + check=True, + capture_output=True, + ) + except subprocess.CalledProcessError as e: + print(f"Prefix initialization failed for '{title}': {e.stderr.decode()}") + else: + print(f"Skipping prefix init for '{title}' (GAMEID or runner missing)") if os.path.exists(games_json): existing = load_games_json(games_json) @@ -878,14 +901,10 @@ class Main(Gtk.ApplicationWindow): path = add_game_dialog.entry_path.get_text() launch_arguments = add_game_dialog.entry_launch_arguments.get_text() game_arguments = add_game_dialog.entry_game_arguments.get_text() - protonfix = add_game_dialog.entry_protonfix.get_text() - runner = add_game_dialog.combobox_runner.get_active_text() playtime = 0 hidden = False favorite = False - title_formatted = format_title(title) - game = Game( title_formatted, title, path, prefix, launch_arguments, game_arguments, protonfix, runner, @@ -960,7 +979,7 @@ class Main(Gtk.ApplicationWindow): def on_settings_dialog_response(self, dialog, response_id, settings_dialog): """Handle the Settings dialog response — reload config or apply changes.""" - if faugus_backup: + if fungus_backup: subprocess.Popen([sys.executable, __file__]) self.destroy() self.load_config() @@ -1102,7 +1121,7 @@ class Main(Gtk.ApplicationWindow): if os.path.exists(icon_path): shutil.copyfile(icon_path, icon_temp) if not os.path.exists(icon_path): - icon_temp = faugus_png + icon_temp = fungus_png pixbuf = GdkPixbuf.Pixbuf.new_from_file(icon_temp) scaled_pixbuf = pixbuf.scale_simple(50, 50, GdkPixbuf.InterpType.BILINEAR) @@ -1133,14 +1152,14 @@ class Main(Gtk.ApplicationWindow): new_icon_path = f"{icons_dir}/{game.gameid}.ico" if not os.path.exists(new_icon_path): - new_icon_path = faugus_png + new_icon_path = fungus_png game_directory = os.path.dirname(game.path) desktop_file_content = ( f'[Desktop Entry]\n' f'Name={game.title}\n' - f'Exec={faugus_run} --game {game.gameid}\n' + f'Exec={fungus_run} --game {game.gameid}\n' f'Icon={new_icon_path}\n' f'Type=Application\n' f'Categories=Game;\n' diff --git a/faugus/meson.build b/fungus/meson.build index 0816b5a..aca84e8 100644 --- a/faugus/meson.build +++ b/fungus/meson.build @@ -7,7 +7,7 @@ configure_file( output: 'constants.py', configuration: conf_data, install: true, - install_dir: py.get_install_dir() / 'faugus', + install_dir: py.get_install_dir() / 'fungus', ) py.install_sources( @@ -24,5 +24,5 @@ py.install_sources( 'settings_dialog.py', 'umu_manager.py', 'utils.py', - subdir: 'faugus', + subdir: 'fungus', ) diff --git a/faugus/path_manager.py b/fungus/path_manager.py index eb43a91..eb43a91 100755 --- a/faugus/path_manager.py +++ b/fungus/path_manager.py diff --git a/faugus/run_manager.py b/fungus/run_manager.py index cafb104..9e4bf87 100644 --- a/faugus/run_manager.py +++ b/fungus/run_manager.py @@ -18,18 +18,18 @@ from threading import Thread, Event gi.require_version("Gtk", "3.0") from gi.repository import Gtk, GLib, GdkPixbuf # type: ignore -from faugus.config_manager import ConfigManager -from faugus.constants import ( +from fungus.config_manager import ConfigManager +from fungus.constants import ( envar_dir, - faugus_png, + fungus_png, games_json, share_dir, umu_run, ) -from faugus.game_model import Game, load_games_json, save_games_json -from faugus.path_manager import PathManager -from faugus.utils import update_games_and_config, has_proton_installed, is_executable_in_whitelist -from faugus.dialogs import SandboxWarningDialog, SteamRuntimeWarningDialog +from fungus.game_model import Game, load_games_json, save_games_json +from fungus.path_manager import PathManager +from fungus.utils import update_games_and_config, has_proton_installed, is_executable_in_whitelist +from fungus.dialogs import SandboxWarningDialog, SteamRuntimeWarningDialog # Path to the UMU Steam Runtime (used by umu-run) UMU_STEAMRT_DIR = os.path.expanduser("~/.local/share/umu/steamrt3") @@ -38,7 +38,7 @@ compatibility_dir = os.path.expanduser("~/.local/share/Steam/compatibilitytools. os.makedirs(compatibility_dir, exist_ok=True) -class FaugusRun: +class FungusRun: # Environment variables to pass through into the sandbox SANDBOX_ENV_KEYS: tuple[str, ...] = ( "DRI_PRIME", "__NV_PRIME_RENDER_OFFLOAD", @@ -107,7 +107,6 @@ class FaugusRun: # Set environment variables from game properties os.environ["GAMEID"] = self.game.protonfix or self.game.gameid or "" - os.environ["LOG_DIR"] = self.game.gameid or "" os.environ["WINEPREFIX"] = self.game.prefix or "" if self.game.runner: os.environ["PROTONPATH"] = self.game.runner @@ -177,8 +176,6 @@ class FaugusRun: # ── Construct inner command from game properties ──────────────── inner_cmd_parts: list[str] = [] - if game.gameid: - inner_cmd_parts.append(f"LOG_DIR='{game.gameid}'") if game.protonfix: inner_cmd_parts.append(f"GAMEID={game.protonfix}") else: @@ -257,14 +254,14 @@ class FaugusRun: str(home / ".local" / "share" / "umu"), "--bind", str(home / ".local" / "share" / "Steam"), str(home / ".local" / "share" / "Steam"), - "--bind", str(home / ".local" / "share" / "faugus-launcher"), - str(home / ".local" / "share" / "faugus-launcher"), + "--bind", str(home / ".local" / "share" / "fungus-launcher"), + str(home / ".local" / "share" / "fungus-launcher"), "--ro-bind", str(home / ".Xauthority"), str(home / ".Xauthority"), ]) # ── Config files (read-only) ──────────────────────────────────── - config_dir = Path(PathManager.user_config("faugus-launcher")) + config_dir = Path(PathManager.user_config("fungus-launcher")) for cfg_file in ("games.json", "config.ini"): cfg_path = config_dir / cfg_file if cfg_path.exists(): @@ -374,9 +371,9 @@ class FaugusRun: self.splash_window.destroy() self.splash_window = None - dialog = Gtk.Dialog(title="Faugus Launcher (fork)") + dialog = Gtk.Dialog(title="Fungus Launcher") dialog.set_resizable(False) - dialog.set_icon_from_file(faugus_png) + dialog.set_icon_from_file(fungus_png) content_area = dialog.get_content_area() content_area.set_border_width(0) @@ -462,9 +459,9 @@ class FaugusRun: def show_error_dialog_no_proton(self): """Show error when no proton versions are installed at all.""" - dialog = Gtk.Dialog(title="Faugus Launcher (fork)") + dialog = Gtk.Dialog(title="Fungus Launcher") dialog.set_resizable(False) - dialog.set_icon_from_file(faugus_png) + dialog.set_icon_from_file(fungus_png) content_area = dialog.get_content_area() content_area.set_border_width(0) @@ -511,9 +508,9 @@ class FaugusRun: def show_error_dialog(self, protonpath=None, network_error=False): """Show a generic error dialog for missing Proton or network errors.""" - dialog = Gtk.Dialog(title="Faugus Launcher (fork)") + dialog = Gtk.Dialog(title="Fungus Launcher") dialog.set_resizable(False) - dialog.set_icon_from_file(faugus_png) + dialog.set_icon_from_file(fungus_png) content_area = dialog.get_content_area() content_area.set_border_width(0) @@ -679,11 +676,11 @@ class FaugusRun: def show_splash_window(self): """Create and display the splash window with logo, title, and output view.""" - self.splash_window = Gtk.Window(title="Faugus Launcher (fork)") + self.splash_window = Gtk.Window(title="Fungus Launcher") self.splash_window.set_decorated(False) self.splash_window.set_resizable(False) self.splash_window.set_default_size(840, 400) - self.splash_window.set_icon_from_file(faugus_png) + self.splash_window.set_icon_from_file(fungus_png) frame = Gtk.Frame() frame.set_label_align(0.5, 0.5) @@ -696,7 +693,7 @@ class FaugusRun: frame.add(grid) # Logo - image_path = faugus_png + image_path = fungus_png pixbuf = GdkPixbuf.Pixbuf.new_from_file(image_path) pixbuf = pixbuf.scale_simple(75, 75, GdkPixbuf.InterpType.BILINEAR) image = Gtk.Image.new_from_pixbuf(pixbuf) @@ -926,10 +923,10 @@ def run_winetricks(game: Game) -> None: def handle_command(game: Game, cmd_override: str | None = None): - """Entry point: launch winetricks or the game via FaugusRun. + """Entry point: launch winetricks or the game via FungusRun. If *cmd_override* is ``"winetricks"``, runs the winetricks GUI. - Otherwise, creates a ``FaugusRun`` instance and starts the game + Otherwise, creates a ``FungusRun`` instance and starts the game in a GLib main loop. """ # ── Special unsandboxed winetricks path ────────────────────────── @@ -941,7 +938,7 @@ def handle_command(game: Game, cmd_override: str | None = None): game.path = cmd_override game.game_arguments = "" - run = FaugusRun(game) + run = FungusRun(game) run.show_splash_window() def run_process(): @@ -969,7 +966,7 @@ def load_game_from_json(gameid): def main(): """CLI entry point — parse args, load game, and launch it.""" - from faugus.dark_theme import apply_dark_theme + from fungus.dark_theme import apply_dark_theme apply_dark_theme() update_games_and_config() diff --git a/faugus/settings_dialog.py b/fungus/settings_dialog.py index f6bb82c..8b32f72 100644 --- a/faugus/settings_dialog.py +++ b/fungus/settings_dialog.py @@ -9,17 +9,17 @@ import gi gi.require_version('Gtk', '3.0') from gi.repository import Gtk, Gdk, GLib, Pango # type: ignore -from faugus.constants import ( +from fungus.constants import ( VERSION, envar_dir, - faugus_png, - faugus_proton_manager, + fungus_png, + fungus_proton_manager, ) -from faugus.config_manager import ConfigManager -from faugus.dialogs import show_warning_dialog -from faugus.utils import EntryTooltipMixin -from faugus.umu_manager import ( +from fungus.config_manager import ConfigManager +from fungus.dialogs import show_warning_dialog +from fungus.utils import EntryTooltipMixin +from fungus.umu_manager import ( check_and_install_if_needed, get_installed_umu_version, get_latest_umu_version, @@ -33,7 +33,7 @@ class SettingsDialog(EntryTooltipMixin, Gtk.Dialog): # Initialize the Settings dialog super().__init__(title="Settings", transient_for=parent, modal=True) # type: ignore[misc] self.set_resizable(False) - self.set_icon_from_file(faugus_png) + self.set_icon_from_file(fungus_png) self.parent = parent self.modified = False @@ -225,7 +225,7 @@ class SettingsDialog(EntryTooltipMixin, Gtk.Dialog): self.box.set_vexpand(True) self.box.set_hexpand(True) - #url = f"https://github.com/Faugus/faugus-launcher/releases" + #url = f"https://github.com/Fungus/fungus-launcher/releases" label_version = Gtk.Label() label_version.set_text(VERSION) #label_version.set_use_markup(True) @@ -484,7 +484,7 @@ class SettingsDialog(EntryTooltipMixin, Gtk.Dialog): def populate_combobox_with_runners(self): """Fill the Proton runner combobox with available runners.""" - from faugus.utils import populate_combobox_with_runners as _pop + from fungus.utils import populate_combobox_with_runners as _pop _pop(self.combobox_runner) def on_entry_changed(self, widget, entry): @@ -524,7 +524,7 @@ class SettingsDialog(EntryTooltipMixin, Gtk.Dialog): def on_button_proton_manager_clicked(self, widget): """Launch the Proton Manager dialog as a blocking child window.""" - proton_manager = faugus_proton_manager + proton_manager = fungus_proton_manager current_runner = self.combobox_runner.get_active_text() def run_command(): diff --git a/faugus/umu_manager.py b/fungus/umu_manager.py index 6869bcb..68bfc4e 100644 --- a/faugus/umu_manager.py +++ b/fungus/umu_manager.py @@ -19,14 +19,14 @@ UMU_TAR_URL_TEMPLATE = ( UMU_VERSION_API = "https://api.github.com/repos/Open-Wine-Components/umu-launcher/releases" xdg_data_home = os.getenv("XDG_DATA_HOME", os.path.expanduser("~/.local/share")) -UMU_INSTALL_DIR = os.path.join(xdg_data_home, "faugus-launcher") +UMU_INSTALL_DIR = os.path.join(xdg_data_home, "fungus-launcher") UMU_VERSION_FILE = os.path.join(UMU_INSTALL_DIR, "version.txt") UMU_BIN_PATH = os.path.join(UMU_INSTALL_DIR, "umu-run") # Path to the umu-run binary (may differ from UMU_BIN_PATH depending on deployment) def get_umu_run_path() -> str: """Return the path to the umu-run binary.""" - from faugus.constants import umu_run + from fungus.constants import umu_run return str(umu_run) diff --git a/faugus/utils.py b/fungus/utils.py index 17cb0fa..7f9017e 100644 --- a/faugus/utils.py +++ b/fungus/utils.py @@ -57,7 +57,7 @@ def _resolve_runner_to_directory(runner): Otherwise fall back to the newest installed version of that family, or None if nothing is available. """ - from faugus.constants import share_dir + from fungus.constants import share_dir compat_path = Path(share_dir) / "Steam/compatibilitytools.d" if not compat_path.exists(): @@ -99,14 +99,14 @@ def update_games_and_config(): Handles runner-name renames, empty playtime normalisation, and deprecated key removal. Called once at startup by both - the launcher (app.py) and the standalone runner (faugus_run.py). + the launcher (app.py) and the standalone runner (fungus_run.py). Note: This function intentionally works with raw dicts instead of ``Game`` objects. It runs before any ``Game`` instances are constructed and needs to touch fields that may not match the current ``Game`` dataclass schema (e.g. deprecated keys). """ - from faugus.constants import games_json, config_file_dir + from fungus.constants import games_json, config_file_dir if os.path.exists(games_json): try: @@ -175,7 +175,7 @@ def populate_combobox_with_runners(combobox): sorts them by natural version ordering (newest first), and sets the first item as active. The cell renderer is configured for ellipsiation. """ - from faugus.constants import share_dir + from fungus.constants import share_dir runner_path = f'{share_dir}/Steam/compatibilitytools.d/' versions = [] @@ -209,7 +209,7 @@ def populate_combobox_with_runners(combobox): def has_proton_installed() -> bool: """Check whether any proton/compatibility tool directories exist on disk.""" - from faugus.constants import share_dir + from fungus.constants import share_dir compat_path = Path(share_dir) / "Steam/compatibilitytools.d" if not compat_path.exists(): diff --git a/meson.build b/meson.build index 659e4cd..9bfc7d4 100644 --- a/meson.build +++ b/meson.build @@ -1,5 +1,5 @@ project( - 'faugus-launcher', + 'fungus-launcher', version: '1.15.5', meson_version: '>=1.2.0', license: 'MIT', @@ -25,7 +25,7 @@ gnome = import('gnome') subdir('assets') subdir('data') -subdir('faugus') +subdir('fungus') conf_data = configuration_data() conf_data.set('IS_RPM_BUILD', is_rpm) @@ -34,9 +34,9 @@ conf_data.set('VERSION', pkg_version) conf_data.set('RELEASE', release) python_executables = { - 'faugus_launcher.py': 'faugus-launcher', - 'faugus_run.py': 'faugus-run', - 'faugus_proton_manager.py': 'faugus-proton-manager', + 'fungus-launcher.py': 'fungus-launcher', + 'fungus-run.py': 'fungus-run', + 'fungus-proton-manager.py': 'fungus-proton-manager', } foreach input_file, output_name : python_executables diff --git a/ruff.toml b/ruff.toml index 019010b..868b5e6 100644 --- a/ruff.toml +++ b/ruff.toml @@ -1,4 +1,4 @@ -# Ruff configuration for faugus-launcher +# Ruff configuration for fungus-launcher target-version = "py310" line-length = 120 diff --git a/scripts/build_test_rpm.sh b/scripts/build_test_rpm.sh index e8247c2..3173f33 100644 --- a/scripts/build_test_rpm.sh +++ b/scripts/build_test_rpm.sh @@ -1,17 +1,19 @@ -#!/bin/sh -e +#!/bin/sh + +set -euo export VERSION=1.15.13 export DIST=.fc43 # note dot before 43 sudo dnf install rpm-build rpmdevtools redhat-rpm-config git -sudo dnf builddep faugus-launcher.spec +sudo dnf builddep fungus-launcher.spec mkdir -p ~/rpmbuild/SOURCES # need to commit changes first -git archive --format=tar.gz --prefix=faugus-launcher-${VERSION}/ -o ~/rpmbuild/SOURCES/faugus-launcher-${VERSION}.tar.gz HEAD +git archive --format=tar.gz --prefix=fungus-launcher-${VERSION}/ -o ~/rpmbuild/SOURCES/fungus-launcher-${VERSION}.tar.gz HEAD -rpmbuild -bb faugus-launcher.spec --define "dist $DIST" --define "pkg_version $VERSION" --define "ci_pipeline_iid 1" --define "ci_commit_short_sha $(git rev-parse --short HEAD)" +rpmbuild -bb fungus-launcher.spec --define "dist $DIST" --define "pkg_version $VERSION" --define "ci_pipeline_iid 1" --define "ci_commit_short_sha $(git rev-parse --short HEAD)" SHORT_SHA=$(git rev-parse --short HEAD) -sudo rpm -Uvh --oldpackage --force ~/rpmbuild/RPMS/noarch/faugus-launcher-${VERSION}-1.${SHORT_SHA}.fc43.noarch.rpm +sudo rpm -Uvh --oldpackage --force ~/rpmbuild/RPMS/noarch/fungus-launcher-${VERSION}-1.${SHORT_SHA}.fc43.noarch.rpm diff --git a/scripts/check_handlers.py b/scripts/check_handlers.py index 3cc655e..24b550b 100644 --- a/scripts/check_handlers.py +++ b/scripts/check_handlers.py @@ -1,6 +1,6 @@ #!/usr/bin/env python3 """ -GTK signal handler & widget reference validator for faugus-launcher. +GTK signal handler & widget reference validator for fungus-launcher. Scans Python source files for connect() calls and verifies that: 1. Every self.on_* / self.* callback referenced in connect() exists as a method on the same class. |
