Skip to content

Launcher: install for Proton games from under Wine - #105

Merged
phantoslayer21 merged 6 commits into
phantoslayer21:mainfrom
j0nsh1n:feat/launcher-under-wine
Nov 14, 2026
Merged

phantoslayer21 merged 6 commits into
phantoslayer21:mainfrom
j0nsh1n:feat/launcher-under-wine

Conversation

@j0nsh1n

@j0nsh1n j0nsh1n commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

What this changes and why

Fixes from #49, #50, #37 and #35.

On Linux, players run the launcher under Wine (Proton's), while Proton runs each game in a Wine prefix of its own. Four things made for Windows went wrong there. This PR fixes them as five commits after a build fix. The first of the five adds only a check, and each of the other four needs only that first one, so any of them can be dropped:

  1. Let the launcher tell when it runs under Wine. UnderWine(): Wine's ntdll exports wine_get_version. Nothing calls it on its own.
  2. Write the model paths as Z: paths under Wine.
    • model_dir and rr_model were written as C: paths of the launcher's prefix, which the game's own prefix cannot reach. They are now Z: paths (PathForGamePrefix, through Wine's wine_get_unix_file_name); Z: maps the Linux root in every prefix.
    • A model_dir the player set stays.
    • Folders that don't exist yet (the RR data's F\ before its first conversion) are handled by converting the deepest folder that exists.
  3. Find an RDNA 4 card from Linux's PCI ids under Wine. Wine's DXGI can name the card after an older Radeon, and the launcher then refuses a supported card. DetectGpu falls back to Z:\sys\class\drm\cardN\device\{vendor,device}: 0x1002 with 0x7550, 0x7551, 0x7590 or 0x7591.
  4. Allow vkd3d-proton next to a game under Wine. This one is a policy choice.
    • On Windows the launcher refuses vkd3d-proton next to a game, because there it replaces Windows' Direct3D 12.
    • Under Proton, vkd3d-proton is the game's Direct3D 12. A newer copy next to the game is how a player gets one with dxil-spirv #362, which WrongGPU's kernels need until a Proton release ships it.
    • Under Wine it becomes a note instead. DXVK next to a game is still refused.
  5. Leave RR's first kernel compile to the game under Wine.
    • The RR preparing helper runs in the launcher's prefix, so it fills neither cache a Proton game reads at its first start: vkd3d-proton.cache in the game's folder, and Mesa's cache in Steam's shader cache folder for the game.
    • Under Wine the launcher now skips the helper, and the game's page says the game prepares them at its first start.

Every new code path checks UnderWine() first, so nothing changes on Windows.

What each new or substantially changed file is based on

All own design, using Wine's documented exports (wine_get_version, wine_get_unix_file_name), the Linux kernel's sysfs layout for PCI devices (/sys/class/drm/card*/device/vendor, device) and AMD's public PCI ids for the RX 9070 / 9060 family. The tests in wg_core_tests.cpp and coexist_tests.cpp use synthetic fixtures only.

How it was tested

  • Build fix first (build: commit): the launcher's MinGW build of current main fails in convert_ignore.cpp (unknown type FILE_ID_INFO). context.h includes <functional> before base.h, so MinGW's _mingw.h sets _WIN32_WINNT to Windows 7 first. CMake now defines base.h's Windows 10 value for MinGW builds; MSVC builds are unchanged. It is first because the tests below need it; it stands on its own.
  • Under Wine: with the launcher test of the Linux test-runner PR (Linux tests: run the D3D12 and launcher tests under Wine with a Proton install #52), under GE-Proton 11-11's Wine on an RX 9070 XT, on main at c4390ff.
    • main plus the build fix: wg-core-tests 79, launcher-core-tests 237, coexist-core-tests 186, wizard-policy-tests 18 checks pass.
    • Whole PR: 91, 237, 187 and 18 checks pass.
    • Each commit in order: 79, 83, 89, 89 (coexist 187), 91 wg-core checks; the other programs unchanged.
    • Before this rebase (on e6500a8), each of the four commits was also tested alone on top of the first one, so each can be taken on its own.
    • Each new check was seen to fail with its fix taken out: the missing-folder path, the RDNA 4 id list, the vkd3d-proton rule, and the RR rule under Wine.
  • Installs into generated test games: started with proton run on a new empty prefix, with the graphics-card check on.
    • Under GE-Proton 11-11, Proton 11.0 and Proton-CachyOS: model_dir=Z:\... and rr_model=Z:\...\F\model.wgcm were written, and the install went through with vkd3d-proton next to the game.
    • Proton's bare files/bin/wine on a new prefix does not start the launcher at all: libvkd3d-shader-1.dll is missing.
  • The two-cache finding behind commit 5: measured by running the launcher's RR preparing helper by hand, on copies of a game's shader caches. These caches hold compiled kernels, no model data.
    • A start with only one of the two caches took the full time again, about 2 minutes.
    • With both, it took under 30 ms.
  • Not run: on Windows. The MSVC build is CI's job.
  • check_wording.py, check_source_size.py and tools/ci/check_line_endings.py pass.

Outside this PR, and not used to write or check it: I ran Model M and Ray Reconstruction in Cyberpunk 2077 under Proton as a player does, with the model files WrongGPU's launcher converts on my PC from my own copy of the game's upscaler files. None of that data, or anything computed from it, is in this PR or in its tests. I mention it so you can judge it against the clean-room statement.

Checklist

  • I make the clean-room statement of
    CONTRIBUTING.md
    for this and all my contributions (required once, in my first pull request).
  • Every commit has a Signed-off-by: line (git commit -s; Developer Certificate of Origin 1.1).
  • New source files carry the SPDX licence line for MIT, or are covered in REUSE.toml. (No new files.)
  • No files of the original upscaler (see CONTRIBUTING.md), no model data, game files, captures, screenshots or
    binaries; no paths, user or machine names of my PC.
  • Any new third-party component is under a permitted licence and listed in THIRD-PARTY-NOTICES and REUSE.toml. (None added.)
  • Numbers in documents come with their measurement record. (The one document change, a paragraph in the installer README on the Z: paths under Wine, has no numbers in it.)
  • Kernel or runtime changes: none.

🤖 Generated with Claude Code

@phantoslayer21 phantoslayer21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, this is the set we talked about, and the five-commit split makes it easy to read. I went through all ten files with one question first: does anything change on Windows? As far as reading shows, no. UnderWine() asks the loaded ntdll.dll for wine_get_version, every new path sits behind it, and the refusal, messages, RR state and written paths are the old ones when it is false. Good.

Three things before it goes in, all on the Wine side:

  1. The game page still offers Prepare under Wine, and the button does nothing. RrKernelsInGame now returns true under Wine, but the page picks its text from the raw game rule (clean/installer/src/app/ui_game.cpp, around 1649-1663; ui_rrprep.cpp around 209-212), so a game without its own rule shows "Not prepared yet" with a Prepare button, and clicking it returns at once. Please have the page use RrKernelsInGame and the first-start text.

  2. A failed path conversion is silent. When wine_get_unix_file_name is missing or the walk can't resolve anything, PathForGamePrefix returns the launcher-prefix C: path and the install writes it without a word (util.cpp 249-268, install.cpp 342-343 and 493). The player then gets a game that finds no model and no hint why. Please log it and put a line in the install result saying the model path could not be made reachable from the game's prefix, with the path. A sentence in the docs that this relies on Z: mapping the Linux root in the game's prefix would help too.

  3. The PCI fallback can vouch for a card the game doesn't use. With an integrated GPU plus an RX 9000 card, the first match in card0..card15 sets the card as supported while the driver field still comes from an unrelated DXGI adapter (checks.cpp 45-55, 87-90). I'm fine with the fallback itself; please make what it reports honest: don't carry the other adapter's driver over, say in the name or the check's text that the card was found through Linux's device list and not confirmed as the adapter in use, and enumerate the cards that exist rather than stopping at 16.

Smaller, your call:

  • The sysfs test reads the real machine's sysfs and repeats the id list, so on a PC without one of the four cards a broken reader would pass. A reader that can be pointed at a made-up folder (ids, junk values, missing files, two GPUs) would make it a real test.
  • The vkd3d rule under Wine applies to anything the existing fingerprint classifies as vkd3d, including by a marker string. That's the existing classifier, so I'm not asking for a change here, just noting it now turns a refusal into a note for those too.
  • The checklist's clean-room box is unticked here. Your statement in #52 covers this pull request as well, so nothing to do; tick it if you want the page to say so.

CI is running on it now. The maintainer-side scan runs before merge as usual. And #52 is still waiting on its README changes whenever you get to it.

@j0nsh1n
j0nsh1n force-pushed the feat/launcher-under-wine branch from 5094d30 to a53c009 Compare November 14, 2026 00:15
@j0nsh1n

j0nsh1n commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Thanks. All three are done and folded into the commits they belong to, so each commit still stands on its own. The branch is rebased on current main (4e0601b).

  1. The game page under Wine: the RR row now asks RrKernelsInGame instead of the raw game rule. Under Wine it shows "Prepared by the game at its first start (under Proton its shader caches are its own)", with no Prepare button. The other games keep their texts. This is in the RR commit, in ui_game.cpp.

  2. A failed path conversion is reported. Both writes go through ModelPathForGame (in install.cpp). If PathForGamePrefix can't produce a Z: path (wine_get_unix_file_name missing, or nothing resolvable), the launcher still writes the path, but it now logs it, shows it, and adds a line to the install result: "The model path could not be made reachable from the game's own Proton prefix, so the game may not find the model: (a Z: path is needed; Z: maps the Linux root in every prefix)." The installer README's model section says the setting relies on Z: mapping the Linux root in the game's prefix. wg_core_tests checks that a path on an unmapped drive comes back unchanged under Wine, which is the condition the warning detects.

  3. The PCI fallback reports honestly:

    • It looks at every cardN in the device list, in number order. Connectors like card1-DP-1 and junk values are skipped.
    • It reports the card as "AMD Radeon RDNA 4 (PCI 1002:7550, found in Linux's device list; not confirmed as the adapter the game uses)".
    • The other adapter's driver version is no longer carried over; it's left unknown, which the checks and the support report already show as "unknown".

On your optional point: the device-list folder is now a parameter. wg_core_tests runs it on any host against a made-up folder: an integrated Radeon, another vendor with an RDNA 4 id, a junk vendor, a missing device file, a connector, card 20 and two RDNA 4 cards (lowest number first). With the old 16-card limit put back, that test fails at "a card numbered 20".

Noted on the vkd3d classifier.

Tested under GE-Proton 11-11's Wine, on main + #52 + this branch: wg-core 91, launcher-core 230, coexist-core 187, wizard-policy 18 checks. Each commit alone on top of the UnderWine() commit also passes: wg-core 83 (Z: paths), 85 (PCI ids), 79 with coexist 187 (vkd3d-proton note), 81 (RR). Head is a53c009. The full launcher still builds with MinGW; I didn't build it with MSVC, so that's CI's job. check_wording.py, check_source_size.py and check_line_endings.py pass. Not run on Windows.

j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 14, 2026
Under Wine (Linux) the launcher runs in one prefix and Proton runs each
game in its own. model_dir and rr_model were written as C: paths of the
launcher's prefix, which the game's prefix cannot reach. They are now
Z: paths (PathForGamePrefix); Z: maps the Linux root in every prefix. A
model_dir the player set stays. Folders that do not exist yet (the RR
data's F\ before its first conversion) are handled by converting the
deepest existing folder.

Nothing changes on Windows: PathForGamePrefix returns the path unchanged
outside Wine. Needs: "let the launcher tell when it runs under Wine".

Verified under GE-Proton 11-11's Wine with an llvm-mingw build of the
launcher's unit tests (clean/linux/run_wine_tests.py --tests launcher on
a checkout with this change and its one dependency). The missing-folder
check was seen to fail with the walk-up taken out. Launcher installs into
generated test games, started with `proton run` under GE-Proton 11-11,
Proton 11.0 and Proton-CachyOS, wrote model_dir=Z:\... and
rr_model=Z:\...\F\model.wgcm. Not run on Windows.

Review (phantoslayer21#105): a path that can't be made a Z: path (Wine's
wine_get_unix_file_name missing, nothing resolvable) is logged and
listed in the install result instead of being written silently; the
installer README says this relies on Z: mapping the Linux root in the
game's prefix. wg_core_tests checks that a path on an unmapped drive
comes back unchanged under Wine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 14, 2026
DetectGpu falls back to Linux's PCI ids (Z:\sys\class\drm\cardN\device)
when Wine's DXGI names an RDNA 4 card after an older Radeon, so the
launcher does not refuse a supported card under Wine. The sysfs files
report a size of 4096 bytes, so they are read to the end of file.

Nothing changes on Windows: the fallback runs only under Wine.
Needs: "let the launcher tell when it runs under Wine".

Verified under GE-Proton 11-11's Wine on an RX 9070 XT (launcher unit
tests on a checkout with this change and its one dependency). The check
was seen to fail with the RDNA 4 id list emptied. Not run on Windows.

Review (phantoslayer21#105): every DRM card the folder lists is looked at, in number
order (connectors skipped), not just card0..card15. The name says the
card was found in Linux's device list and not confirmed as the adapter
the game uses, and the other DXGI adapter's driver version is no longer
carried over (left unknown). The device-list folder is a parameter, and
wg_core_tests runs it on a made-up folder (an iGPU, another vendor, a
junk value, a missing file, a connector, card 20, two RDNA 4 cards) on
any host; that check failed with the old 16-card limit put back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 14, 2026
Under Wine the launcher's RR prepare helper runs in the launcher's own
prefix. It fills neither of the caches a Proton game reads at its first
start: vkd3d-proton.cache in the game's working folder and Mesa's cache
in Steam's shader cache folder for the game. Measured on copies of the
game's caches: a start with only one of the two took the full time
again, under 30 ms with both. So under Wine RrKernelsInGame is true, the
game's page says the game prepares them at its first start, and
PrepareRr logs why and returns 4 without running the helper.

Nothing changes on Windows. Needs: "let the launcher tell when it runs
under Wine".

Verified: wg-core-tests under GE-Proton 11-11's Wine (InGame, PrepareRr
returns 4) on a checkout with this change and its one dependency; the
check was seen to fail with the Wine branch taken out. Not run on
Windows.

Review (phantoslayer21#105): the game page asks RrKernelsInGame too, so under Wine it
shows "Prepared by the game at its first start (under Proton its
shader caches are its own)" instead of a Prepare button that would do
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
j0nsh1n and others added 6 commits November 14, 2026 00:45
The launcher's MinGW build of main fails in convert_ignore.cpp: unknown type
FILE_ID_INFO. context.h includes <functional> before base.h, and MinGW's
_mingw.h then sets _WIN32_WINNT to 0x601 (Windows 7), so base.h's
"#ifndef _WIN32_WINNT ... 0x0A00" no longer applies and winbase.h hides the
Windows 8+ declarations. MSVC's headers leave _WIN32_WINNT unset, so the
Windows CI build is unaffected.

CMake now defines _WIN32_WINNT=0x0A00 and WINVER=0x0A00 for MinGW builds,
the value base.h already asks for, whatever a file includes first.

Verified with llvm-mingw 20261104: convert_ignore.cpp alone has 2 errors
without the definition and none with it. The launcher's unit tests under
Wine (clean/linux/run_wine_tests.py --tests launcher, GE-Proton 11-11) pass
on main with this change: wg-core 79, launcher-core 237, coexist-core 186,
wizard-policy 18 checks.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
UnderWine() reports whether the launcher runs under Wine (Linux, for
example with Proton's Wine): Wine's ntdll exports wine_get_version.
Nothing calls it yet. The Wine-specific launcher changes that follow
(model paths, graphics card, vkd3d-proton note, RR prepare) each need
only this commit, not each other.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
Under Wine (Linux) the launcher runs in one prefix and Proton runs each
game in its own. model_dir and rr_model were written as C: paths of the
launcher's prefix, which the game's prefix cannot reach. They are now
Z: paths (PathForGamePrefix); Z: maps the Linux root in every prefix. A
model_dir the player set stays. Folders that do not exist yet (the RR
data's F\ before its first conversion) are handled by converting the
deepest existing folder.

Nothing changes on Windows: PathForGamePrefix returns the path unchanged
outside Wine. Needs: "let the launcher tell when it runs under Wine".

Verified under GE-Proton 11-11's Wine with an llvm-mingw build of the
launcher's unit tests (clean/linux/run_wine_tests.py --tests launcher on
a checkout with this change and its one dependency). The missing-folder
check was seen to fail with the walk-up taken out. Launcher installs into
generated test games, started with `proton run` under GE-Proton 11-11,
Proton 11.0 and Proton-CachyOS, wrote model_dir=Z:\... and
rr_model=Z:\...\F\model.wgcm. Not run on Windows.

Review (phantoslayer21#105): a path that can't be made a Z: path (Wine's
wine_get_unix_file_name missing, nothing resolvable) is logged and
listed in the install result instead of being written silently; the
installer README says this relies on Z: mapping the Linux root in the
game's prefix. wg_core_tests checks that a path on an unmapped drive
comes back unchanged under Wine.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
DetectGpu falls back to Linux's PCI ids (Z:\sys\class\drm\cardN\device)
when Wine's DXGI names an RDNA 4 card after an older Radeon, so the
launcher does not refuse a supported card under Wine. The sysfs files
report a size of 4096 bytes, so they are read to the end of file.

Nothing changes on Windows: the fallback runs only under Wine.
Needs: "let the launcher tell when it runs under Wine".

Verified under GE-Proton 11-11's Wine on an RX 9070 XT (launcher unit
tests on a checkout with this change and its one dependency). The check
was seen to fail with the RDNA 4 id list emptied. Not run on Windows.

Review (phantoslayer21#105): every DRM card the folder lists is looked at, in number
order (connectors skipped), not just card0..card15. The name says the
card was found in Linux's device list and not confirmed as the adapter
the game uses, and the other DXGI adapter's driver version is no longer
carried over (left unknown). The device-list folder is a parameter, and
wg_core_tests runs it on a made-up folder (an iGPU, another vendor, a
junk value, a missing file, a connector, card 20, two RDNA 4 cards) on
any host; that check failed with the old 16-card limit put back.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
On Windows the launcher refuses a game with vkd3d-proton in its folder,
because there it replaces Windows' own Direct3D 12. Under Wine (Proton
on Linux) vkd3d-proton is the game's Direct3D 12, and a newer copy next
to the game is how a player gets one with dxil-spirv pull request #362,
which WrongGPU's kernels need. Under Wine it is now a note, not a
refusal. DXVK next to a game is still refused.

This is a policy choice for the maintainer and can be left out on its
own. Needs: "let the launcher tell when it runs under Wine".

Verified: coexist-core-tests under GE-Proton 11-11's Wine (Inform) and
the same fixture expects Refuse outside Wine. The check was seen to fail
with the Wine branch taken out. Not run on Windows.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
Under Wine the launcher's RR prepare helper runs in the launcher's own
prefix. It fills neither of the caches a Proton game reads at its first
start: vkd3d-proton.cache in the game's working folder and Mesa's cache
in Steam's shader cache folder for the game. Measured on copies of the
game's caches: a start with only one of the two took the full time
again, under 30 ms with both. So under Wine RrKernelsInGame is true, the
game's page says the game prepares them at its first start, and
PrepareRr logs why and returns 4 without running the helper.

Nothing changes on Windows. Needs: "let the launcher tell when it runs
under Wine".

Verified: wg-core-tests under GE-Proton 11-11's Wine (InGame, PrepareRr
returns 4) on a checkout with this change and its one dependency; the
check was seen to fail with the Wine branch taken out. Not run on
Windows.

