Files
josh 1121b44857 Organize scripts and add TWS plugins with HTTP timeouts
Vendor pinned T5 and T6 plugin sources under the new plugins layout. Add native HTTP deadlines, status and timing diagnostics, telemetry integration, and build/test tooling.
2026-10-09 11:02:20 -04:00

27 lines
1.1 KiB
PowerShell

param(
[ValidateSet('t5', 't6', 'all')]
[string]$Game = 'all',
[ValidateSet('Debug', 'Release')]
[string]$Configuration = 'Release'
)
$ErrorActionPreference = 'Stop'
$repo = Split-Path -Parent $PSScriptRoot
$games = if ($Game -eq 'all') { @('t5', 't6') } else { @($Game) }
foreach ($current in $games) {
& python (Join-Path $PSScriptRoot 'fetch_plugin_deps.py') $current
if ($LASTEXITCODE -ne 0) { throw "Dependency restore failed for $current" }
$plugin = Join-Path $repo "$current/plugins/tws-$current-gsc-utils"
Push-Location $plugin
try {
& .\tools\premake5.exe vs2022
if ($LASTEXITCODE -ne 0) { throw "Project generation failed for $current" }
& msbuild /m /v:minimal "/p:Configuration=$Configuration" /p:PlatformTarget=x86 "build/tws-$current-gsc-utils.sln"
if ($LASTEXITCODE -ne 0) { throw "Build failed for $current" }
$binary = Join-Path $plugin "build/bin/$Configuration/tws-$current-gsc-utils.dll"
if (!(Test-Path -LiteralPath $binary)) { throw "Missing output: $binary" }
Write-Output "Built $binary"
} finally {
Pop-Location
}
}