Skip to content

Add Winetricks to the prefix Tools menu - #32

Closed
LaganYT wants to merge 1 commit into
NotProtonNot:dev-1.1.0from
LaganYT:feat/winetricks
Closed

LaganYT wants to merge 1 commit into
NotProtonNot:dev-1.1.0from
LaganYT:feat/winetricks

Conversation

@LaganYT

@LaganYT LaganYT commented Oct 8, 2026

Copy link
Copy Markdown
Contributor

Summary

People keep needing vcrun2022 or corefonts in one game's prefix, and CrossOver doesn't ship winetricks. The Tools menu now has a Winetricks item that asks for verbs and runs them in the selected prefix.

 Tools menu / prefix context menu
   Run Program…
+  Winetricks…        asks for verbs, e.g. "vcrun2022 corefonts"
   Wine Configuration / Registry Editor / Task Manager
winetricks(verbs, prefix)
  refuse if no verbs, or annihilate / prefix=
  refuse if the game is running
  download winetricks 20260125 from GitHub once, sha256 pinned
  sh winetricks -q <verbs>   with the prefix's usual Wine environment + WINE=<loader>
  output -> <prefix>/winetricks.log

The script is downloaded rather than vendored because it's LGPL. cabextract comes from the runner's own bin, which is already on PATH. annihilate is blocked because under -q it wipes the prefix and its saves without asking. Delete Prefix already covers that, with a warning.

The download error text no longer says "Valve" when the file comes from somewhere else.

Evidence

  • Before: installing a redistributable meant finding winetricks yourself and wiring up WINEPREFIX, WINE and WINESERVER by hand.
    After: in the built app, on Zuma Deluxe:
    • comicsans downloaded its file, ran the runner's cabextract, and put comic.ttf and comicbd.ttf in the prefix's Fonts. The bottom bar said done.
    • notaverb showed Failed with the path to winetricks.log.
    • Also on a fresh /tmp prefix with the FEX runner, win10 and comicsans both passed, and the log had no wine arch warnings.
  • New test in PrefixToolsTests, "Winetricks refuses before it runs when it cannot work or would leave the prefix". It covers empty input, annihilate, prefix= and a missing runner, and checks that nothing runs. Full app suite: same results as the base branch.

Merge Danger

Door: two-way

Only runs when someone picks it. What it installs stays in that one prefix.

Blast Radius: small

One new menu item. eachInTurn in PrefixesModel now takes async work, and the existing sync callers still compile unchanged.

Downloads the pinned 20260125 release on first use, runs it unattended with
the verbs the user types, and writes its output to winetricks.log in the
prefix. Refuses while the game is running, and refuses annihilate and prefix=.
@NotProtonNot

Copy link
Copy Markdown
Owner

Merged, I'll be doing a UI for picking fonts/redists to install soon

@LaganYT
LaganYT deleted the feat/winetricks branch October 19, 2026 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants