diff --git a/umu/umu_consts.py b/umu/umu_consts.py index 14d95978e..48200292c 100644 --- a/umu/umu_consts.py +++ b/umu/umu_consts.py @@ -93,3 +93,133 @@ class GamescopeAtom(Enum): # Constant defined in prctl.h # See prctl(2) for more details PR_SET_CHILD_SUBREAPER = 36 + +# Winetricks settings verbs dumped from wintricks 20240105 +# Script: +# -- +# import sys +# from subprocess import PIPE, Popen +# +# with (Popen(["winetricks", "settings", "list"], stdout=PIPE) as wpt, +# Popen(["awk", "{print $1}"], stdout=PIPE, stdin=wpt.stdout) as awkp +# ): +# sys.stdout.write("WINETRICKS_SETTINGS_VERBS = {\n") +# for line in awkp.stdout: +# line = line.decode("utf-8").strip() +# sys.stdout.write(f" \"{line}\",\n") +# sys.stdout.write("}\n") +# -- +WINETRICKS_SETTINGS_VERBS = { + "alldlls=builtin", + "alldlls=default", + "autostart_winedbg=disabled", + "autostart_winedbg=enabled", + "bad", + "cfc=disabled", + "cfc=enabled", + "csmt=force", + "csmt=off", + "csmt=on", + "fontfix", + "fontsmooth=bgr", + "fontsmooth=disable", + "fontsmooth=gray", + "fontsmooth=rgb", + "forcemono", + "good", + "grabfullscreen=n", + "grabfullscreen=y", + "gsm=0", + "gsm=1", + "gsm=2", + "gsm=3", + "heapcheck", + "hidewineexports=disable", + "hidewineexports=enable", + "hosts", + "isolate_home", + "macdriver=mac", + "macdriver=x11", + "mackeyremap=both", + "mackeyremap=left", + "mackeyremap=none", + "mimeassoc=off", + "mimeassoc=on", + "mwo=disable", + "mwo=enabled", + "mwo=force", + "native_mdac", + "native_oleaut32", + "nocrashdialog", + "npm=repack", + "nt351", + "nt40", + "orm=backbuffer", + "orm=fbo", + "psm=0", + "psm=1", + "psm=2", + "psm=3", + "remove_mono", + "renderer=gdi", + "renderer=gl", + "renderer=no3d", + "renderer=vulkan", + "rtlm=auto", + "rtlm=disabled", + "rtlm=readdraw", + "rtlm=readtex", + "rtlm=texdraw", + "rtlm=textex", + "sandbox", + "set_mididevice", + "set_userpath", + "shader_backend=arb", + "shader_backend=glsl", + "shader_backend=none", + "sound=alsa", + "sound=coreaudio", + "sound=disabled", + "sound=oss", + "sound=pulse", + "ssm=disabled", + "ssm=enabled", + "usetakefocus=n", + "usetakefocus=y", + "vd=1024x768", + "vd=1280x1024", + "vd=1440x900", + "vd=640x480", + "vd=800x600", + "vd=off", + "videomemorysize=1024", + "videomemorysize=2048", + "videomemorysize=512", + "videomemorysize=default", + "vista", + "vsm=0", + "vsm=1", + "vsm=2", + "vsm=3", + "win10", + "win11", + "win20", + "win2k3", + "win2k8r2", + "win2k8", + "win2k", + "win30", + "win31", + "win7", + "win81", + "win8", + "win95", + "win98", + "windowmanagerdecorated=n", + "windowmanagerdecorated=y", + "windowmanagermanaged=n", + "windowmanagermanaged=y", + "winme", + "winver=", + "winxp", +} diff --git a/umu/umu_util.py b/umu/umu_util.py index 24e174581..89613fc67 100644 --- a/umu/umu_util.py +++ b/umu/umu_util.py @@ -18,7 +18,7 @@ from urllib3.response import BaseHTTPResponse from Xlib import display -from umu.umu_consts import UMU_LOCAL +from umu.umu_consts import UMU_LOCAL, WINETRICKS_SETTINGS_VERBS from umu.umu_log import log @@ -176,10 +176,10 @@ def is_installed_verb(verb: list[str], pfx: Path) -> bool: with wt_log.open(mode="r", encoding="utf-8") as file: for line in file: - _: str = line.strip() - if _ in verbs: + line: str = line.strip() + if line in verbs and line not in WINETRICKS_SETTINGS_VERBS: is_installed = True - err: str = f"winetricks verb '{_}' is already installed in '{pfx}'" + err: str = f"winetricks verb '{line}' is already installed in '{pfx}'" log.error(err) break