Cleanup and security updates.
This commit is contained in:
@@ -17,11 +17,6 @@ from .command import CommandOutcome, CommandRunner, OutputLineFilter
|
||||
from .gamebox import build_gamebox_command
|
||||
from .paths import AppPaths
|
||||
from .settings import Settings
|
||||
from .world_fix import (
|
||||
WorldFixError,
|
||||
WorldFixStatusTarget,
|
||||
resolve_world_fix_helper,
|
||||
)
|
||||
|
||||
|
||||
WINDOWS_GAME_EXE = r"C:\Program Files (x86)\Pristontale EU\Game.exe"
|
||||
@@ -289,8 +284,6 @@ def run_game(
|
||||
runner: CommandRunner,
|
||||
*,
|
||||
use_gamebox: bool = True,
|
||||
use_world_fix: bool = False,
|
||||
world_fix_status_target: WorldFixStatusTarget | None = None,
|
||||
timeout_seconds: float = 12 * 60 * 60,
|
||||
check: bool = True,
|
||||
extra_environment: Mapping[str, str] | None = None,
|
||||
@@ -298,38 +291,21 @@ def run_game(
|
||||
) -> CommandOutcome:
|
||||
if not paths.runtime_view.is_dir() and not runner.dry_run:
|
||||
raise RuntimeErrorPT("runtime view is missing; prepare the game first")
|
||||
world_fix_helper = None
|
||||
if use_world_fix and not runner.dry_run:
|
||||
try:
|
||||
world_fix_helper = resolve_world_fix_helper(paths.runtime_view)
|
||||
except WorldFixError as exc:
|
||||
raise RuntimeErrorPT(str(exc)) from exc
|
||||
launch_executable = world_fix_helper or (paths.runtime_view / "Game.exe")
|
||||
if selection.kind == "umu":
|
||||
game_command = [
|
||||
selection.executable,
|
||||
str(launch_executable),
|
||||
str(paths.runtime_view / "Game.exe"),
|
||||
"PTEU_REBORN",
|
||||
]
|
||||
if world_fix_helper is None:
|
||||
game_command.append("PTEU_REBORN")
|
||||
elif world_fix_status_target is not None:
|
||||
game_command.extend(
|
||||
["--status-file", world_fix_status_target.windows_path]
|
||||
)
|
||||
environment = _umu_environment(paths)
|
||||
elif selection.kind == "proton7-container":
|
||||
if not selection.proton_path:
|
||||
raise RuntimeErrorPT("Proton script path is missing")
|
||||
game_command = [
|
||||
selection.executable,
|
||||
str(launch_executable),
|
||||
str(paths.runtime_view / "Game.exe"),
|
||||
"PTEU_REBORN",
|
||||
]
|
||||
if world_fix_helper is None:
|
||||
game_command.append("PTEU_REBORN")
|
||||
elif world_fix_status_target is not None:
|
||||
game_command.extend(
|
||||
["--status-file", world_fix_status_target.windows_path]
|
||||
)
|
||||
environment = _umu_proton7_environment(
|
||||
paths,
|
||||
selection,
|
||||
@@ -344,14 +320,9 @@ def run_game(
|
||||
"ptlinux.proton_compat",
|
||||
selection.proton_path,
|
||||
"runinprefix",
|
||||
str(world_fix_helper) if world_fix_helper is not None else WINDOWS_GAME_EXE,
|
||||
WINDOWS_GAME_EXE,
|
||||
"PTEU_REBORN",
|
||||
]
|
||||
if world_fix_helper is None:
|
||||
game_command.append("PTEU_REBORN")
|
||||
elif world_fix_status_target is not None:
|
||||
game_command.extend(
|
||||
["--status-file", world_fix_status_target.windows_path]
|
||||
)
|
||||
environment = _proton_environment(
|
||||
paths,
|
||||
selection,
|
||||
|
||||
Reference in New Issue
Block a user