Commit graph

463 commits

Author SHA1 Message Date
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