From a6c71846a0f2dd219c76ebca11dfd5204afc558d Mon Sep 17 00:00:00 2001 From: pg9182 <96569817+pg9182@users.noreply.github.com> Date: Thu, 17 Feb 2022 02:17:05 -0500 Subject: [PATCH] Add README --- README.md | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 README.md diff --git a/README.md b/README.md new file mode 100644 index 0000000..61d3722 --- /dev/null +++ b/README.md @@ -0,0 +1,27 @@ +# NorthstarStubs + +D3D11 and GFSDK stubs for the Northstar dedicated server. + +These stubs were originally developed for and are included in [pg9182's docker image](https://github.com/pg9182/northstar-dedicated) to eliminate the need for a real or emulated GPU and the resulting overhead (~1GB of RAM on Linux, multiple GB on Windows, on emulated GPUs). Northstar *unreleased* and later will include these stubs by default. + +## Development + +### Build + +To compile the stubs on Linux, install mingw-w64 (both GCC and Clang work fine) and meson, then run: + +```bash +meson setup --cross-file misc/mingw-w64-cross.txt build +meson compile -C build +meson install -C build --destdir destdir +``` + +### Usage + +These stubs should be loaded in place of the original DLLs. On Windows, place in the `bin/x64_retail` directory, overwriting the existing DLLs. On Linux/Wine, put them in the same directory as the game executable, and set the Wine DLL overrides such that d3d11 is native and d3d9 is not present. + +The stubs can also be loaded via a launcher from an absolute path with LoadLibraryEx since relative imports will automatically refer to the first DLL loaded with the same name. + +If the stubs have loaded correctly, you should see a message in the console like `initializing d3d11 stub for northstar`. + +See [here](https://docs.microsoft.com/en-us/windows/win32/dlls/dynamic-link-library-search-order) for more information about the DLL search order on Windows.