From ea5dc26a96daf4d136f9b746f2210e85cd75a636 Mon Sep 17 00:00:00 2001 From: Viktor Vaczi Date: Sat, 3 Jan 2026 11:55:54 +0100 Subject: [PATCH] Restore elementtracker.h and add build logging MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Restore missing elementtracker.h in wxWidgets (required for E2E tests) - Add automatic log file redirection for build scripts 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- docker/build.sh | 3 ++ scripts/build-wasm-test.sh | 3 ++ scripts/build-wxuniversal-wasm.sh | 3 ++ scripts/common/logging.sh | 48 +++++++++++++++++++++++++++++++ wxwidgets | 2 +- 5 files changed, 58 insertions(+), 1 deletion(-) create mode 100644 scripts/common/logging.sh diff --git a/docker/build.sh b/docker/build.sh index 30faf1d..e77270b 100755 --- a/docker/build.sh +++ b/docker/build.sh @@ -1,5 +1,8 @@ #!/bin/bash # Build KiCad WASM inside Docker container, then apply asyncify on host + +# Redirect all output to a log file (re-execs script with redirection) +source "$(dirname "$0")/../scripts/common/logging.sh" # # The build is split into two phases: # 1. Docker: Compile KiCad to WASM (without asyncify) diff --git a/scripts/build-wasm-test.sh b/scripts/build-wasm-test.sh index a672e82..c4799ae 100755 --- a/scripts/build-wasm-test.sh +++ b/scripts/build-wasm-test.sh @@ -1,5 +1,8 @@ #!/bin/bash # Build the wxWidgets WASM test applications + +# Redirect all output to a log file (re-execs script with redirection) +source "$(dirname "$0")/common/logging.sh" # This script creates library symlinks and builds the test apps # # Usage: diff --git a/scripts/build-wxuniversal-wasm.sh b/scripts/build-wxuniversal-wasm.sh index 7091c2b..978b942 100755 --- a/scripts/build-wxuniversal-wasm.sh +++ b/scripts/build-wxuniversal-wasm.sh @@ -1,5 +1,8 @@ #!/bin/bash # Build wxWidgets with wxUniversal for WebAssembly + +# Redirect all output to a log file (re-execs script with redirection) +source "$(dirname "$0")/common/logging.sh" # This builds the GUI-enabled wxWidgets needed for KiCad # # Prerequisites: diff --git a/scripts/common/logging.sh b/scripts/common/logging.sh new file mode 100644 index 0000000..70c35ff --- /dev/null +++ b/scripts/common/logging.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Automatic log file redirection for build scripts +# +# Source this at the top of build scripts to redirect all output to a log file. +# Uses self-re-exec pattern: the script re-launches itself with external redirection, +# which reliably captures ALL output including docker compose TTY output. +# +# Detection logic: +# - If KICAD_LOG_NESTED=1 (re-exec'd or nested call) → output normally +# - If inside Docker (/workspace exists) → output normally +# - Otherwise → re-exec with output redirected to logs/