Commit graph

747 commits

Author SHA1 Message Date
Viktor Vaczi
af2adda002 Improve build system with debug symbols, clean modes, and parallel jobs
- Add build.md documentation for the WASM build system
- Default to debug builds with -gsource-map for WASM debugging
- Add --release flag to disable debug symbols
- Add --clean flag for full rebuild (deps + wxWidgets + KiCad)
- Add -j N flag for parallel compilation (default: 1 for sequential)
- Update Docker memory limit to 32GB
- Propagate DEBUG_BUILD and JOBS to all dependency scripts

Build modes:
- ./docker/build.sh --clean -j8  (full rebuild, parallel)
- ./docker/build.sh              (rebuild KiCad only)
- ./docker/build.sh --no-clean   (incremental)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 14:51:38 +01:00
Viktor Vaczi
d93e5bf753 Track wasm-port branch for kicad and wxwidgets submodules
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 18:28:57 +01:00
Viktor Vaczi
9f4ed1e51e Add KiCad PCBnew WASM build support and documentation
Build infrastructure:
- Update build-pcbnew.sh with stub library compilation
- Update build-wxuniversal-wasm.sh with library symlinks and stubs
- Add stub libraries for libgit2 and curl (network ops via JS)
- Add WASM-specific CMake Find modules

Documentation:
- Add KICAD_WASM_BUILD.md with complete modification list
- Document 68 KiCad files modified for WASM support
- Document disabled features and reasons
- Document stub libraries and wxWidgets changes

Submodule updates:
- kicad: Add WASM/Emscripten build support (wasm-port branch)
- wxwidgets: Add KiCad compatibility fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 18:26:57 +01:00
Viktor Vaczi
b5e46a0aba Add Docker build environment for KiCad WASM
- Add Dockerfile with ARM64-native emscripten/emsdk:4.0.2-arm64 image
- Add docker-compose.yml with resource limits (10 CPUs, 16GB RAM)
- Add helper scripts (build.sh, shell.sh, entrypoint.sh)
- Add Docker README with usage instructions
- Update playwright.config.ts to find free port dynamically
- Add .dockerignore and .gitignore entries for build artifacts

The Docker environment provides reproducible builds with:
- Named volume for build cache (faster I/O on macOS)
- Resource limits to prevent system lockups
- Interactive shell access for debugging

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 12:07:01 +01:00
Viktor Vaczi
c408410c7d Add KiCad PCBnew build script and CMake Find modules
- Add scripts/kicad/build-pcbnew.sh with clean-by-default and --no-clean flag
- Remove old scripts/build-pcbnew-wasm.sh (moved to scripts/kicad/)
- Add Boost build script with Emscripten toolset for Boost.Locale
- Add header download scripts for CURL and libgit2 (stub libraries)
- Add CMake Find modules for cross-compilation compatibility:
  - FindGLM.cmake: Reads version from setup.hpp
  - FindZSTD.cmake: Explicit sysroot paths
  - FindCURL.cmake: Header-only stub
  - FindSPNAV.cmake: Disabled (3D mouse not needed in browser)
  - FindCairo.cmake: Finds our built Cairo
  - FindPixman.cmake: Finds our built Pixman
  - Findlibgit2.cmake: Header-only stub
- Fix OpenCASCADE build: correct extracted dir name, add CMake policy
- Fix Protobuf build: correct GitHub release tag format (v21.12 not v3.21.12)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-08 11:37:14 +01:00
Viktor Vaczi
3034d9d76f Add KiCad WASM build infrastructure and dependency scripts
- Add build environment setup (scripts/common/env.sh, versions.sh, functions.sh)
- Add dependency build scripts for Zstd, GLM, FreeType, HarfBuzz, Pixman, Cairo
- Add placeholder scripts for OpenCASCADE, ngspice, protobuf
- Add WASM compatibility layer (wasm/kiplatform/, wasm/libcontext/)
- Add CMake modules for KiCad WASM cross-compilation
- Add PCBnew test infrastructure (tests/kicad/)
- Add build plan documentation

Successfully tested builds: Zstd 1.5.5, GLM 0.9.9.8, FreeType 2.13.2,
HarfBuzz 8.3.0, Pixman 0.42.2, Cairo 1.18.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 13:15:04 +01:00
Viktor Vaczi
756feb35da Add WASM feature tests: font enum, text decor, bitmap mask, regions
New test apps and E2E tests:
- fontenum: Font enumeration via Local Font Access API (180 fonts)
- textdecor: Text underline/strikethrough decorations
- bitmask: wxMask bitmap transparency with color keys
- regions: Non-rectangular region clipping (union, subtract, complex shapes)

