← Back to team overview

kicad-developers team mailing list archive

Re: Global Search Paths and fp-lib-table Entries?

 

I wasn't suggesting that we use the legacy libraries.  If Bernhard wants
to include the pretty libraries with the OSX bundle, then they should
probably be placed in the /module path.  Although they really could be
placed in any path as long as the fp-lib-table uri entry points to it.
GitHub should be the default but there are some users who aren't always
connected to the internet and having a local copy of the footprint
libraries is useful.

On 11/3/2014 9:27 AM, Carl Poirier wrote:
> Why use the legacy footprints for OSX? We are working hard on a set of
> improved ones. They are miles ahead of the old ones now. If you build
> the github plugin and use the corresponding fp-lib-table
> (kicad-library/template/fp-lib-table.forgithub), it should work straight
> away.
> 
> On Mon, Nov 3, 2014 at 8:53 AM, Wayne Stambaugh <stambaughw@xxxxxxxxxxx
> <mailto:stambaughw@xxxxxxxxxxx>> wrote:
> 
>     On 11/3/2014 3:22 AM, Cirilo Bernardo wrote:
>     > On Mon, Nov 3, 2014 at 6:19 PM, Bernhard Stegmaier
>     > <stegmaier@xxxxxxxxxxxxx <mailto:stegmaier@xxxxxxxxxxxxx>
>     <mailto:stegmaier@xxxxxxxxxxxxx <mailto:stegmaier@xxxxxxxxxxxxx>>>
>     wrote:
>     >
>     >     OK, got it.
>     >     However, I am still trying to get some kind of “best practice” on
>     >     how to configure things.
>     >
>     >     So, for pcbnew search stacks are already legacy.
>     >     That is, as a starting point for pcbnew I have the
>     fp-lib-table file
>     >     which lives in the preferences folder (which is
>     >     ~/Library/Preferences/kicad on OSX).
>     >     Via the fp-lib-table I reference all my modules/footprints - I can
>     >     use absolute paths, environment variables, etc. as I like.
>     >     The 3D-models referenced by modules/footprints are also always
>     >     absolute paths but may contain environment variables.
>     >     Correct?
>     >
>     >
>     > Not quite correct. For 3D models the code will use the environment
>     > variable KISYS3DMOD in place of the legacy
>     SOMEDIR/modules/packages3d -
>     > this is the only environment var which the code will check and this is
>     > hard-coded. If there is no environment var set then the code
>     attempts to
>     > look in the legacy default paths; I don't have KiCad source
>     installed on
>     > the computer I'm sitting at so I can't check what that path is of OSX.
>     > If you attach a model which is not in the default 3d model search
>     path,
>     > then the full path will be recorded. If the model is in the default
>     > search path then a truncated path is recorded, which I think is bad
>     > behavior but this was the legacy behavior and it will persist until
>     > someone finds time to fix things.
>     >
>     >
>     >     How am I supposed to configure libraries for eeschema?
>     >
>     >
>     > Not sure - it's been a long time since I looked at that part of
>     the code.
> 
>     Eeschema will use the path search stack to find component libraries.
>     Eeschema will append /library to each valid path in the search stack so
>     as long as your base path is in the search stack and your component
>     libraries are in base_search_path/library then they will be found.  Of
>     course you can also configure the library paths in your project.
> 
>     >
>     >
>     >
>     >     I currently seem to have two working options:
>     >     (1) Use default kicad.pro <http://kicad.pro>
>     <http://kicad.pro> to point it to your
>     >     library path and your libraries. E.g.:
>     >     [eeschema]
>     >     LibDir=~/…somewhere…/Library
>     >
>     >     [eeschema/libraries]
>     >     LibName1=AtmelCorporation
>     >     The default kicad.pro <http://kicad.pro> <http://kicad.pro>
>     seems to be found in
>     >       …/templates
>     >     with “…” again being one of the search stack paths (which in
>     >     contrast to pcbnew/fp-lib-table is at least on OSX not the
>     >     preferences path).
>     >     (2) Just put your libraries to
>     >       …/library
>     >
>     >     In general, is there anywhere a list of “supplemental” files
>     >     (libraries, 3d-models, footprints, various kinds of templates,
>     >     scripts, xml-Files for BOM, etc.) and where they should be located?
> 
>     base_search_path/share/kicad/library => Schematic component libraries.
>     base_search_path/share/kicad/module => Pcb footprint libraries.
>     base_search_path/share/kicad/module/packages3d => 3D models libraries.
>     base_search_path/share/kicad/template => project templates.
> 
>     >
>     >
>     > No. In principle some global configuration files should be used to
>     > enumerate search paths in a manner similar to the footprint management
>     > code, but when that will happen is anyone's guess. At the moment we all
>     > tolerate the current nuisances of the legacy behavior.
>     >
>     > - Cirilo
>     >
>     >
>     >
>     >     Regards,
>     >     Bernhard
>     >
>     >     On 03.11.2014, at 00:33, Wayne Stambaugh <stambaughw@xxxxxxxxxxx <mailto:stambaughw@xxxxxxxxxxx>
>     >     <mailto:stambaughw@xxxxxxxxxxx
>     <mailto:stambaughw@xxxxxxxxxxx>>> wrote:
>     >
>     >>     On 11/2/2014 4:25 PM, Bernhard Stegmaier wrote:
>     >>>     Hi all,
>     >>>
>     >>>     I am still trying to find out/optimize where what is being
>     loaded
>     >>>     from (especially for OS X).
>     >>>     In common/kiface_i.cpp the global search stack for pcbnew is
>     >>>     initialized with
>     >>>      …/modules
>     >>>      …/modules/packages3d
>     >>>     with “…” being some OS specific base paths.
>     >>>
>     >>>     The global search stack seems to be used for eeschema libraries
>     >>>     and I also found a piece of code which made me think that it is
>     >>>     also used for loading 3D-models.
>     >>>     However, fp-lib-table doesn’t seem to use it but only the path
>     >>>     given for a library in fp-lib-table itself (maybe with some
>     >>>     environment variables).
>     >>>
>     >>>     Am I missing something or does loading of modules currently
>     >>>     ignore the global search paths?
>     >>
>     >>     You are not missing anything.  This is by design.  The
>     >>     fp-lib-table uses
>     >>     fully qualified path either by definition or using environment
>     >>     variables.  The path search stack has been a thorn in our
>     side since
>     >>     I've been with the project.  The goal is eventually define the
>     >>     paths by
>     >>     using kicad config settings and/or environment variables so
>     the search
>     >>     path code goes away.
>     >>
>     >>>     If I have something like
>     >>>        (lib (name Conn)(type Legacy)(uri Connectors.mod)(options
>     >>>     "")(descr "Connectors"))
>     >>>     in my fp-lib-table and Connectors.mod is in my
>     >>>     …/modules
>     >>>     folder it doesn’t get loaded...
>     >>
>     >>     Connectors.mod will not get loaded unless it's located in the
>     current
>     >>     working directory.  You should define a full path or use an
>     >>     environment
>     >>     variable as the path to Connectors.mod.  Environment variable are
>     >>     platform independent.  Fully qualified paths are not.  Use the
>     >>     environment variable KISYSMOD to define the default footprint
>     library
>     >>     path and add (uri ${KISYSMOD}/Connectors.mod) to
>     fp-lib-table.  Better
>     >>     yet, use the github plugin.  There is already an fp-lib-table
>     file
>     >>     populated for github in the kicad library project on github.
>     >>
>     >>
>     >>>
>     >>>
>     >>>     Regards,
>     >>>     Bernhard
>     >>>     _______________________________________________
>     >>>     Mailing list: https://launchpad.net/~kicad-developers
>     >>>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >>>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >>>     Unsubscribe : https://launchpad.net/~kicad-developers
>     >>>     More help   : https://help.launchpad.net/ListHelp
>     >>>
>     >>
>     >>
>     >>
>     >>     _______________________________________________
>     >>     Mailing list: https://launchpad.net/~kicad-developers
>     >>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >>     Unsubscribe : https://launchpad.net/~kicad-developers
>     >>     More help   : https://help.launchpad.net/ListHelp
>     >
>     >
>     >     _______________________________________________
>     >     Mailing list: https://launchpad.net/~kicad-developers
>     >     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     >     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>>
>     >     Unsubscribe : https://launchpad.net/~kicad-developers
>     >     More help   : https://help.launchpad.net/ListHelp
>     >
>     >
> 
> 
> 
>     _______________________________________________
>     Mailing list: https://launchpad.net/~kicad-developers
>     Post to     : kicad-developers@xxxxxxxxxxxxxxxxxxx
>     <mailto:kicad-developers@xxxxxxxxxxxxxxxxxxx>
>     Unsubscribe : https://launchpad.net/~kicad-developers
>     More help   : https://help.launchpad.net/ListHelp
> 
> 




References