Review (phantoslayer21#105): the game page asks RrKernelsInGame too, so under Wine it
shows "Prepared by the game at its first start (under Proton its
shader caches are its own)" instead of a Prepare button that would do
nothing.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
@j0nsh1n
j0nsh1n force-pushed the feat/launcher-under-wine branch from a53c009 to 86f1697 Compare November 14, 2026 08:45
@j0nsh1n

j0nsh1n commented Nov 14, 2026

Copy link
Copy Markdown
Contributor Author

Rebased onto current main (c4390ff). The five commits are unchanged apart from the rebase, and they now sit on a build fix:

  • build: MinGW builds get Windows 10's declarations everywhere. main currently doesn't build with MinGW. convert_ignore.cpp fails with an unknown type, FILE_ID_INFO. The cause: context.h includes <functional> before base.h, so MinGW's _mingw.h fixes _WIN32_WINNT at Windows 7 before base.h's #ifndef can set Windows 10. CMake now defines _WIN32_WINNT=0x0A00 and WINVER=0x0A00 for MinGW builds only. MSVC and your CI are unaffected. It's in this PR because the Wine tests below build with MinGW; it stands on its own if you'd rather take it separately.
  • Tests under Wine (GE-Proton 11-11):
    • main plus the fix: wg-core 79, launcher-core 237, coexist-core 186, wizard-policy 18 checks.
    • Whole PR: 91, 237, 187, 18.
    • Each commit in order: 79, 83, 89, 89, 91 wg-core checks, with coexist 187 from the fourth.
    • The repo's line-ending, wording and source-size checks are clean.

