Gasman2014 / KiCad-Diff

Scripts for performing image diffs between pcbnew layout revisions
MIT License
248 stars 42 forks source link

Support Kicad >= 5.99 #57

Closed leoheck closed 3 years ago

leoheck commented 3 years ago

This PR adjusts plotPCB.py to work with Kicad >= 5.99

Right now, to test it (using Kicad 5.99) it is needed to adjust these environment variables

export PYTHONPATH=/usr/lib/kicad-nightly/lib/python3/dist-packages/ 
export LD_LIBRARY_PATH=/usr/lib/kicad-nightly/lib/python3/dist-packages/

To test it using the current stable version 5.1.10 nothing else is necessary.

This PR closes https://github.com/Gasman2014/KiCad-Diff/issues/55

Gasman2014 commented 3 years ago

Sorry, this is failing on my checkout.

  File "/Users/johnpateman/Documents/Code/KiCad-Diff/plotPCB.py", line 42, in <module>
    version_major = int(pcbnew_version.split(".")[0])
ValueError: invalid literal for int() with base 10: '(5'
leoheck commented 3 years ago

Interesting. I need to validate on OSX then. Thanks for the review.

leoheck commented 3 years ago

It is fixed now. In Linux, pcbnew version is in x.y.z-patch format. But in OSX it has parenthesis around it like (x.y.z-patch)