RynthCore/BUILD.md
tombohar 36e8208caa Add Plugins tab, remove WinForms launcher, add BUILD.md
- Add Plugins tab to Avalonia launcher with add/remove plugin DLL management
- Plugin paths sync to engine.json for runtime loading
- Engine loads plugins from custom DLL paths via EngineSettings
- Remove defunct WinForms launcher (RynthCore.App project, MainForm, Program)
- Shared source files remain in src/RynthCore.App for Avalonia and Engine
- Add BUILD.md with full publish/deploy instructions for all components

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-16 17:08:26 -04:00

6.2 KiB

Build & Deploy

RynthCore is the injection framework. RynthSuite (separate repo) contains the plugins that run on top of it.

Prerequisites

  • Windows 10/11
  • .NET 9 SDK (x86)
  • Visual Studio 2022 Build Tools with the .NET desktop and C++ desktop workloads (required by the NativeAOT ILC linker)
  • Asheron's Call client installed

Projects

Project Type Output
src/RynthCore.Engine NativeAOT x86 DLL Injected into acclient.exe — hooks D3D9 EndScene, hosts ImGui overlay
src/RynthCore.Injector Console app Injects the engine DLL via LoadLibrary + CreateRemoteThread
src/RynthCore.App.Avalonia Avalonia desktop app Desktop launcher — server/account profiles, plugin management, launches + injects
src/RynthCore.PluginSdk Class library Public host API surface for plugins
src/RynthCore.PluginCore Class library Runtime helpers for plugin bootstrap/lifecycle
src/RynthCore.App Shared source Model and service files linked by both the Avalonia app and the Engine (not a standalone project)

Publish Commands

Launcher (Avalonia)

cd C:\Projects\RynthCore\src\RynthCore.App.Avalonia
dotnet build -c Release

Output: bin\Release\net9.0-windows7.0\RynthCore.App.Avalonia.dll

Engine (NativeAOT — slow first build, ~2 min)

Requires vswhere.exe on PATH. If the build fails with 'vswhere.exe' is not recognized, add the VS Installer directory:

set PATH=%PATH%;C:\Program Files (x86)\Microsoft Visual Studio\Installer
cd C:\Projects\RynthCore\src\RynthCore.Engine
dotnet publish -c Release

Output: bin\Release\net9.0-windows\win-x86\publish\RynthCore.Engine.dll (~26 MB)

RynthAi Plugin (NativeAOT — separate repo)

Always clean first — incremental builds can silently skip NativeAOT and produce a stale DLL.

cd C:\Projects\RynthSuite\Plugins\RynthCore.Plugin.RynthAi
rmdir /s /q obj\Release bin\Release 2>nul
dotnet publish -c Release

Output: bin\Release\net9.0-windows\win-x86\publish\RynthCore.Plugin.RynthAi.dll (~7 MB)

Deploy

Directory Layout

C:\Games\RynthCore\
├── RynthCore.exe                 ← Launcher (renamed from RynthCore.App.Avalonia.exe)
├── RynthCore.App.Avalonia.dll    ← Launcher assembly
├── RynthCore.App.Avalonia.deps.json
├── RynthCore.App.Avalonia.runtimeconfig.json
├── Avalonia.*.dll                ← Avalonia framework DLLs
└── Runtime\
    ├── RynthCore.Engine.dll      ← Engine (NativeAOT x86)
    ├── minhook.x86.dll           ← MinHook (x86), preloaded by EntryPoint
    ├── cimgui.dll                ← ImGui C bindings (x86, docking branch)
    └── Plugins\
        └── *.dll                 ← Plugin DLLs (built-in directory)

C:\Games\RynthSuite\RynthAi\
├── RynthCore.Plugin.RynthAi.dll  ← RynthAi plugin (recommended deploy location)
├── NavProfiles\                  ← Navigation profiles
├── LootProfiles\                 ← Loot profiles
└── Metas\                        ← Meta files

Deploy Launcher

The launcher can stay open while you replace its DLL.

copy src\RynthCore.App.Avalonia\bin\Release\net9.0-windows7.0\RynthCore.App.Avalonia.dll C:\Games\RynthCore\
copy src\RynthCore.App.Avalonia\bin\Release\net9.0-windows7.0\RynthCore.App.Avalonia.deps.json C:\Games\RynthCore\

Restart the launcher after deploying.

Deploy Engine

AC must be closed — the running client holds a file lock on the engine DLL.

copy src\RynthCore.Engine\bin\Release\net9.0-windows\win-x86\publish\RynthCore.Engine.dll C:\Games\RynthCore\Runtime\

Deploy RynthAi Plugin

AC can stay open — plugins are shadow-copied at load time, so the file is not locked.

The recommended deploy location is C:\Games\RynthSuite\RynthAi\ — alongside the plugin's data files. Add this path in the launcher's Plugins tab. Paths are persisted to %AppData%\RynthCore\engine.json.

copy C:\Projects\RynthSuite\Plugins\RynthCore.Plugin.RynthAi\bin\Release\net9.0-windows\win-x86\publish\RynthCore.Plugin.RynthAi.dll C:\Games\RynthSuite\RynthAi\

Alternatively, deploy to the engine's built-in plugin directory:

copy ... C:\Games\RynthCore\Runtime\Plugins\

After deploying a plugin with AC running, click RL on the RynthCore overlay bar to hot-reload.

Verify

File Expected Size If Wrong
Runtime\RynthCore.Engine.dll ~26 MB NativeAOT didn't run — check for Generating native code in build output
RynthSuite\RynthAi\RynthCore.Plugin.RynthAi.dll ~7 MB If ~1 MB, you built the stale stub at C:\Projects\RynthCore\Plugins\ instead of C:\Projects\RynthSuite\Plugins\
Runtime\cimgui.dll ~1.5 MB Must match ImGui.NET 1.91.6.1

To confirm NativeAOT actually ran, check that .lib and .exp files exist alongside the DLL in the native\ directory.

Gotchas

  • dotnet publish, not dotnet build for Engine and Plugins. NativeAOT only runs during dotnet publish. A dotnet build produces a valid managed DLL that compiles fine but has no unmanaged exports and will be silently ignored by the engine. The Avalonia launcher is the exception — dotnet build is fine since it's a normal .NET app.
  • Clean before plugin publish. Incremental NativeAOT builds can silently reuse stale output. Delete obj\Release and bin\Release before every publish to guarantee a fresh compile.
  • Engine deploy path is Runtime\, not C:\Games\RynthCore\. The injector resolves Runtime\RynthCore.Engine.dll by default.
  • Two RynthAi projects exist. The real plugin is at C:\Projects\RynthSuite\Plugins\RynthCore.Plugin.RynthAi\. There is a stale stub at C:\Projects\RynthCore\Plugins\RynthCore.Plugin.RynthAi\ — do not build or deploy from there.
  • Engine publish copies a stale plugin into the engine's publish output. Always deploy the plugin from the RynthSuite path last.
  • cimgui.dll version must match ImGui.NET NuGet. Post-1.90 struct layouts changed. A mismatched cimgui.dll causes DisplaySize = <1, 1> or font crashes.
  • vswhere.exe must be on PATH for NativeAOT link step. Add C:\Program Files (x86)\Microsoft Visual Studio\Installer to PATH if missing.