Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Do not check if winetricks settings verbs are installed #306

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
130 changes: 130 additions & 0 deletions umu/umu_consts.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
}
8 changes: 4 additions & 4 deletions umu/umu_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -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


Expand Down Expand Up @@ -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

Expand Down
Loading