Reworked launcher updates to use the big button.
This commit is contained in:
@@ -24,6 +24,8 @@ class PrimaryAction(str, Enum):
|
||||
INSTALL = "INSTALL"
|
||||
UPDATE = "UPDATE"
|
||||
PLAY = "PLAY"
|
||||
CHECKING = "CHECKING…"
|
||||
LAUNCHER_UPDATE = "UPDATE LAUNCHER"
|
||||
|
||||
|
||||
@dataclass(frozen=True)
|
||||
@@ -40,8 +42,10 @@ class GameInstallationStatus:
|
||||
def inspect_game_installation(
|
||||
paths: AppPaths,
|
||||
official_build: int | None = None,
|
||||
*,
|
||||
compatibility_ready: bool | None = True,
|
||||
) -> GameInstallationStatus:
|
||||
"""Select Install, Update, or Play without modifying the installation.
|
||||
"""Select the primary launcher action without modifying the installation.
|
||||
|
||||
A completed native sync is the verified source for the local depot build.
|
||||
When the official build cannot be checked, a complete local game remains
|
||||
@@ -54,6 +58,8 @@ def inspect_game_installation(
|
||||
or official_build < 0
|
||||
):
|
||||
raise ValueError("official build must be a non-negative integer")
|
||||
if compatibility_ready is not None and not isinstance(compatibility_ready, bool):
|
||||
raise ValueError("compatibility readiness must be a boolean or null")
|
||||
|
||||
missing_files = tuple(
|
||||
relative
|
||||
@@ -68,6 +74,10 @@ def inspect_game_installation(
|
||||
local_build is None or local_build < official_build
|
||||
):
|
||||
action = PrimaryAction.UPDATE
|
||||
elif compatibility_ready is None:
|
||||
action = PrimaryAction.CHECKING
|
||||
elif not compatibility_ready:
|
||||
action = PrimaryAction.LAUNCHER_UPDATE
|
||||
else:
|
||||
action = PrimaryAction.PLAY
|
||||
return GameInstallationStatus(
|
||||
|
||||
Reference in New Issue
Block a user