chore(windows): persistent build env + one-call host/web deploy scripts
apple / swift (push) Successful in 54s
ci / rust (push) Failing after 30s
ci / web (push) Successful in 37s
ci / docs-site (push) Successful in 57s
android / android (push) Successful in 3m24s
deb / build-publish (push) Successful in 2m19s
decky / build-publish (push) Successful in 12s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 3s
ci / bench (push) Successful in 4m39s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m19s
docker / deploy-docs (push) Successful in 6s
apple / swift (push) Successful in 54s
ci / rust (push) Failing after 30s
ci / web (push) Successful in 37s
ci / docs-site (push) Successful in 57s
android / android (push) Successful in 3m24s
deb / build-publish (push) Successful in 2m19s
decky / build-publish (push) Successful in 12s
docker / build-push (--build-arg FEDORA_VERSION=44, ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora44-rpm) (push) Successful in 4s
docker / build-push (., web/Dockerfile, punktfunk-web) (push) Successful in 4s
docker / build-push (ci, ci/fedora-rpm.Dockerfile, punktfunk-fedora-rpm) (push) Successful in 3s
docker / build-push (ci, ci/rust-ci.Dockerfile, punktfunk-rust-ci) (push) Successful in 4s
docker / build-push (docs-site, docs-site/Dockerfile, punktfunk-docs) (push) Successful in 3s
ci / bench (push) Successful in 4m39s
rpm / build-publish (bazzite, punktfunk-fedora-rpm) (push) Successful in 8m24s
rpm / build-publish (fedora-44, punktfunk-fedora44-rpm) (push) Successful in 8m19s
docker / deploy-docs (push) Successful in 6s
scripts/windows/: setup-build-env.ps1 persists the NVENC build env (Machine scope: PUNKTFUNK_NVENC_LIB_DIR, LIBCLANG_PATH, CMAKE_POLICY_VERSION_MINIMUM -- no FFMPEG_DIR, the nvenc build doesn't link libavcodec). deploy-host.ps1 rebuilds --release --features nvenc and restarts the PunktfunkHost service with .bak rollback on build/start failure. build-web.ps1 rebuilds the Nitro web console (bun build, node runtime) and restarts the PunktfunkWeb task. README documents the flow -- a redeploy is now a single script call. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,27 @@
|
||||
<#
|
||||
Persist the punktfunk Windows-host build environment (Machine scope, run once, elevated).
|
||||
|
||||
After this, deploy-host.ps1 needs only the VS toolchain (it loads vcvars64.bat itself).
|
||||
These are BUILD-time vars; runtime config lives in C:\ProgramData\punktfunk\host.env.
|
||||
|
||||
powershell -ExecutionPolicy Bypass -File scripts\windows\setup-build-env.ps1
|
||||
#>
|
||||
$ErrorActionPreference = 'Stop'
|
||||
|
||||
$admin = ([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()
|
||||
).IsInRole([Security.Principal.WindowsBuiltinRole]::Administrator)
|
||||
if (-not $admin) { throw "Run elevated (Machine-scope env requires Administrator)." }
|
||||
|
||||
# NVENC import lib (nvencodeapi.lib); libclang for bindgen; cmake policy floor for audiopus_sys.
|
||||
$vars = [ordered]@{
|
||||
'PUNKTFUNK_NVENC_LIB_DIR' = 'C:\Users\Public\nvenc'
|
||||
'LIBCLANG_PATH' = 'C:\Program Files\LLVM\bin'
|
||||
'CMAKE_POLICY_VERSION_MINIMUM' = '3.5'
|
||||
# FFMPEG_DIR is only needed for the `amf-qsv` feature (libavcodec). The RTX box builds
|
||||
# `--features nvenc`, which does NOT link FFmpeg, so it is intentionally left unset.
|
||||
}
|
||||
foreach ($k in $vars.Keys) {
|
||||
[Environment]::SetEnvironmentVariable($k, $vars[$k], 'Machine')
|
||||
Write-Host ("set (Machine) {0} = {1}" -f $k, $vars[$k])
|
||||
}
|
||||
Write-Host "Done. Open a fresh shell (or reboot) for these to be inherited by new processes."
|
||||
Reference in New Issue
Block a user