Common Library with 2 pc in same network

Just to put my two cents in for this (a version of which is covered in the link provided by John Pateman): I use git repos for my standard libraries. I don’t currently share my libraries with a team but I use them across multiple personal computers (as well as for backup purposes and version control). It works pretty great.
I make all of my projects within their own repos and create release files that include the copied versions of any lib/3D model files. This makes sending things to clients after stages of dev are completed easy but wouldn’t be perfectly ideal for continual development without giving full access to your standard library repos. I’d be interested in a nice solution that updates a project level library from the ‘master’ library when run to include in my Makefile.

2 Likes

A like for using git.
When using git, it tracks your changes, and it’s also easy to setup a master repository for distributing your library to your different PC’s. A quick search shows that Synology has support for git in their NAS boxes. I don’t know about other brands. Sometimes I’m thinking of making a NAS box myself, but it would be a standard linux computer with some HDD’s or SSD’s, so I’ve never looked up what those commercial suppliers of NAS boxes deliver. So read the manual of your NAS.

I do not know the Git too much, but Mercurial could be the answer too. Mercurial (maybe also Git) is able to push/pull of the local repository against repository on the shared disk, no server support is needed, just file access.

The best solution for sharing the project could be:

  1. you will have repository (directory) with libraries on the NAS
  2. you will have repository (directory) with KiCad project on the NAS
  3. in the project repository, there will be “linked” repository with libraries (subrepo, see https://www.mercurial-scm.org/wiki/Subrepository)

Transfering project between 2 PCs:

  1. on first PC commit changes, push to server (NAS)
  2. on second PC pull from server (NAS) and update your local files

Advantages of this approach:

  1. you will have all libraries in one repository (directory) and not copied many times in unknown versions among your projects
  2. for each project, you will have libraries in the right version
  3. libraries in project can be updated just via pull from the repository on server (NAS)

Well…
The trouble does not comes from the NAS. (And using Git will not solve here.)
(Also ,why using an external link, if I have all I need in my network?)

What I do:
I open Kicad, and no project opened
I create a new library using the footprint editor.
I draw a new footprint inside, some pads, for example.
I save the footprint.
I close the editor.
I have a look at the clock , 8:00 pm today for example.
I close Kicad

Then I search for all the files on my PC, on the directories used by kicad ( and synchronized if I power on the NAS).
And I do not see the files with the recent clock.
If I do not see any file with the files updated using the windows file explorer, I guess git or Qsync (NAS client ) will not see too.

I will do more tries, between others tasks.

git or unison can be used. git can roll back and unison only syncs two pc bidirectionally.

I have found a way to make it running.
As you said, I have to inform Kicad (I do it now in the list of libraries) that there is a new library.
I will have only a few personnal libraries, and only two PC, so it is not heavy to manage.

The synchro runs , and Kicad runs, as soon as all the paths in the editor are completed on the PC where the library hasn’t be created. (For guys who speaks of others softwares to do the synchro, it was not necessary to change.)

One question now , is to know how to modify the alternate paths , see picture.


If I try to delete, they are still there when opening again.

If I try to create a new library, Kicad proposes the path on drive C under Documents.
Capture_path_proposed

Preferences → Configure paths

I tried to modify in preferences, but, if I replace the path with another, for example footprints Kicad don’t found the standard footprints.
Capture_preferences

Must i add another path , with the same environmental name? Like KICAD6_FOOTPRINT_DIR ?

I have tried.
The variable can have only one value.
Adding a new value kills the old value, and Kicad don’t found the libraries.

You can use whatever name for a new variable. The important point is to add libraries to the library table (fp-lib-table in case of footprints) using that variable name. Now there are libraries using “KICAD6_FOOTPRINT_DIR” in the fp-lib-table. When you change the content of the variable, KiCad tries to find those libraries from the new location.

To understand this better you can create a test library with just one footprint and put the library folder in some location different than your other libraries, for example under C:\temp. Create a variable TMP_FP or something like that and point it to C:\temp. Go to Preferences → Manage Footprint Libraries. I suggest adding to Project Specific libraries for testing purposes. Use “Add existing” (the folder icon) and add you testing library. Now you should have a new line there which automatically uses TMP_FP.

My 3 cents.

I use Windows.
I don’t know what NAS is.
I have done my Backup.bat (all important files backup) and Backup_r.bat (only new files backup) in the 90s and never had enough motivation to search for something else.
I have my KiCad project files in D:\Mm\KiCad\PrjGrpName\PrjName directories.
I have my KiCad symbol libraries in D:\Mm\KiCad\_SchLib directory.
I have my KiCad footprint libraries in D:\Mm\KiCad\_PcbLib directory.
I have my 3D models used in footprints in D:\Mm\KiCad\_3DMod directory.

I backup D:\Mm directory each day.
When I want to work at laptop I just have to copy Mm directory from my backup pendrive (in my case that means copy from last full backup + copy from last ‘new files’ backup).
I don’t expect any synchronization program (I understand NAS has such function) can do well with PrjGrpName directory and not do well with _SchLib or _PcbLib directory.

The only problem for me is the C:\Users\Piotr\AppData\Roaming\kicad directory that is out of my backuped D:\Mm directory. But I didn’t noticed any problem when I just didn’t copied the current version of it. Only configuration that is not saved in Project file can be little ‘not current’. For example current project or recently Opened Projects list are old but it takes few seconds to search project I want.
I have no problems with library lists as since I have set them in 2017 I didn’t changed them.

Hello.

To be clear, the trouble is not from the synchro again. It works perfectly well in fact.
The issue was only because if I do not create the same name (and only the name is necessary) of library on the second PC, it does not know that there is a library created.
Once this done, it runs.
I am on Kicad 6 and reading the FAQ, Kicad 5 seems a bit different.

AT the moment , I have created a new library on PC2. and is only visible on it.
I have to do just an extra job on PC1 to let Kicad know it.

An other issue I see, is that it is impossible to modify the defaul path that Kicad propose where to save the footprint library. If I don’t take some extra attention, it will save it under programfiles/kicad/ etc…

So I look now how to change this value.

Me too.

Testing all the KiCad’s functions (and finding what can be improved) is of course much appreciated by all of us as a way to make program better.
But if the goal is to make the life easier it may be better to avoid unusual actions.
From my point of view, creating libraries is a one time action. Moving to KiCad I thought carefully about what structure of libraries I want to have and I created them once using those time KiCad 4.0.7 (at the beginning I had in some libraries only 1 (not needed by me) element (symbol/footprint) just to not have it empty).
Now I only use:

  • ‘Save Copy As…’ in Footprint Editor,
  • ‘Save As…’ in Symbol Editor,
  • copy file using file manager if I want one of KiCad’s footprints to have in my library.

If you create at one PC the new library and then add it to the list then you modify the contents of AppData\Roaming\kicad at that PC so you need some way to copy it to second PC.

You can probably find the way to have that all done automatically. I can’t help in it. I am just saying that may be the simpler solution is to find workflow not needing it.
It’s just my lazy nature - I’d rather avoid problems than solve them.

Many thanks for this post.
You are right, and I forgot to have a look on App/data/roaming.
The file fp-lib-tabl is there. and the update of library is inside.

As you say , I can find the way to do it automatically. or I continue to create again the same names on the other PC. At the moment , its works . I wiil see if I put this directory in the list of those managed by the synchro. It is very quick to do , but not very universal.

The file fp-lib-table is the result of what Kicad footprint editor writes at the exit .
My way is to say the other kicad to do it, while creating the new name, but like an human , it is necessary that I remember to update the other PC.

On other way is to put every footprint in one unic library. And may it is what I will do , because I do not have so much footprints to create, even if I will mix THT, SMD, connectors, and so on.

Working with Protel (till 2017) I had all footprints in one library that during years raised and raised.
When decided to move to KiCad first I done (before even trying to design first PCB was to decide how will look my library structure.
I have described it some time ago (may be you will see it useful):

I came here to suggest the use of GIT and also Github or similar to make sure your libraries are under version control. The merge features may even help if you have two persons or two PC with changes against a single library.

If you are not using some sort of version control or cannot explain with a very convincing case why you are not using version control that is symptomatic of not understanding how it may head off the problems you anticipate and will head off the problems of crashed or corrupted PCs.,

Git may not be the best VCS in this situation. The op wants to use a NAS for library storage and if they are going down the VCS route, SVN might be a better fit. One advantage is that SVN can enforce file locking and thus help to avoid merges altogether. You really don’t want to have to decide how to merge something like

(fp_line (start -6.38 -15.5) (end -6.38 -35) (layer “F.SilkS”) (width 0.12) (tstamp 1447f2d7-77d5-417d-ab18-c865cb322f17))<

With

(fp_line (start -6.38 -35) (end 61.62 -35) (layer “F.SilkS”) (width 0.12) (tstamp 2e696190-d0be-445e-b040-877485973888))

I can fully agree about advantages of file locking.

However the problem of merging:
(fp_line (start -6.38 -15.5) (end -6.38 -35) (layer “F.SilkS”) (width 0.12) (tstamp 1447f2d7-77d5-417d-ab18-c865cb322f17))<

With

(fp_line (start -6.38 -35) (end 61.62 -35) (layer “F.SilkS”) (width 0.12) (tstamp 2e696190-d0be-445e-b040-877485973888))

Is much better than one overwriting the other and nothing to merge.

I have no idea if the Tortious interface I have used for SVN managed the locking and if it would for Git on a local or NAS drive. With out fear of contradiction I can say I may be giving less than the best advise regarding that issue.

Hello.
First of all, the problem is not a replication problem. Read the whole thread again.

My libraries are perfectly updated on the NAS, and copied to the other PC, as soon as waked up, , with the NAS utilities.
In my case, I am the only one on my home network using Kicad, and on my own PCs.

Git, SVN are not useful here in my case. I use Git for the development of a C software shared with some friends.

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.