feat(wasm-dom): Phase 7 plumbing — KiCad DOM-flavor build + test pipeline

WX_PORT=dom flows host → docker container → build scripts:
build-kicad-target.sh selects wxwidgets-dom + kicad-<app>-dom trees;
docker/build.sh passes the env through, copies outputs to output-dom/
incl. wx-dom.js, and post-processes there; build-wxuniversal-wasm.sh
honors WX_PORT and accepts --no-clean again (the kicad pipeline calls it
with that flag — Phase 1's stricter parser had broken the canvas docker
path). setup-kicad-wasm.sh syncs DOM bundles into tests/apps-dom/kicad
and injects the wx-dom.js script tag into the kicad pages;
playwright-kicad.config.ts serves apps-dom under WX_PORT=dom.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-06-11 00:19:53 +02:00
commit 74c392f88f
5 changed files with 84 additions and 24 deletions

View file

@ -31,13 +31,17 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(dirname "$SCRIPT_DIR")"
WX_SOURCE="$PROJECT_ROOT/wxwidgets"
# Parse arguments: --clean and/or --dom, in any order
# Parse arguments: --clean, --no-clean (default; kept for the kicad
# pipeline's explicit call) and/or --dom, in any order. WX_PORT=dom env is
# equivalent to --dom so the flavor can flow through the docker pipeline.
CLEAN_BUILD=0
DOM_BUILD=0
[ "${WX_PORT:-}" = "dom" ] && DOM_BUILD=1
for arg in "$@"; do
case "$arg" in
--clean) CLEAN_BUILD=1 ;;
--dom) DOM_BUILD=1 ;;
--clean) CLEAN_BUILD=1 ;;
--no-clean) CLEAN_BUILD=0 ;;
--dom) DOM_BUILD=1 ;;
*) echo "Unknown argument: $arg"; exit 1 ;;
esac
done

View file

@ -73,10 +73,19 @@ source "${SCRIPT_DIR}/../common/functions.sh"
source "${SCRIPT_DIR}/../common/stages.sh"
KICAD_DIR="${PROJECT_ROOT}/kicad"
KICAD_BUILD="${BUILD_ROOT}/kicad-${APP_NAME}"
KICAD_STAMP="${BUILD_ROOT}/stamps/kicad-${APP_NAME}.stamp"
WASM_LAYER="${PROJECT_ROOT}/wasm"
WX_BUILD="${BUILD_ROOT}/wxwidgets-universal"
# WX_PORT=dom links against the DOM (non-universal) wxWidgets build and
# keeps its KiCad build tree separate from the canvas one.
if [ "${WX_PORT:-}" = "dom" ]; then
KICAD_BUILD="${BUILD_ROOT}/kicad-${APP_NAME}-dom"
KICAD_STAMP="${BUILD_ROOT}/stamps/kicad-${APP_NAME}-dom.stamp"
WX_BUILD="${BUILD_ROOT}/wxwidgets-dom"
else
KICAD_BUILD="${BUILD_ROOT}/kicad-${APP_NAME}"
KICAD_STAMP="${BUILD_ROOT}/stamps/kicad-${APP_NAME}.stamp"
WX_BUILD="${BUILD_ROOT}/wxwidgets-universal"
fi
# Parse arguments - incremental build by default (optimized for development)
NO_CLEAN=1