kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #15546
Re: Global Search Paths and fp-lib-table Entries?
On Mon, Nov 3, 2014 at 6:19 PM, Bernhard Stegmaier <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.
> I currently seem to have two working options:
> (1) Use default 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 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?
>
>
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> 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
> 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
> 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
> Unsubscribe : https://launchpad.net/~kicad-developers
> More help : https://help.launchpad.net/ListHelp
>
>
Follow ups
References