mirror of
https://github.com/valentderah/totk-pc-recomp.git
synced 2026-11-25 14:05:57 +00:00
The setup's builds name every path relative to the build kit, so a moved game folder rebuilds incrementally (#845)
tools/build_game.py --portable writes build.ninja paths on the tools' drive relative to the kit, also through '..' (the generated C and objects in build-cache/work), names the compiler, windres and ar the same way (backslashes: CreateProcess does not find a relative program with forward slashes), and passes clang -resource-dir and --sysroot relative to the kit, because clang names its own headers by its absolute folder whatever argv[0] says. The Ninja deps log then holds no absolute path. installer/steps.py build_args passes --portable for the build kit. Measured on an install moved after a portable build: the rebuild compiled modules.c only, 3.5 s; before, the move cost a full compile of 430 objects (335 s on 12 cores). Without --portable build.ninja is byte-identical to before. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
8c9c18a6d2
commit
e7c901b864
5 files changed
+61
-13
No files matched your search
+1
-1
@@ -81,7 +81,7 @@ ahead of time, so these patches are built into `totk.exe`:
|
||||
3. After the rebuild the mod switches on and off from the Mods tab like any other, without another rebuild.
|
||||
|
||||
The rebuild runs from `build-kit` in the game folder, which the setup put there: the setup folder can be deleted
|
||||
and the game folder moved. The first rebuild after a move compiles the whole game once (several minutes). A game
|
||||
and the game folder moved. After a move, a game with a code plugin mod rebuilds once at its next start. A game
|
||||
installed by an older setup (no `build-kit` in its folder) still rebuilds from that setup folder until a newer
|
||||
setup runs once on it.
|
||||
`mods_rebuild = off` under `[mods]` in `totk.ini` turns the automatic rebuild off.
|
||||
|
||||
Reference in new issue
Block a user