Updates:
- playwright.config.ts: Add local-fonts permission
- WHATWORKS.md: Document implemented features, update test counts
- Makefile.wasm: Add build targets for new test apps

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 11:06:33 +01:00
Viktor Vaczi
7448d3cd74 Remove wxGraphicsContext test (not needed for KiCad WASM)
KiCad uses OpenGL GAL directly via WebGL, completely bypassing
wxGraphicsContext. The graphicsctx test app was crashing because
GetDefaultRenderer() returns NULL when wxUSE_CAIRO=0.

Since KiCad's rendering doesn't use wxGraphicsContext, this test
is unnecessary. Updated WHATWORKS.md to document this finding.

Test count: 246 -> 240 (34 apps)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-04 08:52:37 +01:00
Viktor Vaczi
dd85f280ba Threading research. 2025-12-04 08:33:45 +01:00
Viktor Vaczi
f71136b50a Add Phase 3 test coverage: validators, ownerdrawn, popup, graphicsctx, xml, wasmedge
New test apps:
- validators: wxTextValidator, wxIntegerValidator, wxFloatingPointValidator, custom validators
- ownerdrawn: wxOwnerDrawnComboBox for custom dropdown rendering (layer/font/icon combos)
- popup: wxPopupTransientWindow for transient popups (status, palette, color picker)
- graphicsctx: wxGraphicsContext for vector graphics (partial WASM support)
- xml: wxXmlDocument for XML parsing (used 665 times in KiCad)
- wasmedge: WASM edge cases (file system, threading, fonts, clipboard, memory)

Updates:
- 35 test apps, 246 tests passing (~99% coverage)
- Document WASM limitations and future TODOs in WHATWORKS.md
- Add baseline screenshots for all new tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 18:54:40 +01:00
Viktor Vaczi
11f5b81fc0 Add Phase 2 wxWidgets test coverage: grid renderers, print preview, specialized controls
New test apps (4):
- gridrenderers: Custom cell renderers (color swatches, icon+text, striped rows)
- printpreview: wxPrintPreview frame with zoom, page setup dialogs
- bitmapbuttons: Toolbar buttons with custom bitmap icons, disabled states
- specialized: wxTreebook, wxBitmapComboBox, wxCheckListBox

Test coverage increased from 184 to 209 tests across 29 apps (~98% coverage).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:58:47 +01:00
Viktor Vaczi
8f890658d2 Complete remaining wxWidgets feature tests: DataViewVirtual, AuiNotebook, Wizard, GridEdit, Calendar
Implements and tests all remaining KiCad-critical wxWidgets features:
- wxDataViewCtrl virtual mode for Zone Manager/Net Inspector (10,000+ items)
- wxAuiNotebook for closeable/reorderable tabbed panels
- wxWizard for step-by-step Footprint Wizard dialogs
- wxGrid cell editing with text, number, choice, checkbox editors
- wxCalendarCtrl for date selection with navigation

Total: 184 tests passing across 25 standalone apps (~95% KiCad coverage)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 17:16:14 +01:00
Viktor Vaczi
e8536a9a6d Add 5 new wxWidgets feature tests: PropertyGrid, Pickers, Collapsible, ListCtrl, InfoBar
Implements and tests remaining KiCad-critical wxWidgets features:
- wxPropertyGrid/wxPropertyGridManager for property panels
- wxColourPickerCtrl/wxFontPickerCtrl for color and font selection
- wxCollapsiblePane for expandable UI sections
- wxListCtrl virtual mode for large lists (10,000+ items)
- wxInfoBar for notification messages

Total: 159 tests passing across 20 standalone apps (~90% KiCad coverage)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 16:57:02 +01:00
Viktor Vaczi
e78a8e6d30 Add wxDragDrop test app and document coverage gaps
- Add dnd/dnd_test.cpp standalone app for HTML5 file drop testing
- Add dnd.spec.ts with 9 E2E tests (all passing)
- Update Makefile.wasm with dnd build target
- Update WHATWORKS.md with DnD status and coverage audit results
- Document identified gaps: wxPropertyGrid, virtual modes, pickers, etc.
- Update wxwidgets submodule with DnD support

Tests: 136 total (15 standalone apps)
Coverage: ~70% of KiCad-critical features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 16:33:27 +01:00
Viktor Vaczi
bf933104f9 Add wxPrinting test app and verify printing infrastructure works
- Create print_test standalone app testing wxPrintout, wxPrintPreview,
  wxPrinter, and browser print via window.print()
