feat(wasm-dom): Phase 7 — KiCad pcbnew builds and runs on the DOM port
Pipeline: lexer generation (pcbcommon) ordered before the embind
pre-compile — a fresh-build-tree chicken-and-egg any new volume would
hit (generated pcb_lexer.h was included via -I${KICAD_BUILD}/common
before anything generated it). DOM flavor outputs flow through the
host-mounted output/dom/. pcbnew e2e on DOM: editor loads fully (layer
manager, toolbars, WebGL viewport, registry metrics), draw-lines test
passes; the header pixel-reference assertion fails as expected (native
DOM styling vs univ pixels) — port-aware references pending.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
parent
74c392f88f
commit
dba03b237f
4 changed files with 17 additions and 3 deletions
|
|
@ -183,7 +183,7 @@ compile_app() {
|
||||||
local out_dir="output"
|
local out_dir="output"
|
||||||
local kicad_build="kicad-${app}"
|
local kicad_build="kicad-${app}"
|
||||||
if [[ "${WX_PORT:-}" == "dom" ]]; then
|
if [[ "${WX_PORT:-}" == "dom" ]]; then
|
||||||
out_dir="output-dom"
|
out_dir="output/dom"
|
||||||
kicad_build="kicad-${app}-dom"
|
kicad_build="kicad-${app}-dom"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -396,6 +396,20 @@ emcmake cmake "${KICAD_DIR}" \
|
||||||
-DHAVE_STRCASECMP=1 \
|
-DHAVE_STRCASECMP=1 \
|
||||||
-DHAVE_STRNCASECMP=1
|
-DHAVE_STRNCASECMP=1
|
||||||
|
|
||||||
|
# Step 7.05: Generated lexer headers (pcb_lexer.h & co) are emitted by
|
||||||
|
# make_lexer custom commands attached to the consuming library target. The
|
||||||
|
# embind compile below includes them via -I${KICAD_BUILD}/common, so on a
|
||||||
|
# FRESH build tree that library must build first (step 8 depends on it
|
||||||
|
# anyway — this only reorders work, it doesn't add any).
|
||||||
|
case "${APP_NAME}" in
|
||||||
|
pcbnew)
|
||||||
|
if [ ! -f "${KICAD_BUILD}/common/pcb_lexer.h" ]; then
|
||||||
|
log_info "Generating lexers (building pcbcommon before embind)..."
|
||||||
|
( cd "${KICAD_BUILD}" && emmake make -j${JOBS} pcbcommon )
|
||||||
|
fi
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
|
||||||
# Step 7.1: Compile Embind bindings (after CMake so config.h exists)
|
# Step 7.1: Compile Embind bindings (after CMake so config.h exists)
|
||||||
# Exposes KiCad objects to JavaScript for future Pyodide integration.
|
# Exposes KiCad objects to JavaScript for future Pyodide integration.
|
||||||
# When no app-specific source exists, build an empty object so the linker line
|
# When no app-specific source exists, build an empty object so the linker line
|
||||||
|
|
|
||||||
|
|
@ -15,7 +15,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||||
# WX_PORT=dom into output-dom/) from tests/apps-dom/kicad.
|
# WX_PORT=dom into output-dom/) from tests/apps-dom/kicad.
|
||||||
if [ "${WX_PORT:-}" = "dom" ]; then
|
if [ "${WX_PORT:-}" = "dom" ]; then
|
||||||
KICAD_TEST="$PROJECT_ROOT/tests/apps-dom/kicad"
|
KICAD_TEST="$PROJECT_ROOT/tests/apps-dom/kicad"
|
||||||
OUTPUT_DIR="$PROJECT_ROOT/output-dom"
|
OUTPUT_DIR="$PROJECT_ROOT/output/dom"
|
||||||
KICAD_BUILD_SUFFIX="-dom"
|
KICAD_BUILD_SUFFIX="-dom"
|
||||||
else
|
else
|
||||||
KICAD_TEST="$PROJECT_ROOT/tests/apps/kicad"
|
KICAD_TEST="$PROJECT_ROOT/tests/apps/kicad"
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
Subproject commit 34aa940aa7c1f9d82d03ec5fe50df16374a32670
|
Subproject commit 7979b030a38b28deb9adfe3178e391a03dcc0a4a
|
||||||
Loading…
Reference in a new issue