Files
TeslaSuite/vPOD/pack.ps1
T
CydandClaude Fable 5 cb7c655530 Promote vPOD to a top-level project (Console/vPOD -> vPOD/)
vPOD has outgrown its home inside the console's folder: it now emulates both
halves of a pod (Munga game client + TeslaLauncher service / provisioning),
so it lives at the repo root beside Console/, Launcher/, Contract/ and
SecureConfig/, like the peer it has become.

Accompanying changes: project references rebased (Contract, SecureConfig,
the console's vendored Munga Net.dll), solution + DiffTests reference paths,
the console csproj's now-obsolete vPOD source exclusion removed, and the
root README / Apps.xml / vPOD README path mentions updated. pack.ps1 is
self-relative and now emits vPOD/dist/vPOD.zip.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-10 09:52:59 -05:00

40 lines
1.6 KiB
PowerShell

# Builds the vPOD install package for the console's Manage Site -> Install Product.
#
# The launcher extracts the zip's entries directly into C:\Games\, so the archive
# root must contain a `vPOD\` folder holding vPOD.exe + its dependencies. The
# console's Apps.xml vPOD product then launches C:\Games\vPOD\vPOD.exe.
#
# Usage: pwsh -File pack.ps1 (Release, default)
# pwsh -File pack.ps1 -Config Debug
param([string]$Config = 'Release')
$ErrorActionPreference = 'Stop'
$root = Split-Path -Parent $MyInvocation.MyCommand.Path
$bin = Join-Path $root "bin\$Config\net48"
$distDir = Join-Path $root 'dist'
$stage = Join-Path $distDir 'vPOD' # -> C:\Games\vPOD on the pod
$zipPath = Join-Path $distDir 'vPOD.zip'
Write-Host "Building vPOD ($Config)..."
dotnet build (Join-Path $root 'vPOD.csproj') -c $Config --nologo -v minimal | Out-Null
if (-not (Test-Path (Join-Path $bin 'vPOD.exe'))) {
throw "Build output not found: $bin\vPOD.exe"
}
# Fresh stage dir.
if (Test-Path $stage) { Remove-Item $stage -Recurse -Force }
New-Item -ItemType Directory -Force $stage | Out-Null
# The runtime payload: the exe + the vendored Munga Net.dll (copied local by the
# csproj) + config. No pdb/xml.
Get-ChildItem $bin -File |
Where-Object { $_.Extension -in '.exe', '.dll', '.config' } |
ForEach-Object { Copy-Item $_.FullName $stage }
if (Test-Path $zipPath) { Remove-Item $zipPath -Force }
Compress-Archive -Path $stage -DestinationPath $zipPath -Force
Write-Host "Packaged: $zipPath"
Get-ChildItem $stage | Select-Object Name, Length | Format-Table -AutoSize