diff options
| author | Dominik <55330408+Dom-in@users.noreply.github.com> | 2026-11-22 10:49:02 +0000 |
|---|---|---|
| committer | Dominik <55330408+Dom-in@users.noreply.github.com> | 2026-11-22 10:58:12 +0000 |
| commit | 6f5b59ea8159dd99fba20933616f778135cc1fa7 (patch) | |
| tree | 42bab2780508bea94893321c607cabc5810fb0d6 /scripts | |
| parent | c2967a5e60060e4068fb992196d8f4b494a5046c (diff) | |
runtime: serve LoadLibrary/GetProcAddress of shim-owned modules; xgameruntime.lib's run-time entry points
The package's GDK modules don't import xgameruntime.dll. libHttpClient.GDK.dll and XCurl.dll have no import
entry for it, but both carry the wide string "xgameruntime.dll" and the names InitializeApiImpl[Ex|Ex2],
QueryApiImpl and UninitializeApiImpl next to a statically linked XGameRuntimeInitialize: xgameruntime.lib's
thunks LoadLibraryW the runtime and GetProcAddress those names. Bound to the host, that bypasses the offline
shim. The executable is very likely built the same way.
- library_loader.cpp: LoadLibrary*/GetModuleHandle*/GetProcAddress/FreeLibrary for kernel32, kernelbase and the
api-ms-win-core-libraryloader sets. A module the registry owns (rt::shims::owns_dll) gets a pseudo-handle and
GetProcAddress resolves through the registry; an unserved name is NULL with ERROR_PROC_NOT_FOUND. Every other
module goes to the host.
- xgameruntime.cpp: the five entry points, with the signatures and the unknown-class error documented by
xodus-gaming/xgameruntime-docs (GPL-3.0, facts only). QueryApiImpl logs the class and interface ids and refuses
them, so the first boot with the executable names the COM interfaces to implement.
- xgameruntime_test drives the path through XCurl.dll's api-set binding; docs/runtime_imports.md records the
measurement and the new dry-run counts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/build_runtime.ps1 | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/scripts/build_runtime.ps1 b/scripts/build_runtime.ps1 index 76179acda..e71bcfe27 100644 --- a/scripts/build_runtime.ps1 +++ b/scripts/build_runtime.ps1 | |||
| @@ -33,7 +33,7 @@ if ((Test-Path $cmake) -and (Test-Path $ninja)) { | |||
| 33 | Write-Warning "VS C++ CMake tools not found: building with cl.exe directly, without the GameInput shim (SDL3). Install the CMake tools component to get it." | 33 | Write-Warning "VS C++ CMake tools not found: building with cl.exe directly, without the GameInput shim (SDL3). Install the CMake tools component to get it." |
| 34 | $xtaskqueueDir = Join-Path $root "third_party\xtaskqueue" | 34 | $xtaskqueueDir = Join-Path $root "third_party\xtaskqueue" |
| 35 | $xtaskqueueFiles = "Source\Task\TaskQueue.cpp", "Source\Task\AsyncLib.cpp", "Source\Task\ThreadPool_win32.cpp", "Source\Task\WaitTimer_win32.cpp" | ForEach-Object { "`"$xtaskqueueDir\$_`"" } | 35 | $xtaskqueueFiles = "Source\Task\TaskQueue.cpp", "Source\Task\AsyncLib.cpp", "Source\Task\ThreadPool_win32.cpp", "Source\Task\WaitTimer_win32.cpp" | ForEach-Object { "`"$xtaskqueueDir\$_`"" } |
| 36 | $files = "src\main.cpp", "src\pe_loader.cpp", "shims\registry.cpp", "shims\xmem.cpp", "shims\d3d12_xs.cpp", "shims\d3d12_xs_device.cpp", "shims\d3d12_xs_rootsig.cpp", "shims\xgameruntime.cpp", "shims\process.cpp" | ForEach-Object { "`"$src\$_`"" } | 36 | $files = "src\main.cpp", "src\pe_loader.cpp", "shims\registry.cpp", "shims\xmem.cpp", "shims\d3d12_xs.cpp", "shims\d3d12_xs_device.cpp", "shims\d3d12_xs_rootsig.cpp", "shims\xgameruntime.cpp", "shims\library_loader.cpp", "shims\process.cpp" | ForEach-Object { "`"$src\$_`"" } |
| 37 | $includes = "/I `"$src\src`" /I `"$src\shims`" /I `"$src\shims\xtaskqueue`" /I `"$xtaskqueueDir\Include`" /I `"$xtaskqueueDir\Source\Task`" /I `"$xtaskqueueDir\Source\Common`"" | 37 | $includes = "/I `"$src\src`" /I `"$src\shims`" /I `"$src\shims\xtaskqueue`" /I `"$xtaskqueueDir\Include`" /I `"$xtaskqueueDir\Source\Task`" /I `"$xtaskqueueDir\Source\Common`"" |
| 38 | $opt = if ($Debug) { "/Od /MDd" } else { "/O2 /MD" } | 38 | $opt = if ($Debug) { "/Od /MDd" } else { "/O2 /MD" } |
| 39 | $body = @" | 39 | $body = @" |