-
-
Notifications
You must be signed in to change notification settings - Fork 2
Building from Source
Zaldaryon edited this page Jul 8, 2026
·
9 revisions
- .NET 10 SDK
- bash (Linux/WSL/Git Bash)
- python3
- git, curl, perl
git clone https://github.com/Zaldaryon/Optimum.git
cd Optimum
make build # downloads ~570MB client, decompiles, clones forks, patches, compiles
make test # runs 208 unit tests
make run # deploys DLLs + shaders to .vanilla/ and launches the clientThe first make build takes 2-5 minutes depending on download speed. Subsequent builds take 5-10 seconds.
git clone https://github.com/Zaldaryon/Optimum.git
cd Optimum
.\scripts\bootstrap.ps1
dotnet build VintageStory.slnx -c ReleaseThe bootstrap script downloads the official Windows installer, extracts it with innounp (fetched on first run), decompiles with ILSpy, clones the open-source forks at pinned refs, and applies patches.
- Downloads the official Vintage Story client archive for your platform (Linux tar.gz or Windows exe).
- Extracts it into
.vanilla/win-x64/vintagestory/(Windows) or.vanilla/linux-x64/vintagestory/(Linux). - Decompiles
VintagestoryLib.dllandVintagestory.dllwith ilspycmd intobuild/snapshot/. - Runs post-decompile fixup regex (ref-casts, GeneratedRegex, ErrorCallback alias, ambiguous calls).
- Clones the open-source forks (vsapi, Cairo, vsessentialsmod, vssurvivalmod, vscreativemod) at the refs pinned in
forks.json. - Applies patches from
patches/over both decompiled and fork sources. - Copies Optimum-original sources from
sources/into the working tree.
make deploy runs the Cecil IL patcher and copies the results into .vanilla/:
-
VintagestoryLib-patched.dll(vanilla assembly + 35 transplanted method bodies via Mono.Cecil) -
Vintagestory.dll(recompiled client entry with Server GC and datapath.cfg reading) -
VintagestoryAPI.dll(patched API with OptimumConfig and version tag) -
VSEssentials.dll,VSSurvivalMod.dll,VSCreativeMod.dll(patched game mods) -
cairo-sharp.dll(Cairo fork) -
sources/shaders/*.fsh,*.vsh(optimized GLSL shaders)
make testRuns 208 xunit tests. Tests read patches/ files directly instead of requiring a bootstrapped working tree, so dotnet test passes on any machine with the .NET SDK.
| Target | Description |
|---|---|
make check |
Report installed tools (installs nothing) |
make bootstrap |
Download, decompile, clone, patch |
make build |
Bootstrap if needed, then compile |
make clean |
Remove obj/ and bin/ from project dirs |
make refresh |
Force full re-bootstrap |
make patches |
Regenerate patches/ from the working tree |
make deploy |
Run Cecil patcher, copy DLLs + shaders into .vanilla/ |
make run |
Build, deploy, launch client |
make test |
Run unit tests |
make package |
Build all release archives |
make package-linux |
Linux tar.gz |
make package-appimage |
Linux AppImage |
make package-macos |
macOS .dmg |
make package-win |
Windows zip |