fix: include KiCad 10 Windows install paths in library auto-discovery
Some checks failed
CI/CD Pipeline / TypeScript Build & Test (20.x, macos-latest) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (20.x, ubuntu-22.04) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (20.x, ubuntu-24.04) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (20.x, windows-latest) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (22.x, macos-latest) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (22.x, ubuntu-22.04) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (22.x, ubuntu-24.04) (push) Has been cancelled
CI/CD Pipeline / TypeScript Build & Test (22.x, windows-latest) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-22.04, 3.10) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-22.04, 3.11) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-22.04, 3.12) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-22.04, 3.9) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-24.04, 3.10) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-24.04, 3.11) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-24.04, 3.12) (push) Has been cancelled
CI/CD Pipeline / Python Tests (ubuntu-24.04, 3.9) (push) Has been cancelled
CI/CD Pipeline / Integration Tests (Linux + KiCAD) (10.0) (push) Has been cancelled
CI/CD Pipeline / Integration Tests (Linux + KiCAD) (8.0) (push) Has been cancelled
CI/CD Pipeline / Integration Tests (Linux + KiCAD) (9.0) (push) Has been cancelled
CI/CD Pipeline / Docker Build Test (push) Has been cancelled
CI/CD Pipeline / Code Quality (push) Has been cancelled
CI/CD Pipeline / Documentation Check (push) Has been cancelled

Fixes #245 — _find_kicad_footprint_dir() only listed the 9.0/8.0 Windows
install paths, so a Windows host with only KiCad 10 installed got None and
footprint auto-discovery found nothing. The same gap existed for symbols in
library_symbol.py and dynamic_symbol_loader.py.

- Add C:/Program Files/KiCad/10.0/share/kicad/{footprints,symbols} to the
  candidate lists (10.0 first, matching the existing newest-first order)
- Honor KICAD10_FOOTPRINT_DIR and KICAD10_SYMBOL_DIR env overrides alongside
  the existing 9/8 ones
- Regression tests in tests/test_kicad10_paths.py
This commit is contained in:
mixelpixx
2026-06-12 16:06:11 -04:00
parent 48f2d09fdd
commit 99b1d8a168
4 changed files with 74 additions and 20 deletions

View File

@@ -182,12 +182,15 @@ class LibraryManager:
possible_paths = [
"/usr/share/kicad/footprints",
"/usr/local/share/kicad/footprints",
"C:/Program Files/KiCad/10.0/share/kicad/footprints",
"C:/Program Files/KiCad/9.0/share/kicad/footprints",
"C:/Program Files/KiCad/8.0/share/kicad/footprints",
"/Applications/KiCad/KiCad.app/Contents/SharedSupport/footprints",
]
# Also check environment variable
if "KICAD10_FOOTPRINT_DIR" in os.environ:
possible_paths.insert(0, os.environ["KICAD10_FOOTPRINT_DIR"])
if "KICAD9_FOOTPRINT_DIR" in os.environ:
possible_paths.insert(0, os.environ["KICAD9_FOOTPRINT_DIR"])
if "KICAD8_FOOTPRINT_DIR" in os.environ: