← Back to team overview

kicad-developers team mailing list archive




I got some hours in on the fp-lib-table branch today.  I added the
FP_LIB_TABLE::ROW::description field, and made the parser handle some elements in any
order, with the capability of having optional table columns, i.e. s-expression elements. 
The (options) are now optional.

I've got a better idea for presenting platform independent (uri LIBPATH)s, for the case
where LIBPATH is local (local = not on the internet).

I'm thinking we should movefrom the %P path substitution to a full environment variable
capability, in the (uri LIBPATH).


(uri ${KISYSMODS}/passives.mod)

This might be embedded in a row like this:

(lib (name passives)(descr "R/C Lib")(type KiCad)(uri ${KISYSMODS}/passives.pretty))

When loading the library by nickName, i.e. (name), we'd simply do environment variable
substitution on whatever we find in (uri), no limitsas to which environment variables or
how many.   However for the system library table, the one distributed with pcbnewand
reflecting the kicad supplied libs, we'd have a special environment variable, say KISYSMODS.

The purpose of something like KISYSMODS is to achieve a platform independent (cross
platform) system library table that comes with the kicad package, since it can be used to
abstract the "system standard library location"across platforms.  Think of it as a leading
path fragment.

In said bzr branch, see:

pcbnew_config.cpp, line 97.  This code is scaffolding, to be tossed in the future, but
shows that the parser is working on these tables.
Also notice the prj table uses a custom environment variable that would never be mentioned
in kicad documentation, KIUSRMODS, since this was put in there
by someone who runs kicad on both Windows and Linux and wants not to have to futz with his
project specific fp_lib_table.

const wxString FP_LIB_TABLE::ExpandSubtitutions( const wxString aString )
    // We reserve the right to do this another way, by providing our own member
    // function.
    return wxExpandEnvVars( aString );

But what about the guy who did not set his KISYSMODS environment variable?
At program startup, we can do:

--- If KISYSMOD is not in the evironment, then push it into the environment with a value
according to old school platform specific path fragment.  On linux that would be
/usr/local/share/kicad/modules/, and similar for Windows.  This is just a safety net in
the case where KISYSMODS has not been set.

I am still struggling with the number of tables to have, 2 or 3.  And I can even make an
argument for 4in the future.

Here are my arguments, and the order of search precedence:

1) "project specific" table,which is tied to a projectonly.

2) "personal" table, which is cross project.  (This is the one I would use mostly.)

3) "system standard" table.  We'd like to control this from the source repo.  If modified
by the user, then it would become cumbersome when he installs a kicad update.  So there is
an argument to simply keep that table pristine and controlled by usto match the library repo.

4) In the future, we mighthave a "global" table, which comes off of http:///kicad-pcb.org
and points to all the pcbnew libraries in the world, which are on the net.  The pcbnew
library manager would simply goes and gets this lib_table on startup.

That is a total of 4, with 3 fully justifiable now.  With good copy and paste in the table
UI, we could avoid the 4th table as long as a person could copy all thecolumns from a
webpage and paste them into his personal or project table.

Adding another table to the UI is no problem at all for me, since it is just another tab.

Anything objectionable or improvable here?




There are a *lot* of eagle libraries in that /opt/eagle-6.2.0/lbr/  diron my system.

(lib (name chips)(descr "Potatoe chips")(type Eagle)(uri

Follow ups