All pages

docs/build.md

Build

Build

You need Visual Studio Build Tools 2022 with the "Desktop development with C++" workload. Then:

build.bat

If the batch file's vcvars auto-detect fails on your machine, run the same thing from an "x64 Native Tools Command Prompt for VS 2022"; the batch skips detection when the environment is already set up.

build.bat dev makes a test build instead, called texoverride-dev.asi. It writes extra lines marked DEV into the log, for tracking down a problem. Never hand it out as a release. To try it, move your normal texoverride.asi out of the plugins folder first and put this one in under that name, because two copies in the folder would both load.

tools\run_tests.bat builds and runs the tests. CI runs them on every push before it builds.

The build stamp

FiveM refuses any .asi on game build 2189 or newer that does not claim support for the running build. The claim is the FX_ASI_BUILD resource in texoverride.rc, one line per supported game build:

FX_ASI_BUILD 3751 BEGIN "\0" END
FX_ASI_BUILD 3788 BEGIN "\0" END

When FiveM moves to a new game build, add a line with the new number and rebuild, or the plugin silently stops loading. This is why community ASIs go dead after every update.

Release builds

Releases are built on the maintainer's machine with the same build.bat, after tools\run_tests.bat passes, and published by hand with the binary attached. The build is reproducible: the same source and the same compiler version give the same bytes, and each release's notes end with the SHA-256.

Back to the README