# freeze.ps1 -- PyInstaller onefile of live_bridge.py -> dist\renderer.exe, # the deployable render bridge (package.ps1 bundles it automatically when # present). pod-launch invokes it as: renderer.exe tcp:8621 . # # Needs the Windows CPython (py -3.13) with the render-bridge wheels plus # pyinstaller: py -3.13 -m pip install numpy pygame-ce moderngl pillow pyinstaller # # Dave's modules (vrboard/vrview/vrview_gl) come from ..\..\dpl3-revive\patha # and are baked into the exe; _backend's runtime sys.path insert becomes a # harmless no-op in the frozen build. glcontext is moderngl's dynamically # imported binary backend -- PyInstaller misses it without --collect-all. # First frozen + live-verified (GL backend) 2026-07-10. $ErrorActionPreference = 'Stop' Set-Location $PSScriptRoot py -3.13 -m PyInstaller --onefile --noconsole --name renderer ` --paths ..\..\dpl3-revive\patha ` --hidden-import vrview_gl --hidden-import vrview --hidden-import vrboard ` --collect-all glcontext ` --distpath .\dist ` --workpath (Join-Path $env:TEMP 'pyi-renderer') ` --specpath (Join-Path $env:TEMP 'pyi-renderer') ` live_bridge.py if ($LASTEXITCODE -ne 0) { throw "PyInstaller failed" } Write-Host "[freeze] dist\renderer.exe ready ($('{0:N1} MB' -f ((Get-Item .\dist\renderer.exe).Length / 1MB)))"