diff --git a/docker/build.sh b/docker/build.sh index 28acda3..021ad81 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -183,7 +183,7 @@ compile_app() { local out_dir="output" local kicad_build="kicad-${app}" if [[ "${WX_PORT:-}" == "dom" ]]; then - out_dir="output-dom" + out_dir="output/dom" kicad_build="kicad-${app}-dom" fi diff --git a/scripts/kicad/build-kicad-target.sh b/scripts/kicad/build-kicad-target.sh index d9dfb97..398fb35 100755 --- a/scripts/kicad/build-kicad-target.sh +++ b/scripts/kicad/build-kicad-target.sh @@ -396,6 +396,20 @@ emcmake cmake "${KICAD_DIR}" \ -DHAVE_STRCASECMP=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) # Exposes KiCad objects to JavaScript for future Pyodide integration. # When no app-specific source exists, build an empty object so the linker line diff --git a/tests/scripts/setup-kicad-wasm.sh b/tests/scripts/setup-kicad-wasm.sh index a7058a1..7bf7538 100755 --- a/tests/scripts/setup-kicad-wasm.sh +++ b/tests/scripts/setup-kicad-wasm.sh @@ -15,7 +15,7 @@ PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)" # WX_PORT=dom into output-dom/) from tests/apps-dom/kicad. if [ "${WX_PORT:-}" = "dom" ]; then KICAD_TEST="$PROJECT_ROOT/tests/apps-dom/kicad" - OUTPUT_DIR="$PROJECT_ROOT/output-dom" + OUTPUT_DIR="$PROJECT_ROOT/output/dom" KICAD_BUILD_SUFFIX="-dom" else KICAD_TEST="$PROJECT_ROOT/tests/apps/kicad" diff --git a/wxwidgets b/wxwidgets index 34aa940..7979b03 160000 --- a/wxwidgets +++ b/wxwidgets @@ -1 +1 @@ -Subproject commit 34aa940aa7c1f9d82d03ec5fe50df16374a32670 +Subproject commit 7979b030a38b28deb9adfe3178e391a03dcc0a4a