refactor(webgl): Move WebGL GAL from test harness to KiCad source tree

Migrate WebGL GAL implementation from tests/gal-regression/wasm/webgl/
to kicad/common/gal/webgl/ and kicad/include/gal/webgl/.

This integrates the WebGL GAL properly into KiCad's build system:
- Update test Makefile to use sources from kicad/ instead of local copies
- Update build scripts for new source locations
- Add test-gal-webgl.sh script for running WebGL regression tests
- Update Docker to Emscripten 4.0.22

The WebGL GAL passes all 28 regression tests (matching baseline).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
Viktor Vaczi 2026-01-10 13:15:58 +01:00
commit 37d973f064
50 changed files with 403 additions and 28977 deletions

View file

@ -320,24 +320,18 @@ build_webgl() {
log_header "Building WebGL Test"
if [ ! -f "$SCRIPT_DIR/build-gal-webgl-test.sh" ]; then
log_step "WebGL build script not found (Phase 2)"
return 0
fi
# Check if Emscripten is available
if ! command -v emcmake &> /dev/null; then
log_step "Emscripten not available - WebGL build requires emsdk or Docker"
log_step "Skipping WebGL build (run inside Docker or activate emsdk first)"
log_step "WebGL build script not found"
return 0
fi
# Delegate to build-gal-webgl-test.sh (handles Emscripten check, clean build, etc.)
log_step "Running scripts/build-gal-webgl-test.sh..."
if "$SCRIPT_DIR/build-gal-webgl-test.sh"; then
log_success "WebGL build succeeded"
else
log_error "WebGL build failed (Emscripten may need Python 3.10+)"
log_step "Try running inside Docker or with a compatible emsdk"
log_error "WebGL build failed"
log_step "Check if KiCad is built first: docker/build.sh"
return 0 # Don't fail the whole test, just skip WebGL
fi
}