scripts/payload_build.py¶
Build helper for the Electron backend sidecar distributed as payload-<triple>.zip on GitHub releases (tags v*).
Role¶
- Runs PyInstaller in one-folder mode (
--onedir) with--name entry. - Bundles the built web UI static assets under
taskclf/ui/static(requiresmake ui-buildfirst). - Collects
taskclfPython code via--collect-submodules taskclfonly. It does not use--collect-all taskclf, because that would sweep the entiresrc/taskclftree (includingui/frontend/node_modules, hundreds of MB of dev tooling) into the sidecar. - Collects third-party runtime packages individually, including the TOML writer dependency
tomli_w, so config loading does not fail in the packaged sidecar. - After PyInstaller runs, the build strips
taskclf/ui/frontendfrom the one-folder output if present, and fails if a raw dev frontend tree ornode_modulespaths leak into_internal/. - Stages the one-folder output into
build/payload/backend/(executableentryorentry.exeplus_internal/). - Writes
build/payload-<triple>.zipwith a top-levelbackend/directory.
Shipped UI: only the compiled static assets under taskclf/ui/static. Not shipped: SolidJS sources, package.json, lockfiles, or node_modules under taskclf/ui/frontend.
The layout must stay compatible with getActivePayloadBackendPath() in electron/updater.ts (backend/entry or backend/entry.exe).
Usage¶
From the repo root, after make ui-build:
Or:
--triple overrides the zip basename (defaults to scripts/host_target_triple.py).
See also¶
ui/electron_shell— manifest and launcher behavior- Repository file
scripts/host_target_triple.py— LLVM-style triple strings (must matchelectron/updater.ts)