fix: Decouple auto-load from build settings

This commit is contained in:
VAC committed 2026-10-14 23:44:14 -03:00
1 parent f594a72950
commit 69b1f4895a
3 files changed
+11 -9

No files matched your search

+4 -2
View File
@@ -39,7 +39,7 @@ To build from source, you'll need:
- Visual Studio 2022 or newer with the C++ build tools.
- XNA Framework 4.0 for Terraria builds, installed with the game.
Set `TerrariaDir` and `TModLoaderDir` in `Directory.Build.props` to your game folders. The build and auto-load scripts use these paths. Environment variables with the same names also work.
Set `TerrariaDir` and `TModLoaderDir` in `Directory.Build.props` to your game folders for source builds. Environment variables with the same names also work.
1. Run `build.bat` from the project folder. The files go into `bin\`.
2. Start Terraria or tModLoader, then run `bin\TerraSharp.Injector.exe`.
@@ -51,9 +51,11 @@ The same injector works with both games. Keep it beside the DLLs produced by the
You can also have the menu load when the game starts. Close the game, run `autoload.bat` and choose Install.
The script uses the default Steam folders under `Program Files (x86)`. For games installed elsewhere, set the `TerrariaDir` or `TModLoaderDir` environment variable to the game's folder before running it.
For Terraria, the script installs the DLL and adds its AppDomainManager entries to the existing game configuration. Uninstall removes those entries and the DLL while preserving other settings. Installation stops if another AppDomainManager is already configured. A game verify/update on Steam may remove the configuration; run the installer again if the menu stops loading.
For tModLoader, the script prints a launch option to paste into Steam under **Properties > General > Launch Options**. Steam also uses `autoload.bat` as the Windows launcher: it sets `DOTNET_STARTUP_HOOKS`, preserves any existing hooks and runs Steam's game command. Keep the project folder in place while using this option. When updating from an earlier version, run Install again and replace the launch option. Remove the option to stop auto-loading. It does not appear in tModLoader's mod list.
For tModLoader, the script prints a launch option to paste into Steam under **Properties > General > Launch Options**. Steam also uses `autoload.bat` as the Windows launcher: it sets `DOTNET_STARTUP_HOOKS`, preserves any existing hooks and runs Steam's game command. Keep the TerraSharp folder in place while using this option. When updating from an earlier version, run Install again and replace the launch option. Remove the option to stop auto-loading. It does not appear in tModLoader's mod list.
## Settings