The clean-room box is ticked, as you said #52's statement covers this PR. The checklist line on documents now names the one README paragraph, which has no numbers in it.

🤖 Generated with Claude Code

@phantoslayer21

Copy link
Copy Markdown
Owner

Sorry for the silence on this. Your answers from last night slipped past me. CI had also been waiting on a maintainer approval since your first push, because GitHub holds runs from first-time contributors. I've approved it, so it's running on 86f1697 now. I'm going through the six commits again today, including the MinGW build fix, which looks worth taking whether or not the rest lands.

@phantoslayer21 phantoslayer21 left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All three points from my review are done:

  • The RR row asks RrKernelsInGame and shows the first-start text with no Prepare button under Wine.
  • Both model-path writes go through ModelPathForGame, so a failed conversion is logged, shown and listed in the install result.
  • The PCI fallback says where the card came from, says that it isn't confirmed as the game's adapter, and goes past card15.

Every runtime change sits behind UnderWine(), and the MinGW define in CMakeLists.txt doesn't reach MSVC builds. Each feature commit applies on its own on top of the Wine-detection commit, as you said.

Two small edge cases. Neither blocks this; a follow-up PR for either is welcome:

  1. The path walk can miss the drive root. In util.cpp:259-263, with C:\missing\F\model.wgcm where only C:\ exists, the walk stops at C:\missing and never tries C:\. The install then warns and writes the prefix-local path. Keeping the separator on the root, plus a test for that case, would fix it.
  2. The host test stops at card15. wg_core_tests.cpp:237-246 still probes card0–15 itself, so it disagrees with LinuxRdna4Name() when the only card is card16 or later. Either drop that assertion or enumerate the same way. Unlikely on a real machine, but it contradicts the new enumeration.

