kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #18478
Re: Best way to set up a canonical library path ?
2015-06-07 0:35 GMT+02:00 Henner Zeller <h.zeller@xxxxxxx>:
> Hi,
> So while developing and setting up a new system, it is not really
> clear to me how to set up all the paths. Right now I can't seem to
> find a simple way, only something that feels a bit too complicated.
>
> 1) Installing libraries
> (I do _not_ use the git-plugin but rather prefer local installation)
>
> To get a fresh setup of libraries, I am running scripts/library-repos-install.sh
> I am doing that with a custom path (WORKING_TREE=/usr/local/share/kicad)
>
> under $WORKING_DIR, it creates library-repos, under which it unpacks
>
> $WORKING_TREE/library-repos/kicad-library
> with schematic symbols and 3d packages
> and unpacks all pretty directories in there as well:
>
> $WORKING_TREE/library-repos/*.pretty
>
> so far so good.
>
> 2) setting the environment variables
>
> Now running a freshly compiled KiCad does of course not find the
> libraries. In fact, without any environment variables present, it
> apparently assumes these:
>
> KIGITHUB=https://github.com/KiCad
> KISYS3DMOD=/usr/local/modules/packages3d
> KISYSMOD=/usr/local/modules
It seems strange to me that those *MOD paths are missing the string kicad in it.
> (which it writes to ~/.config/kicad/kcad_common). This seems to be
> bogus to me; I can imagine that it extracts that from the compile
> PREFIX somehow, but I'd expect it to append a share/kicad or something
> to it.
IIRC those paths are able to be set at build time for packagers.
> After copying the fp-lib-table and setting the enviroment variable as
> suggested in the script
>
> cp $WORKING_TREES/library-repos/kicad-library/template/fp-lib-table.for-pretty
> ~/.config/kicad/fp-lib-table
> export KISYSMOD=$WORKING_TREES/library-repos
>
> .. eeschema still does not find the libraries.
>
> for that, I have found that I can set KICAD to that directory
> export KICAD=$WORKING_TREES/library-repos/kicad-library
>
> Now, 3D viewing _still_ does not work. Yet another environment
> variable has to be set
> export KISYS3DMOD=$WORKING_TREES/library-repos/kicad-library/modules/packages3d
>
> 3) Findings
> Kicad only works with the libraries with a little of manual-work.
> Three environment variables have to be set to get going. Given
> WORKING_TREES as the chosen location in the install script, these are
> the environment variables:
>
> export KICAD=$WORKING_TREES/library-repos/kicad-library
> export KISYSMOD=$WORKING_TREES/library-repos
> export KISYS3DMOD=$WORKING_TREES/library-repos/kicad-library/modules/packages3d
>
> 4) Question
> Am I am doing something wrong here, or is this really needed this way ?
Well, there is already the footprint wizard in the pcbnew ->
preferences -> footprint libries wizard, in which you can add all the
repos from github easily. But I have just noticed that it only
downloads a zip or something of the repo, not the git attributes that
make it a git repo itself.
Also, are you sure that a normal user would like to save the libraries
in the system paths? As you did abouve with the
scripts/library-repos-install.sh script? IMHO the footprint wizards
should be enhanced to save the libraries as git repos.
> 5) Suggestion
> I know I have not been actively developing recently, so I can't really
> complain. But I would like to see it working this way:
>
> - We have a defined standard layout of how libraries are checked
> out/installed locally. Say in $PREFIX/share/kicad. The install script
> does already something like that, so that could be the defined
> standard way (though some re-structuring might be useful).
I don't think this install script is intended for normal users.
> - There is only _one_ environment variable to be set, pointing to
> the root of this directory (KICAD_SYSTEM_LIBS or something)
This assumes that the complete schematic library (which contains the
3D models by some unknown reason) is also fetched to that same
location.
> - This environment variable is pre-set to $PREFIX/share/kicad (or
> to the eqivalent path on where typically data files reside on other
> platforms).
Who defines this $PREFIX?
> Would this be a good goal before a new, stable release ? I think it
> will help users and make software-packagers happy.
I think it would be good to enhance the wizard to download the repos
as git repos. Setting a default environment variable path will be hard
to match _all_ systems.
> Cheers,
> Henner.
>
> _______________________________________________
> 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
References