Released new version 1.1.1, using GE-Proton as the default environment.

This commit is contained in:
2026-10-23 21:34:51 +02:00
parent d75c345d36
commit 770bbb8a88
9 changed files with 60 additions and 47 deletions

View File

@@ -18,7 +18,9 @@ from .update_resolver import SUPPORTED_CHANNELS
SETTINGS_SCHEMA = 1
DEFAULT_GAME_RUNTIME = "ge-proton"
_TITLE_FRAME_DEFAULT_MIGRATION_KEY = "title_frame_default_migrated"
_GE_PROTON_DEFAULT_MIGRATION_KEY = "ge_proton_default_migrated"
UI_SCALE_CHOICES = frozenset({"auto", "100", "125", "150", "175", "200"})
_RETIRED_SETTINGS = frozenset(
{
@@ -43,7 +45,7 @@ class Settings:
game_crash_dump_upload_enabled: bool = False
borderless: bool = False
suppress_unresponsive_warnings: bool = True
runtime: str = "auto"
runtime: str = DEFAULT_GAME_RUNTIME
proton_sync: str = "auto"
proton_path: str | None = None
renderer: str = "auto"
@@ -188,7 +190,7 @@ def _settings_from_object(value: dict[str, object]) -> Settings:
"suppress_unresponsive_warnings",
True,
),
runtime=_string(value, "runtime", "auto"),
runtime=_string(value, "runtime", DEFAULT_GAME_RUNTIME),
proton_sync=_string(value, "proton_sync", "auto"),
proton_path=proton_path,
renderer=renderer,
@@ -201,6 +203,12 @@ def _settings_from_object(value: dict[str, object]) -> Settings:
update_channel=_string(value, "update_channel", "stable"),
)
_validate(settings)
# Move existing installations to the modern WoW64 profile once. Validate the
# saved runtime first so migration cannot hide malformed settings. New saves
# carry the marker, allowing users to choose another runtime afterwards.
# Keep the optional Proton path for PTR and future explicit legacy choices.
if not _boolean(value, _GE_PROTON_DEFAULT_MIGRATION_KEY, False):
return replace(settings, runtime=DEFAULT_GAME_RUNTIME)
return settings
@@ -237,6 +245,7 @@ def _settings_need_migration(value: dict[str, object]) -> bool:
value.get("schema") != SETTINGS_SCHEMA
or not _SETTINGS_FIELD_NAMES.issubset(value)
or value.get(_TITLE_FRAME_DEFAULT_MIGRATION_KEY) is not True
or value.get(_GE_PROTON_DEFAULT_MIGRATION_KEY) is not True
or bool(_RETIRED_SETTINGS.intersection(value))
or _legacy_renderer_assignment(value.get("proton_path")) is not None
)
@@ -279,6 +288,7 @@ def _write_settings(
payload.update(asdict(settings))
payload["schema"] = SETTINGS_SCHEMA
payload[_TITLE_FRAME_DEFAULT_MIGRATION_KEY] = True
payload[_GE_PROTON_DEFAULT_MIGRATION_KEY] = True
temporary = paths.settings_file.with_name(
f".{paths.settings_file.name}.{os.getpid()}.{threading.get_ident()}."
f"{secrets.token_hex(8)}.tmp"