Approving once CI finishes green.

@phantoslayer21
phantoslayer21 merged commit e452fba into phantoslayer21:main Nov 14, 2026
9 checks passed
@j0nsh1n
j0nsh1n deleted the feat/launcher-under-wine branch November 14, 2026 18:33
j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 15, 2026
The launcher's core (src/wg_core) and its unit tests now build and pass on
Linux with GCC, the first step of a native Linux launcher. The core's
source stays Windows-style and unchanged: on Linux, CMake puts
src/platform/posix first on the include path, where stand-ins for
<windows.h> and the other Windows headers the core includes declare the
calls it makes, and win32_posix*.cpp implements them on POSIX:

- files, mapped files, find, move/copy/delete, attributes and last-error
  codes; paths cross to the OS as UTF-8, "Z:\" is "/" (as in Wine), '\'
  is '/'; names match case-insensitively
- a file-backed registry (HKCU in $XDG_DATA_HOME/WrongGPU/registry.ini;
  in memory in WRONGGPU_TESTING builds); Steam's SteamPath answers the
  Linux Steam folder, so the core's Steam discovery works as is
- processes via posix_spawn with Windows' command-line rules, pipes, a
  minimal job object; known folders via XDG
- fail cleanly as "not available": WinHTTP, COM objects, DXGI, the event
  log, LoadLibrary, WinVerifyTrust, embedded resources

