mirror of
https://github.com/MacosPorters/betterxen.git
synced 2026-11-27 00:10:43 +00:00
GDK titles load the runtime with LoadLibraryExW(L"xgameruntime.dll", NULL, LOAD_LIBRARY_SEARCH_SYSTEM32), which never searches WINEPATH, so the bootstrap failed with E_GAMERUNTIME_DLL_NOT_FOUND before the #441 loader exports were reached. bx-cli run now copies xgameruntime.dll into the environment's drive_c/windows/system32 before launch. It also copies every BetterXen shim that DLL imports, found with bx-probe (today bx_runtime_veh.dll), because the restricted search also applies to a DLL's own imports. Copies are idempotent and replaced through a rename, and bx-cli prints what it staged. A bare --prefix with no system32 is initialized with wineboot --init under the same isolated environment. A bottle with no system32 fails with a hint. Adds 8 unit tests for staging and the dependency walk, and tests/conformance/test_system32_staging with a --expect-missing negative control. Signed-off-by: Vicente Abarca <135478656+Scarlet-Noble@users.noreply.github.com>