setup: check 32-bit glibc and FreeType before making the prefix, unless Wine is new WoW64 #654

Open
github-bot wants to merge 1 commit from github-bot/gh-654 into main AGit
Owner

@⁠El-Biiscuit on GitHub · 2026-12-06 00:51 UTC · original
El-Biiscuit:setup-32bit-prefix → main · +42 −1 · 1 files · 1 commits · open

What this does

setup.sh prefix now stops before making the prefix when the Wine that will make it is old WoW64 and the host lacks 32-bit glibc or 32-bit FreeType. It prints the packages to install for Fedora/Nobara, Debian/Ubuntu and Arch/CachyOS.

Without these libraries:

  • no 32-bit glibc: wineboot stops at /lib/ld-linux.so.2;
  • no 32-bit FreeType: wineboot writes broken window metrics into the prefix (CaptionHeight=5434094, see #268). The game then shows a black band, with no error.

Both stay in the prefix once it is made, which is why the check runs before.

The check only runs for old WoW64 runtimes, as asked in #515. They are detected by a 32-bit ntdll.so under the runtime's wine/i386-unix. Examples:

  • checked: GE-Proton11-16 (files/lib/wine/i386-unix);
  • skipped: new WoW64 builds, which have no i386-unix and need no 32-bit host libraries, such as Fedora's wine-wow64 (11.22); a 64-bit-only Wine is skipped too.

It is also skipped when prefix isn't requested or the prefix already exists.

Refs #515, #268.

Tests

step_tools from the patched setup.sh was run in podman containers (Fedora 43, Debian trixie, Arch) and on a Fedora 45 host. The containers used fake runtimes; the host used the real GE-Proton11-16 and the real system Wine. 22/22 cases behave as expected:

case old WoW64 new WoW64
Fedora 43, no 32-bit libs stops, 2 missing skipped
Fedora 43 + glibc.i686 stops, FreeType missing –
Fedora 43 + glibc.i686 freetype.i686 passes skipped
Fedora 43, no 32-bit libs, real GE-Proton11-16 mounted stops –
Debian trixie, 64-bit FreeType only stops, 2 missing skipped
Debian trixie + libc6:i386 libfreetype6:i386 passes –
Arch, 64-bit freetype2 only (/usr/lib is 64-bit there) stops, 2 missing skipped
Arch + lib32-glibc lib32-freetype2 passes –
Fedora 45 host, real GE-Proton11-16 / real wine-wow64 11.22 passes skipped
no prefix step, or prefix already there skipped skipped

Two control cases confirm the tests catch mistakes:

  • unpatched setup.sh on a bare Fedora with old WoW64: passes when it should stop. The F1 case catches it.
  • a mutant whose old-WoW64 check is always true, on new WoW64: stops when it should pass. The F2 case catches it.

bash -n is clean, and shellcheck reports nothing on the added lines.

Not run:

  • a full setup.sh that actually makes the prefix with this change;
  • a real new-WoW64 Wine package on Debian or Arch: the containers use a fake runtime;
  • Ubuntu, CachyOS and Nobara.

🤖 Generated with Claude Code

**@⁠El-Biiscuit** on GitHub · 2026-12-06 00:51 UTC · [original](https://github.com/lobomfz/VIctory-xmem/pull/654) `El-Biiscuit:setup-32bit-prefix` → `main` · +42 −1 · 1 files · 1 commits · open ## What this does `setup.sh prefix` now stops before making the prefix when the Wine that will make it is old WoW64 and the host lacks 32-bit glibc or 32-bit FreeType. It prints the packages to install for Fedora/Nobara, Debian/Ubuntu and Arch/CachyOS. Without these libraries: - **no 32-bit glibc:** `wineboot` stops at `/lib/ld-linux.so.2`; - **no 32-bit FreeType:** `wineboot` writes broken window metrics into the prefix (`CaptionHeight=5434094`, see #268). The game then shows a black band, with no error. Both stay in the prefix once it is made, which is why the check runs before. The check only runs for **old WoW64** runtimes, as asked in #515. They are detected by a 32-bit `ntdll.so` under the runtime's `wine/i386-unix`. Examples: - **checked:** GE-Proton11-16 (`files/lib/wine/i386-unix`); - **skipped:** new WoW64 builds, which have no `i386-unix` and need no 32-bit host libraries, such as Fedora's `wine-wow64` (11.22); a 64-bit-only Wine is skipped too. It is also skipped when `prefix` isn't requested or the prefix already exists. Refs #515, #268. ## Tests `step_tools` from the patched `setup.sh` was run in podman containers (Fedora 43, Debian trixie, Arch) and on a Fedora 45 host. The containers used fake runtimes; the host used the real GE-Proton11-16 and the real system Wine. 22/22 cases behave as expected: | case | old WoW64 | new WoW64 | |---|---|---| | Fedora 43, no 32-bit libs | stops, 2 missing | skipped | | Fedora 43 + glibc.i686 | stops, FreeType missing | – | | Fedora 43 + glibc.i686 freetype.i686 | passes | skipped | | Fedora 43, no 32-bit libs, real GE-Proton11-16 mounted | stops | – | | Debian trixie, 64-bit FreeType only | stops, 2 missing | skipped | | Debian trixie + libc6:i386 libfreetype6:i386 | passes | – | | Arch, 64-bit freetype2 only (`/usr/lib` is 64-bit there) | stops, 2 missing | skipped | | Arch + lib32-glibc lib32-freetype2 | passes | – | | Fedora 45 host, real GE-Proton11-16 / real `wine-wow64` 11.22 | passes | skipped | | no `prefix` step, or prefix already there | skipped | skipped | Two control cases confirm the tests catch mistakes: - **unpatched `setup.sh` on a bare Fedora with old WoW64:** passes when it should stop. The F1 case catches it. - **a mutant whose old-WoW64 check is always true, on new WoW64:** stops when it should pass. The F2 case catches it. `bash -n` is clean, and shellcheck reports nothing on the added lines. **Not run:** - a full `setup.sh` that actually makes the prefix with this change; - a real new-WoW64 Wine package on Debian or Arch: the containers use a fake runtime; - Ubuntu, CachyOS and Nobara. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
wineboot stops at /lib/ld-linux.so.2 without the 32-bit C library, and
without 32-bit FreeType it writes window metrics (CaptionHeight=5434094)
that leave a black band instead of the game; the prefix keeps them (#268).

When the prefix step is requested and no prefix exists yet, step_tools now
asks for both before the prefix is made. The check applies only to old
WoW64 runtimes (a 32-bit i386-unix/ntdll.so under the Proton files dir or
the Wine install prefix); new WoW64 and 64-bit-only Wine need no 32-bit
host libraries, so it is skipped for them.

Refs #515, #268.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-06 00:58:57 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/654/head:github-bot/gh-654'
git switch 'github-bot/gh-654'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-654'
git switch 'github-bot/gh-654'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-654'
git switch 'github-bot/gh-654'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-654'
git switch 'main'
git merge --squash 'github-bot/gh-654'
git switch 'main'
git merge --ff-only 'github-bot/gh-654'
git switch 'main'
git merge 'github-bot/gh-654'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.