native-gateway-from-source
Native Gateway from source
scripts\Build-NativeGatewayFromSource.ps1 builds OpenClaw from source, packages it with
openclaw/openclaw-windows-packaging, and registers a Developer Mode loose package named
OpenClawFoundation.OpenClawGateway-<patch> with aliases openclaw-<patch>.exe and
clawctl-<patch>.exe. A "patch" is a side-by-side identity slot (upstream
Deploy-LocalPackage.ps1 -Patch), not a version: each patch has its own app data, isolated
agent account, and Gateway port, and never touches the Store package.
Companion uses the patch only when started with OPENCLAW_NATIVE_GATEWAY_DEV_PATCH=<patch>.
Without it, Companion resolves the Store package and installs it with WinGet only when
missing. See docs/ONBOARDING_WIZARD.md and docs/ARCHITECTURE.md (native Gateway section).
Prerequisites
Check before building; the script fails fast on most of these: