- 13 modified / 8 added / 1 deleted per CHANGES.json (author package 76bc120b) - docs/requirements v1.10 + prototypes/hel-799 + PROVENANCE from bundle, verified byte-identical to63799f0- AGENTS.md + scripts/check_requirements.py restored from governance commit63799f0Co-authored-by: multica-agent <github@multica.ai>
18 lines
1.1 KiB
PowerShell
18 lines
1.1 KiB
PowerShell
# Builds the single offline index.html (Windows PowerShell 5.1; no Python or Node needed).
|
|
# Inputs: src/shell.html, src/room.css, src/ambient.js, src/scene.js, src/talk.js and the two approved stills in web/public/assets.
|
|
$root = $PSScriptRoot
|
|
$src = Join-Path $root 'src'
|
|
$utf8 = New-Object System.Text.UTF8Encoding($false)
|
|
$read = { param($p) [System.IO.File]::ReadAllText((Join-Path $src $p), $utf8) }
|
|
$html = & $read 'shell.html'
|
|
$html = $html.Replace('{{STYLE}}', (& $read 'room.css'))
|
|
$html = $html.Replace('{{SCRIPT}}', (& $read 'ambient.js') + "`n" + (& $read 'scene.js') + "`n" + (& $read 'talk.js'))
|
|
$assets = Join-Path (Split-Path (Split-Path $root)) 'web\public\assets'
|
|
foreach ($pair in @(@('ROOM', 'her-room.jpg'), @('TALK', 'her-talk.jpg'))) {
|
|
$b64 = [Convert]::ToBase64String([System.IO.File]::ReadAllBytes((Join-Path $assets $pair[1])))
|
|
$html = $html.Replace('{{' + $pair[0] + '}}', 'data:image/jpeg;base64,' + $b64)
|
|
}
|
|
if ($html.Contains('{{')) { throw 'Unreplaced placeholder' }
|
|
[System.IO.File]::WriteAllText((Join-Path $root 'index.html'), $html, $utf8)
|
|
"Built offline index.html ($($utf8.GetByteCount($html)) bytes)"
|