- Add 8 E2E tests for printing functionality (all pass)
- Update WHATWORKS.md: printing now works, 127 total tests, 14 standalone apps
- Remove wxRichTextCtrl from untested (disabled, KiCad doesn't use it)

Key findings:
- Printing infrastructure works out of the box in WASM
- wxPrintout callbacks fire correctly (OnBeginPrinting, OnPrintPage, etc.)
- wxPrintPreview renders preview frame
- Browser Print triggers native print dialog via window.print()

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 15:51:44 +01:00
Viktor Vaczi
9a78db1528 Add wxDataViewCtrl, wxHtmlWindow, and wxStyledTextCtrl test apps
Test 3 previously untested KiCad-critical wxWidgets controls:
- wxDataViewCtrl: List/tree views for Zone Manager, Net Inspector (10 tests)
- wxHtmlWindow: HTML rendering for About dialogs, error formatting (8 tests)
- wxStyledTextCtrl: Syntax highlighting for DRC rules, Python console (10 tests)

Also add button-finder config and update docs. All 119 tests passing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 11:27:00 +01:00
Viktor Vaczi
a10c173cc0 Add *.wasm.map to gitignore
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 10:21:41 +01:00
Viktor Vaczi
802b1e871c Implement wxClipboard and add button finder utility for canvas testing
wxClipboard:
- Update wxwidgets submodule with full wxClipboard implementation
- Add clipboard async functions to ASYNCIFY_IMPORTS in Makefile.wasm
- Update clipboard tests with correct button positions
- Add clipboard permissions to playwright config
- Update WHATWORKS.md to mark wxClipboard as working

Button Finder Utility:
- Add parametric button-finder.spec.ts for scanning canvas apps
- Utility scans for clickable buttons by detecting console log responses
- Excluded from regular test runs via testIgnore
- Supports APP_URL, START_Y, END_Y, STEP environment variables
- Document usage in tests/README.md

All 91 tests pass.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-12-03 10:19:50 +01:00
Viktor Vaczi
235c90d26b Fix tree test console logging during initialization
Move console.log call before the null guard in LogEvent() so that
messages are always logged to the browser console, even during early
initialization when m_log is not yet created.

Also make the "Tree is populated" test more robust by falling back to
verifying tree functionality (expand events) if early init logs are
not captured by Playwright due to timing.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:47:39 +01:00
Viktor Vaczi
90613dbe49 Fix wxTreeCtrl test crash and update test coordinates
- Add null guard in TreeTestFrame::LogEvent() to prevent crash when
  events fire before m_log is initialized during tree population
- Update button click coordinates in tree.spec.ts for Add Item and
  Delete Selected buttons
- Update WHATWORKS.md to reflect wxTreeCtrl now fully working (7/7 tests)
- Update baseline screenshots for tree tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:28:30 +01:00
Viktor Vaczi
67f5a88a34 Fix wxGrid test crash and add debug build support
The wxGrid test was crashing with "memory access out of bounds" due to
an initialization order bug in grid_test.cpp: during CreateGrid(), wxGrid
fires cell selection events which triggered the OnGridCellSelect handler
that called m_log->AppendText() before m_log was initialized.

Fix: Add null check in LogEvent() to guard against events firing before
m_log is created.

Also adds --debug flag to build-wasm-test.sh for debugging WASM crashes:
- Builds with DWARF symbols (-g) and source maps (-gsource-map)
- No optimization (-O0) preserves debugging context
- Stack traces show actual function names instead of wasm-function[N]

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 22:15:56 +01:00
Viktor Vaczi
5561c7c9f2 Fix timer tests and add baseline screenshot update script
- Fix timer.spec.ts button click coordinates (slow: y=125, fast: y=265, reset: y=390)
- Add scripts/update-baseline-screenshots.sh for updating baselines
- Update all baseline screenshots

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 21:20:40 +01:00
Viktor Vaczi
26181bb929 Refactor test logging into shared utilities
- Extract common logging code to tests/e2e/utils/
  - fixtures.ts: Playwright fixture with automatic log capture
  - test-utils.ts: Logging utilities and helper functions
- Each test now automatically captures:
  - Console logs with timestamps and log levels
  - Page errors with full stack traces
- Log files written per test to tests/logs/
  - <test-name>.log for all console output
  - <test-name>.errors.log only when errors occur
- Update all 13 spec files to use shared fixtures
- Update README with test structure and logging docs
- Net reduction of ~700 lines by removing duplicated code

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:54:54 +01:00
Viktor Vaczi
2264a22685 Fix wxrc build error by skipping native utilities
Add --without-subdirs flag to wxWidgets configure to prevent building
utils/, samples/, and demos/ directories. These contain native
applications like wxrc that shouldn't be cross-compiled to WASM.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 20:11:54 +01:00
Viktor Vaczi
961455ef54 Add baseline screenshots and visual regression testing
Add infrastructure for visual regression testing of wxWidgets WASM rendering:

- Add 121 baseline screenshots capturing all UI states tested by Playwright
- Add scripts/compare-screenshots.sh to compare test results vs baseline
- Update tests/WHATWORKS.md with documentation on screenshot comparison
- Update wxwidgets submodule with dialog refactoring

The baseline screenshots cover:
- Main app tabs (Controls, Text Input, Drawing, Lists, OpenGL, Grid, Dialogs)
- Standalone test apps (menu, toolbar, layout, aui, clipboard, filedialog, etc.)
- Dialog/MessageBox rendering (info, yes/no, error, custom dialogs)
- OpenGL rendering tests (immediate mode, vertex arrays, matrix ops)
- UI interactions (dropdowns, tab switching, z-ordering)

Use ./scripts/compare-screenshots.sh to check for visual regressions.
Small byte differences (<2%) are typically timestamps, not visual changes.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 19:55:12 +01:00
Viktor Vaczi
c445955583 Fix wxWidgets WASM rendering and add comprehensive tests
- Enable Asyncify for modal dialogs (ShowModal blocks until user closes)
- Add ASYNCIFY build flags to Makefile.wasm
- Fix dialog.spec.ts tests to use canvas coordinates (wxWidgets renders to canvas)
- Update WHATWORKS.md: 83 tests pass, dialog tests now 5/5

The wxwidgets submodule commit includes:
- Enabled startModal() Asyncify call in ShowModal()
- Enabled EM_ASM endModal cleanup in EndModal()
- Note: WASM code in src/univ/dialog.cpp will be refactored to
  src/wasm/dialog.cpp in follow-up for cleaner architecture

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 18:42:27 +01:00
Viktor Vaczi
53e4603a41 Add standalone test apps and Playwright specs for wxWidgets WASM
- Add 10 standalone test apps for isolated component testing:
  - menu, toolbar, layout, aui, clipboard, filedialog, grid
  - dialog, timer, tree (3 new)
- Add 12 Playwright e2e test specs for automated testing
- Update Makefile with GL/non-GL build configurations
- Update build script to list all standalone tests
- Add WHATWORKS.md documenting KiCad wxWidgets coverage
- Update .gitignore for build artifacts

Test results:
- 79 Playwright tests pass
- wxGrid crashes (memory access out of bounds)
- wxTreeCtrl crashes (similar issue)
- wxDialog/wxMessageBox events fire but no visual popup

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 16:19:13 +01:00
Viktor Vaczi
5918557545 Fix Vertex Arrays GL test crash and add OpenGL test suite
- Change glDrawElements index type from GL_UNSIGNED_BYTE to GL_UNSIGNED_SHORT
  to match KiCad's actual usage and Emscripten's legacy GL emulation requirements
- Add dedicated opengl.spec.ts test file for OpenGL-specific tests
- All 5 GL test types now work: Immediate Mode, Matrix Ops, Vertex Arrays,
  State Mgmt, and Texture Coords

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:58:14 +01:00
Viktor Vaczi
12dfa67894 Add TypeScript configuration for Playwright tests
Add proper TypeScript setup with tsconfig.json and type definitions
to resolve type errors in the e2e test files.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:39:30 +01:00
Viktor Vaczi
e4cb9e5abc Add popup z-ordering tests and fix dropdown close behavior
- Add z-ordering tests for dropdown popups appearing above GL canvas
- Add GL canvas visibility tests when switching tabs
- Fix test to click dropdown arrow button to close (clicking elsewhere
  doesn't close wxChoice dropdowns)
- Update wxWidgets submodule with popup z-ordering and dismissal fixes

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 12:32:16 +01:00
Viktor Vaczi
a538954b70 Fix wxChoice/wxComboBox dropdown rendering and add tests
- Fix empty clip region bug in wx.js clipRect function
- Add dropdown mouse interaction tests
- Add *.log to gitignore
- Make build script clean by default (use --no-clean to skip)
- Add wxGLCanvas canvas element fix documentation

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-29 10:08:42 +01:00
Viktor Vaczi
3287ec7616 Add GL immediate mode shim for Emscripten compatibility
Create custom JS library (lib/gl_immediate_shim.js) that fixes two
Emscripten LEGACY_GL_EMULATION issues without modifying KiCad source:

1. Color-per-vertex requirement: Emscripten requires glColor before
   each glVertex, but standard OpenGL uses persistent "current color".
   The shim tracks color state and auto-injects before each vertex.

2. Missing double-precision functions: glVertex2d, glVertex3d,
   glColor3d, glColor4d are unimplemented in Emscripten (wontfix).
   The shim provides these as wrappers to float variants.

Update test code to use standard OpenGL patterns (color set once,
multiple vertices) to verify the shim works correctly.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 21:22:09 +01:00
Viktor Vaczi
0db33b10f7 Fix Emscripten immediate mode GL and add comprehensive tests
- Fix immediate mode (glBegin/glEnd) by using color-per-vertex pattern
- Document Emscripten's requirement for color per vertex in GL_README.md
- Add OpenGL test tab with visual rendering verification
- Test GL_TRIANGLES, GL_QUADS, GL_LINES, GL_LINE_STRIP, GL_LINE_LOOP
- Update wxwidgets submodule with improved context management

Key finding: Emscripten's LEGACY_GL_EMULATION requires glColor*() to be
called before EACH glVertex*() call, not using OpenGL's "current color"
semantic. This is because the stride calculation expects interleaved
vertex data with color per vertex.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 20:14:59 +01:00
Viktor Vaczi
9e1d971797 Add wxGLCanvas WASM implementation and documentation
- Update build script with bakefile_gen Docker instructions and PCRE fix
- Add wxWidgets submodule with OpenGL/WebGL support for WASM
- Document comprehensive WASM test plan and wxGLCanvas implementation
- Document legacy GL emulation strategy for KiCad (423+ legacy GL calls)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 16:42:35 +01:00
Viktor Vaczi
4069de6a0b Fix wxWidgets WASM rendering and add comprehensive tests
- Update wxwidgets submodule with bitmap, template, and listbox fixes
- Add pcre2 include path to build script
- Add comprehensive UI interaction test covering all tabs
- Update test app with full control demonstration
- Add Makefile.wasm with HEAP exports for Emscripten
- Fix .gitignore to not ignore Makefile.wasm

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 14:28:05 +01:00
Viktor Vaczi
3f67fed173 Add Playwright test infrastructure for wxWidgets WASM port
- Add tests/ directory with Playwright e2e tests
- Add minimal wxWidgets WASM test application
- Add build script for test app (scripts/build-wasm-test.sh)
- Update wxWidgets submodule with WASM build fixes
- Update .gitignore for test artifacts

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-28 13:10:05 +01:00
Viktor Vaczi
0ac29130ca Update wxWidgets submodule with browser info API and async menus
Updates wxWidgets WASM port with:
- wxBrowserInfo class and wxGetBrowserInfo() for browser detection
- Async PopupMenu callback support for non-blocking menus
- Visual refinements for grid, listctrl, and statictext controls

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 16:48:45 +01:00
Viktor Vaczi
4207d34228 Update wxwidgets submodule to WASM port commit
Points to commit 1d22a97e19 on wasm-port branch with full
wxUniversal WASM implementation.

Note: After cloning, nested submodules need config.sub copied manually:
  cd wxwidgets && git submodule update --init --recursive
  cp config.sub 3rdparty/pcre/config.sub
  cp config.sub src/expat/expat/conftools/config.sub
  cp config.sub src/jpeg/config.sub
  cp config.sub src/png/config.sub
  cp config.sub src/tiff/config/config.sub

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:33:31 +01:00
Viktor Vaczi
76fbb6b819 Update wxWidgets WASM documentation
- Add submodule setup instructions to Phase 3 docs
  - Explains nested submodule config.sub requirements
  - Documents manual copy step after cloning
- Add WXWIDGETS-WASM-PORT-PROGRESS.md tracking all modifications

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:30:23 +01:00
Viktor Vaczi
b7d9d32acb Add reproducible build system for wxWidgets WASM port
- Add unified patch (wxwidgets-wasm.patch) for build validation
- Add scripts:
  - generate-wxwidgets-patches.sh: Extract patches from wxwidgets state
  - build-wxwidgets-wasm-clean.sh: Build from clean clone + patches
  - build-wxuniversal-wasm.sh: Build wxWidgets for WASM
- Add wxWidgets-wasm-reference submodule (ahilss/wxWidgets-wasm)
- Update .gitignore for wxwidgets-clean/ directory

Base commit: 5ff25322553c1870cf20a2e1ba6f20ed50d9fe9a

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 15:30:10 +01:00
Viktor Vaczi
aa7e9634e3 Add board_model library and Phase 3 wxUniversal plan
- Add board_model library with PCB data structures (BOARD, FOOTPRINT, PAD, etc.)
- Add thirdparty include paths (fmt, nlohmann_json, magic_enum, dynamic_bitset)
- Enable wxRegex support in wxBase build (builtin PCRE2)
- Add wxregex imported library to CMakeLists.txt
- Add Phase 3 implementation plan for wxWidgets wxUniversal WASM port

The board_model target includes:
- Common infrastructure (eda_item, eda_shape, eda_text, lset, kiid, etc.)
- PCB board model (board, footprint, pad, pcb_track, zone, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 09:24:31 +01:00
Viktor Vaczi
af1a4bb7e1 Add patch for wxBase WASM integration
Patch 0002 includes:
- wxWidgets 3.2.6 as submodule
- build-wxbase-wasm.sh script
- Core library CMake updates to use wxBase
- build-core-wasm.sh script

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 08:41:12 +01:00
Viktor Vaczi
9305aa5afb Update core library to use real wxBase instead of wx_shim
- Update CMakeLists.txt to link against wxBase WASM build
- Move config.h to wasm-config/ to avoid conflicts with wx headers
- Add build-core-wasm.sh script for reproducible builds
- Core now compiles with actual wxString, wxFile, etc. from wxWidgets

Libraries built:
- libkicad_core_utils.a (34K)
- libkimath.a (969K)
- libsexpr.a (45K)
- libclipper2.a (169K)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 08:39:22 +01:00
Viktor Vaczi
d6e946b101 Add wxWidgets 3.2.6 submodule and wxBase WASM build script
- Add wxWidgets v3.2.6 as git submodule for wxBase utilities
- Create build-wxbase-wasm.sh script to compile wxBase for Emscripten
- Disable WASM-incompatible features: zlib, expat, xlocale, fswatcher
- Successfully builds libwx_baseu-3.2-Emscripten.a (3.1MB)

This provides wxString, wxFile, wxDateTime and other base utilities
needed for the KiCad board data model without GUI dependencies.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-27 08:32:40 +01:00
Viktor Vaczi
92faf7c082 Add standalone core library with kimath and sexpr (Phase 2 Step 1)
Create standalone build system for KiCad's core computation libraries
that compiles without wxWidgets, targeting both native and WebAssembly.

Key additions:
- wx_shim.h: ~250 lines replacing wx utilities with standard C++
  - wxString class with Format() method
  - wxFFile for file I/O
  - wxASSERT, wxCHECK, wxFAIL_MSG macros
  - wxLog stubs
- Stub headers: wx/debug.h, wx/log.h, wx/string.h, wx/file.h, etc.
- config.h, advanced_config.h: Platform and triangulation config
- CMakeLists.txt: Builds kimath, sexpr, clipper2, rtree

Build results:
- Native: libkimath.a (1.4MB), libsexpr.a, test passes
- WASM: test_kimath.wasm (867KB), runs in Node.js

Test verifies:
- VECTOR2I, SEG, SHAPE_POLY_SET geometry operations
- S-expression parsing of .kicad_pcb format

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 17:39:53 +01:00
Viktor Vaczi
f1526d8c24 Complete Phase 1: Build KiCad with optional dependencies disabled
Add CMake override modules, stub implementations, and patches to build
KiCad without CURL, libgit2, OpenCASCADE, and ngspice dependencies.

- cmake/: Find modules that provide stub targets when deps disabled
- stubs/include/: Header stubs for curl, git2, ngspice, OCC
- stubs/src/: Implementation stubs for disabled features
- patches/: Consolidated patch for KiCad source modifications
- scripts/: Build helper scripts

Verified full native build on macOS with all optional deps disabled.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 16:33:48 +01:00
Viktor Vaczi
2d7c26feac Initial project setup for KiCad WebAssembly port
- Add KiCad fork as git submodule
- Create project structure (patches, stubs, cmake, scripts, core, docs)
- Add knowledge base and implementation plan documentation
- Add README with project overview and goals

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-11-26 10:46:44 +01:00