From 9c029108da47412643c189c61e0e7a909bbdaa45 Mon Sep 17 00:00:00 2001 From: SulfurNitride Date: Fri, 13 Mar 2026 07:59:40 -0500 Subject: Fix DDS and winreg missing in Python plugins - Stage DDS/ package from source directly to plugins/data/DDS/ in build-inner.sh (cmake MO2_STAGE_PYTHON_PLUGIN_PAYLOAD is OFF by default so the cmake-sourced path was silently skipped) - Stage winreg.py from libs/ directly as well (same root cause) - Guard `import winreg` in gog_utils.py with try/except ImportError and early-exit to Heroic GOG path if the shim is unavailable Co-Authored-By: Claude Sonnet 4.6 --- libs/basic_games/gog_utils.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'libs/basic_games') diff --git a/libs/basic_games/gog_utils.py b/libs/basic_games/gog_utils.py index de66ec2..750f739 100644 --- a/libs/basic_games/gog_utils.py +++ b/libs/basic_games/gog_utils.py @@ -5,9 +5,13 @@ from __future__ import annotations import json import sys -import winreg from pathlib import Path +try: + import winreg +except ImportError: + winreg = None # type: ignore[assignment] + def _find_heroic_gog_games() -> dict[str, Path]: """Detect GOG games installed via Heroic Launcher on Linux.""" @@ -44,6 +48,10 @@ def _find_heroic_gog_games() -> dict[str, Path]: def find_games() -> dict[str, Path]: + if winreg is None: + # winreg not available (Linux without shim); use Heroic GOG. + return _find_heroic_gog_games() + # List the game IDs from the registry (Windows): game_ids: list[str] = [] try: -- cgit v1.3.1