Kill wineserver via UMU Proton

- Kills the wineserver process associated with the running prefix via the `wineserver` command in the UMU-Proton directory instead of wineboot which had lead to unreliable results
This commit is contained in:
R1kaB3rN 2024-04-03 19:50:26 -07:00 committed by Mathieu Comandon
parent a03a9d9ff0
commit 52cd31b997

View file

@ -178,11 +178,14 @@ def winekill(prefix, arch=WINE_DEFAULT_ARCH, wine_path=None, env=None, initial_p
"""Kill processes in Wine prefix."""
initial_pids = initial_pids or []
steam_data_dir = os.path.expanduser("~/.local/share/Steam/compatibilitytools.d")
if not env:
env = {"WINEARCH": arch, "WINEPREFIX": prefix}
if proton.is_proton_path(wine_path):
command = [proton.get_umu_path(), "runinprefix", "wineboot", "-e"]
if proton.is_proton_path(wine_path) and os.path.exists(f"{steam_data_dir}/UMU-Latest"):
proton_version = os.path.realpath(f"{steam_data_dir}/UMU-Latest")
command = [os.path.join(proton_version, "files", "bin", "wineserver"), "-k"]
env["GAMEID"] = proton.DEFAULT_GAMEID
env["WINEPREFIX"] = prefix
else:
if not wine_path:
if not runner: