← Back to team overview

kicad-developers team mailing list archive

Re: Fwd: [PATCH] fp_lib_table minor changes to support .pretty folders

 

On 07/19/2013 10:33 PM, Ben Harris wrote:
> I think I sent this before I was a member of the group.
> 
> ---------- Forwarded message ----------
> From: "Ben Harris" <mail@xxxxxxxx <mailto:mail@xxxxxxxx>>
> Date: 19/07/2013 10:04 PM
> Subject: [PATCH] fp_lib_table minor changes to support .pretty folders
> To: <kicad-developers@xxxxxxxxxxxxxxxxxxx <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
> Cc:
> 
> Hi everyone,
> 
> Just tried to give FP_LIB_TABLE a go but it wasn't working with the new [folder of
> kicad_mod] style. Traced it to librari not accepting directories as a library, and
> kicad_plugin incorrectly creating a FILE_LINE_READER (I used the method from gpcb_plugin
> to fix it.
> 
> Sorry if I've sent the patch incorrectly - first time.
> 
> Regards
> -Ben


Ben,


In rev. 4259 I committed scripts/lib_convert.py which converts from one library format to
another.  It will be generally useful moving forward for a large number of tests and purposes.


Using this script I was able to verify the bug in FP_CACHE::Load() which you found.  Thank
you.  I committed a fix similar to your patch under your name in rev 4260.


To run the script to create a *.mod library from a *.pretty library, I used this command line:

$ PYTHONPATH=. /svn/kicad/testing.checkout/scripts/lib_convert.py /tmp/smd_dil.pretty
/tmp/smd_dil.mod


with my current directory parked in debug/pcbnew which is an out of tree build dir.


I did not commit the librairi.cpp portion of your patch since much of that module will get
rewritten to use much higher abstraction of libpaths during the final fp lib table work.

It should not be necessary to know if a libpath is a directory or a file outside the
plugin API.  The API is supposed to hide these kinds of details.

Wayne is working on this whole fp lib table area now.

Dick



References