railroader-setons-special-s.../dist/build-local.ps1
seton 5e18cb84a1 MCP: localhost agent server with reloadable S3.Mcp.Tools plugin pack
Loopback MCP host with observe/control/develop gates and a hot-reload
tools DLL. Default token is local-dev only. Leave the module off unless
you are driving S3 from an agent.
2026-09-11 15:19:24 -04:00

38 lines
1.5 KiB
PowerShell

# Build S³ and install it straight into the local game copy for testing.
# .\dist\build-local.ps1
# .\dist\build-local.ps1 -Wait
# .\dist\build-local.ps1 -ToolsOnly
# .\dist\build-local.ps1 -GameDir "X:\path\to\Railroader" -Configuration Debug
#
# -Wait: build now, then poll until Railroader releases Mods\S3\*.dll and copy.
# Use this when the game is open (S3Native.dll stays locked until quit).
#
# -ToolsOnly: rebuild the reloadable MCP tools DLL and copy it to
# Mods\S3\plugins\ while the game is running. The MCP host auto-reloads it.
param(
[string]$Configuration = "Release",
[string]$GameDir = "D:\Seton\SteamApps\steamapps\common\Railroader",
[switch]$Wait,
[switch]$ToolsOnly
)
. (Join-Path $PSScriptRoot "build-common.ps1")
if (-not (Test-Path $GameDir)) { throw "GameDir not found: $GameDir" }
if ($ToolsOnly) {
Invoke-McpToolsBuild -Configuration $Configuration -GameDir $GameDir
Write-Host "=== MCP tools copied to $GameDir\Mods\S3\plugins ===" -ForegroundColor Green
Write-Host " Host auto-reloads S3.Mcp.Tools.dll (or /s3mcp reload)."
return
}
$managed = Invoke-ManagedBuild -Configuration $Configuration -GameDir $GameDir
$native = Invoke-NativeBuild -Configuration $Configuration
$modDir = Join-Path $GameDir "Mods\$ModId"
New-ModLayout -DestModDir $modDir -ManagedDll $managed -NativeDll $native -Wait:$Wait
Invoke-McpToolsBuild -Configuration $Configuration -GameDir $GameDir
Write-Host "=== Installed to $modDir ===" -ForegroundColor Green