kicad-developers team mailing list archive
-
kicad-developers team
-
Mailing list archive
-
Message #17025
Re: Global fp-lib-table path
On 2/22/2015 4:55 PM, Bernhard Stegmaier wrote:
> It seems it is still not clear what I meant, so one last try to clarify.
>
> Lets assume I have *my own* KiCad repository (git, svn, whatever) on *my server* which looks like this:
> KiCad-Repo/
> Modules/
> abc.pretty/
> …
> xyz.pretty/
> …
> Packages3D/
> abc/
> …
> fp-lib-table
> The KiCad-Repo/fp-lib-table contains everything of *my* repository.
>
> Regardless from where KiCad expects it I sync this repository to somewhere in my home directory.
> Using $KISYSMOD and $KISYS3DMOD i can point KiCad directly to use my …/KiCad-Repo/Modules or
> …/KiCad-Repo/Packages3D folder.
> No need to copy/link/etc. the modules/models anywhere or sync them to some KiCad specific folder (I would possibly forget to save/submit on next reinstall).
> The same on all my machines… just sync, no need to configure sth. via GUI, etc. Yes, I have to set $KISYS… correctly.
>
> The only “problem” with that setup is that I can’t point KiCad to just use my …/KiCad-Repo/fp-lib-table.
> Currently, I symlink ~/Library/Preferences/kicad/fp-lib-table => …/KiCad-Repo/fp-lib-table.
I would not do this. Each user should be free to edit their own
fp-lib-table as they see fit.
>
> This works without any problems, but normally no user would fiddle around in the preferences folder to do that.
> And, I don’t see any reason why the base path for fp-lib-table also shouldn’t be configurable to support such a repository setup (I don’t think that it is so uncommon).
I think your misunderstanding how the fp-lib-table was designed and
intended to be used. Have you read the library configuration section in
the Pcbnew documentation? This gives a pretty good explanation of how
to configure the library table and indirectly how it works. The default
fp-lib-table is merely a starting point for configuring you library
preferences. There is also the project fp-lib-table if you choose to
define it which takes precedence over the global fp-lib-table in the
case of libraries with the same nickname. You can either define all you
your libraries in the global table and not use the project table or you
can have an empty global table and define all your libraries in the
project table or any combination in between.
>
> Either using $KISYSMOD or defining a new variable seemed to be pretty trivial at first glance, but you for sure know the code better than me.
> So, if this is interesting, I could try to come up with a patch.
This is exactly what you should do. I define $KILCLMOD for my personal
footprint libraries. My fp-lib-table contains entries for $KIGITHUB,
$KISYSMOD, and $KILCLMOD. I could define as many environment variables
as I want to. You no longer need to define the environment variable at
the system or user level. Just add:
KILCLMOD=path/to/local/libraries
KISVRMOD=path/to/libraries/on/a/server
.
.
.
to the:
[EnvironmentVariables]
section of the kicad_common configuration file.
Here's one of my test fp-lib-table files:
(fp_lib_table
(lib (name Air_Coils_SML_NEOSID)(type KiCad)(uri
${KISYSMOD}/Air_Coils_SML_NEOSID.pretty)(options "")(descr
HAMxx31A_HDMxx31A))
(lib (name Buzzers_Beepers)(type KiCad)(uri
${KISYSMOD}/Buzzers_Beepers.pretty)(options "")(descr "The way you like
them."))
(lib (name Capacitors_Elko_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Capacitors_Elko_ThroughHole.pretty)(options "")(descr "The
way you like them."))
(lib (name Capacitors_SMD)(type KiCad)(uri
${KISYSMOD}/Capacitors_SMD.pretty)(options "")(descr "The way you like
them."))
(lib (name Capacitors_Tantalum_SMD)(type KiCad)(uri
${KISYSMOD}/Capacitors_Tantalum_SMD.pretty)(options "")(descr "The way
you like them."))
(lib (name Capacitors_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Capacitors_ThroughHole.pretty)(options "")(descr "The way
you like them."))
(lib (name Choke_Axial_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Choke_Axial_ThroughHole.pretty)(options "")(descr "The way
you like them."))
(lib (name Choke_Common-Mode_Wurth)(type KiCad)(uri
${KISYSMOD}/Choke_Common-Mode_Wurth.pretty)(options "")(descr "The way
you like them."))
(lib (name Choke_Radial_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Choke_Radial_ThroughHole.pretty)(options "")(descr "The way
you like them."))
(lib (name Choke_SMD)(type KiCad)(uri
${KISYSMOD}/Choke_SMD.pretty)(options "")(descr "The way you like them."))
(lib (name Choke_Toroid_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Choke_Toroid_ThroughHole.pretty)(options "")(descr "The way
you like them."))
(lib (name Connectors_Molex)(type KiCad)(uri
${KISYSMOD}/Connectors_Molex.pretty)(options "")(descr 53047-A123))
(lib (name Connect)(type KiCad)(uri
${KISYSMOD}/Connect.pretty)(options "")(descr "The way you like them."))
(lib (name Converters_DCDC_ACDC)(type KiCad)(uri
${KISYSMOD}/Converters_DCDC_ACDC.pretty)(options "")(descr "The way you
like them."))
(lib (name Crystals_Oscillators_SMD)(type KiCad)(uri
${KISYSMOD}/Crystals_Oscillators_SMD.pretty)(options "")(descr "The way
you like them."))
(lib (name Crystals)(type KiCad)(uri
${KISYSMOD}/Crystals.pretty)(options "")(descr "The way you like them."))
(lib (name Diodes_SMD)(type KiCad)(uri
${KISYSMOD}/Diodes_SMD.pretty)(options "")(descr "The way you like them."))
(lib (name Diodes_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Diodes_ThroughHole.pretty)(options "")(descr "The way you
like them."))
(lib (name Discret)(type KiCad)(uri
${KISYSMOD}/Discret.pretty)(options "")(descr "The way you like them."))
(lib (name Displays_7-Segment)(type KiCad)(uri
${KISYSMOD}/Displays_7-Segment.pretty)(options "")(descr "The way you
like them."))
(lib (name Display)(type KiCad)(uri
${KISYSMOD}/Display.pretty)(options "")(descr "The way you like them."))
(lib (name Divers)(type KiCad)(uri ${KISYSMOD}/Divers.pretty)(options
"")(descr "The way you like them."))
(lib (name EuroBoard_Outline)(type KiCad)(uri
${KISYSMOD}/EuroBoard_Outline.pretty)(options "")(descr "The way you
like them."))
(lib (name Fiducials)(type KiCad)(uri
${KISYSMOD}/Fiducials.pretty)(options "")(descr "The way you like them."))
(lib (name Filters_HF_Coils_NEOSID)(type KiCad)(uri
${KISYSMOD}/Filters_HF_Coils_NEOSID.pretty)(options "")(descr "The way
you like them."))
(lib (name Fuse_Holders_and_Fuses)(type KiCad)(uri
${KISYSMOD}/Fuse_Holders_and_Fuses.pretty)(options "")(descr "The way
you like them."))
(lib (name Hall-Effect_Transducers_LEM)(type KiCad)(uri
${KISYSMOD}/Hall-Effect_Transducers_LEM.pretty)(options "")(descr "The
way you like them."))
(lib (name Heatsinks)(type KiCad)(uri
${KISYSMOD}/Heatsinks.pretty)(options "")(descr "The way you like them."))
(lib (name Housings_QFP)(type KiCad)(uri
${KISYSMOD}/Housings_QFP.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_ROHM)(type KiCad)(uri
${KISYSMOD}/Housings_ROHM.pretty)(options "")(descr VML0806))
(lib (name Housings_SIP)(type KiCad)(uri
${KISYSMOD}/Housings_SIP.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_SOIC)(type KiCad)(uri
${KISYSMOD}/Housings_SOIC.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_SOT-23_SOT-143_TSOT-6)(type KiCad)(uri
${KISYSMOD}/Housings_SOT-23_SOT-143_TSOT-6.pretty)(options "")(descr
"The way you like them."))
(lib (name Housings_SOT-89)(type KiCad)(uri
${KISYSMOD}/Housings_SOT-89.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_SOT)(type KiCad)(uri
${KISYSMOD}/Housings_SOT.pretty)(options "")(descr "SOT126, SOT32"))
(lib (name Housings_SSOP)(type KiCad)(uri
${KISYSMOD}/Housings_SSOP.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_TO-50)(type KiCad)(uri
${KISYSMOD}/Housings_TO-50.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_TO-78)(type KiCad)(uri
${KISYSMOD}/Housings_TO-78.pretty)(options "")(descr "The way you like
them."))
(lib (name Housings_TO-92)(type KiCad)(uri
${KISYSMOD}/Housings_TO-92.pretty)(options "")(descr "The way you like
them."))
(lib (name Inductors_NEOSID)(type KiCad)(uri
${KISYSMOD}/Inductors_NEOSID.pretty)(options "")(descr "The way you like
them."))
(lib (name Inductors)(type KiCad)(uri
${KISYSMOD}/Inductors.pretty)(options "")(descr "The way you like them."))
(lib (name IR-DirectFETs)(type KiCad)(uri
${KISYSMOD}/IR-DirectFETs.pretty)(options "")(descr "The way you like
them."))
(lib (name Labels)(type KiCad)(uri ${KISYSMOD}/Labels.pretty)(options
"")(descr "The way you like them."))
(lib (name LEDs)(type KiCad)(uri ${KISYSMOD}/LEDs.pretty)(options
"")(descr "The way you like them."))
(lib (name Measurement_Points)(type KiCad)(uri
${KISYSMOD}/Measurement_Points.pretty)(options "")(descr "The way you
like them."))
(lib (name Measurement_Scales)(type KiCad)(uri
${KISYSMOD}/Measurement_Scales.pretty)(options "")(descr "The way you
like them."))
(lib (name Mechanical_Sockets)(type KiCad)(uri
${KISYSMOD}/Mechanical_Sockets.pretty)(options "")(descr DIN41612))
(lib (name Mounting_Holes)(type KiCad)(uri
${KISYSMOD}/Mounting_Holes.pretty)(options "")(descr "The way you like
them."))
(lib (name Muonde)(type KiCad)(uri ${KISYSMOD}/Muonde.pretty)(options
"")(descr "The way you like them."))
(lib (name NF-Transformers_ETAL)(type KiCad)(uri
${KISYSMOD}/NF-Transformers_ETAL.pretty)(options "")(descr "The way you
like them."))
(lib (name Oddities)(type KiCad)(uri
${KISYSMOD}/Oddities.pretty)(options "")(descr "The way you like them."))
(lib (name Opto-Devices)(type KiCad)(uri
${KISYSMOD}/Opto-Devices.pretty)(options "")(descr "The way you like
them."))
(lib (name Oscillator-Modules)(type KiCad)(uri
${KISYSMOD}/Oscillator-Modules.pretty)(options "")(descr "The way you
like them."))
(lib (name Oscillators)(type KiCad)(uri
${KISYSMOD}/Oscillators.pretty)(options "")(descr "SI570, SI571"))
(lib (name Pentawatts)(type KiCad)(uri
${KISYSMOD}/Pentawatts.pretty)(options "")(descr "The way you like them."))
(lib (name PFF_PSF_PSS_Leadforms)(type KiCad)(uri
${KISYSMOD}/PFF_PSF_PSS_Leadforms.pretty)(options "")(descr
Allegro_ACS754_ACS755_ACS756_HallCurrentSensor))
(lib (name Pin_Headers)(type KiCad)(uri
${KISYSMOD}/Pin_Headers.pretty)(options "")(descr "2.54mm pin headers."))
(lib (name Potentiometers)(type KiCad)(uri
${KISYSMOD}/Potentiometers.pretty)(options "")(descr "The way you like
them."))
(lib (name Power_Integrations)(type KiCad)(uri
${KISYSMOD}/Power_Integrations.pretty)(options "")(descr "The way you
like them."))
(lib (name Printtrafo_CHK)(type KiCad)(uri
${KISYSMOD}/Printtrafo_CHK.pretty)(options "")(descr "The way you like
them."))
(lib (name Relays_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Relays_ThroughHole.pretty)(options "")(descr "The way you
like them."))
(lib (name Resistors_SMD)(type KiCad)(uri
${KISYSMOD}/Resistors_SMD.pretty)(options "")(descr "The way you like
them."))
(lib (name Resistors_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Resistors_ThroughHole.pretty)(options "")(descr "The way you
like them."))
(lib (name Resistors_Universal)(type KiCad)(uri
${KISYSMOD}/Resistors_Universal.pretty)(options "")(descr Experimental))
(lib (name SMD_Packages)(type KiCad)(uri
${KISYSMOD}/SMD_Packages.pretty)(options "")(descr "The way you like
them."))
(lib (name Sockets_BNC)(type KiCad)(uri
${KISYSMOD}/Sockets_BNC.pretty)(options "")(descr "The way you like them."))
(lib (name Sockets_DIP)(type KiCad)(uri
${KISYSMOD}/Sockets_DIP.pretty)(options "")(descr "The way you like them."))
(lib (name Sockets_Mini-Universal)(type KiCad)(uri
${KISYSMOD}/Sockets_Mini-Universal.pretty)(options "")(descr Mate-N-Lok))
(lib (name Sockets_MOLEX_KK-System)(type KiCad)(uri
${KISYSMOD}/Sockets_MOLEX_KK-System.pretty)(options "")(descr "The way
you like them."))
(lib (name Sockets_PGA)(type KiCad)(uri
${KISYSMOD}/Sockets_PGA.pretty)(options "")(descr "The way you like them."))
(lib (name Socket_Strips)(type KiCad)(uri
${KISYSMOD}/Socket_Strips.pretty)(options "")(descr "2.54mm socket
strips."))
(lib (name Sockets)(type KiCad)(uri
${KISYSMOD}/Sockets.pretty)(options "")(descr "The way you like them."))
(lib (name Sockets_WAGO734)(type KiCad)(uri
${KISYSMOD}/Sockets_WAGO734.pretty)(options "")(descr "The way you like
them."))
(lib (name Symbols)(type KiCad)(uri
${KISYSMOD}/Symbols.pretty)(options "")(descr "The way you like them."))
(lib (name Terminal_Blocks)(type KiCad)(uri
${KISYSMOD}/Terminal_Blocks.pretty)(options "")(descr WAGO236-RM5mm))
(lib (name Transformers_SMPS_ThroughHole)(type KiCad)(uri
${KISYSMOD}/Transformers_SMPS_ThroughHole.pretty)(options "")(descr "The
way you like them."))
(lib (name Transistors_OldSowjetAera)(type KiCad)(uri
${KISYSMOD}/Transistors_OldSowjetAera.pretty)(options "")(descr "The way
you like them."))
(lib (name Transistors_SMD)(type KiCad)(uri
${KISYSMOD}/Transistors_SMD.pretty)(options "")(descr "The way you like
them."))
(lib (name Transistors_TO-220)(type KiCad)(uri
${KISYSMOD}/Transistors_TO-220.pretty)(options "")(descr "The way you
like them."))
(lib (name Transistors_TO-247)(type KiCad)(uri
${KISYSMOD}/Transistors_TO-247.pretty)(options "")(descr "The way you
like them."))
(lib (name Valves)(type KiCad)(uri ${KISYSMOD}/Valves.pretty)(options
"")(descr "The way you like them."))
(lib (name Wire_Connections_Bridges)(type KiCad)(uri
${KISYSMOD}/Wire_Connections_Bridges.pretty)(options "")(descr "The way
you like them."))
(lib (name Wire_Pads)(type KiCad)(uri
${KISYSMOD}/Wire_Pads.pretty)(options "")(descr "The way you like them."))
(lib (name Github_Wire_Pads)(type Github)(uri
${KIGITHUB}/Wire_Pads.pretty)(options "")(descr "The way you like them."))
(lib (name "Eagle Footprint Library")(type Eagle)(uri
E:\kicad\test_board_files\dp_pcb_7043.lbr)(options "")(descr "Test
curved footprint outline import."))
(lib (name test)(type KiCad)(uri ${KILCLMOD}\test.pretty)(options
"")(descr ""))
)
> If not, I will live with symlinks just as I do now.
>
>
> Regards,
> Bernhard
>
>> On 22 Feb 2015, at 22:21, Wayne Stambaugh <stambaughw@xxxxxxxxx> wrote:
>>
>> On 2/22/2015 4:17 PM, LordBlick wrote:
>>> In response to a message written on 22.02.2015, 17:40, from Bernhard
>>> Stegmaier:
>>>> Hi all,
>>>> […]
>>>> The last thing I came across is location of global fp-lib-table.
>>>> […]
>>>> Wouldn’t it make more sense or be more consistent to have it in
>>>> $KISYSMOD where
>>>> all models are?
>>> In my personal preference, best place is in configuration files dir, but if
>>> someone needs other place, might create non-conflicting with present way
>>> - some
>>> checkbox, code and edit field for override default.
>>>
>>>
>> That and a rewrite of the underlying fp-lib-table code which currently
>> only handles the two scenarios that I described.
>>
>>
>> _______________________________________________
>> 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