Describe how to build the DLL

This commit is contained in:
RallyBlock committed 2026-10-25 07:03:46 -04:00
1 parent 29ff15fcec
commit 2c7cb006db
1 file changed
+16 -1
+16 -1
View File
@@ -8,4 +8,19 @@ The largest shadow map this build will use is 8192 with 4 cascades. 16384 is 2 G
The DLL only changes rendering on this client. The DLL only changes rendering on this client.
Source is `src/main.cpp` and `CMakeLists.txt`. The build links tsfuncs, MinHook, `psapi`, `opengl32`, and `dxgi`. The current DLL is attached to the v1.0.0 release. ## Build
Blockland is a 32-bit program, so the DLL has to be built with a 32-bit MinGW toolchain (`i686-w64-mingw32`). Put that toolchain's `bin` directory first on `PATH` so CMake finds that `gcc` and `mingw32-make`.
`find_package(TSFUNCS)` needs a tsfuncs 1.0.1 package: `tsfuncs-config.cmake` next to `include/` and `lib/`. MinHook's cmake package lives under that package's `lib/minhook`. Pass the package directory as `CMAKE_PREFIX_PATH`.
From this repo:
```
cmake -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=Release -DCMAKE_POLICY_VERSION_MINIMUM=3.5 -DCMAKE_PREFIX_PATH=C:/path/to/tsfuncs -S . -B build
cmake --build build
```
The result is `build/ShaderFit.dll`. CMake is set so the filename has no `lib` prefix. The link line is tsfuncs, MinHook, `psapi`, `opengl32`, and `dxgi`, with static libgcc and libstdc++.
Source is `src/main.cpp` and `CMakeLists.txt`. The current DLL is attached to the v1.0.0 release.