A Windows call the layer lacks fails the Linux build at that line.
CMake keeps every Windows-only target behind if(WIN32) and adds a
posix-layer test (88 checks) on Linux.

Two portable fixes in the core and a test, identical on Windows:
convert_ignore.cpp decodes a UTF-16 ignore list unit by unit (it copied
the bytes into a wstring, which assumes a 2-byte wchar_t), and the test
writes its UTF-16 input unit by unit. MinGW builds also get
_WIN32_WINNT=0x0A00 (the same fix as in phantoslayer21#105; main does not build with
MinGW without it).

Verified: Linux (GCC 16, fresh build): ctest 12/12 (wg-core,
launcher-core, coexist-core, convert-ignore, wizard-policy, posix-layer,
converter tests, source-size, wording). Windows (llvm-mingw under Wine,
GE-Proton 11-11): wg-core 79, launcher-core 237, coexist-core 186,
wizard-policy 18 (the same as main), convert-ignore 213. The posix-layer
test goes red when its share-mode rule is broken on purpose.

Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
j0nsh1n added a commit to j0nsh1n/wronggpu that referenced this pull request Nov 15, 2026
Brings the launcher branch up to upstream main (217 commits: phantoslayer21#47, phantoslayer21#105,
phantoslayer21#196, phantoslayer21#197, phantoslayer21#209, Model K/L, frame generation, ...). Changes beyond
resolving the three conflicts (CMakeLists.txt project(), util.h's includes,
the restorer test):

- POSIX layer: the Win32 calls main's handle-based restore uses
  (SetFileInformationByHandle with FileBasicInfo, FileDispositionInfo and
  FileDispositionInfoEx's POSIX delete, GetFileInformationByHandleEx
  FileBasicInfo, SetEndOfFile, ExitProcess, GetProcessHeap/HeapFree, CDECL,
  ERROR_TOO_MANY_LINKS/FILE_CORRUPT/READ_FAULT), with posix-layer tests.
- run_launcher_tests.py stays below the 256 KB source limit: the edition
  section moves unchanged to launcher_edition_cases.py and the Linux run's
  plumbing to native_linux.NativeT.
- launcher-native runs only in a -DWRONGGPU_PRESET_K=OFF build (like CI's
  launcher build: the suite expects no seeded wronggpu-asi.ini); its two
  checks that fail on main's own launcher too (phantoslayer21#219) are skipped while
  they fail (native_linux.KNOWN_ON_MAIN).

Verified: fresh build, ctest 22/22 (launcher-native 365 passed, 0 failed,
6 skipped: 4 Windows-only sections, the 2 phantoslayer21#219 checks); reuse lint passes.

Signed-off-by: Jonathan Shin <85975340+j0nsh1n@users.noreply.github.com>
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