Manage path for a collective project

Hi everyone,

I try to use kicad for a common project with friends.
We need to create news libraries of components and we share on github.
How i can do manage path for all libraries ? because when we update our circuit from git we get error of path.
So we need change path all time and is not convenient.

Thanks.

That’s a good question, and I am still trying to figure out how to do that. I have a number of projects on github that I would like to just load and view by anyone without having to do customisation of their local installation.

If you have a self-contained project, then you can keep symbols and footprints inside it using relative paths. 3D models still need a fixup, the environment variable KISYS3DMOD needs to be set for the right path before starting Kicad. Unfortunately this is global, so all 3d Models in the project need to be on that path, and you need to have different setups for different projects.

If you have a common repo for footprints, then you can use it directly within Kicad. Users will need write access to the repo to push changes back. This doesn’t work for symbols and 3D models, there is little option but to tell the user to git pull into their local common storage (e.g. c:\kicad_data\libraries\extras).

So unfortunately, not much option to either changing paths, or copying files about.

Unfortunately this is global, so all 3d Models in the project need to be
on that path, and you need to have different setups for different
projects.

We can set the environment variable only for one project ?

Before when my project was little i placed all libraries in project and i used the variable KIPRJMOD to keep correct path. Ideal for footprint an 3D models for schematics just paste new lib in current project…
so no problem for sharing my project.

Know with git i have one directory for all libraries ( schematics, footprint and 3Dmods ) and many directories for divers projects.

So i think is not really different from the architecture of kicad who it use github for footprint an 3D models?
we can not add an environment variable path to synchronise?

And i have a big question on paths for schematics. Where we can modify or add a path like footprint editor??
By default we have only tree paths and fourteen is just the path off the current project.

If you use github + the kicad github plugin then you simply add an fp-lib-table entry for your repository (assuming the repository is structured like kicad’s footprint repositories). An entry in fp-lib-table may look something like this:

(lib (name mygithub)(type KiCad)(uri ${MYGITHUB}/myGitHubProject)(options “”)(descr “My Github footprints”))

Of course you need to define the environment variable MYGITHUB.
There are GUI editors within pcbnew etc. so you don’t have to edit the file with a text editor.

Schematics do not have a scheme like pcbnew yet. You can edit the project settings from within eeschema or if you are familiar with the project control file (PROJECTNAME.pro) you can edit this with a text editor.

1 Like

Is there any reason not to use a specific URI? e.g.

(lib (name mygithub)(type KiCad)(uri https://github.com/bobc/rmc_modules)(options “”)(descr “My Github footprints”))

For portable projects, I add to the “project specific” fp-lib-table.

I see we can change the path with a text editor. But i tried to add an environment variable and not effect…
So i haven’t try with an environment variable specific to linux, maybe it’s work.

You can make the environment variable whatever you want, but it has to be defined somehow. You can define these environment variables within KiCad using the menu Preferences->Configure Paths. The same menu is also available in the footprint editor.

The ${ENV_VAR} approach just makes it easy to enter multiple repositories (which is what KiCad has set up by default). If you only have 1 repository then there’s no advantage to using the environment var.

Git bucket is different from Github?

I can’t add my path. If i try to add by “Libraries Wizard” i got this error : > https GET command failed

Cannot get/download data from: ‘https://api.github.com/orgs/hardware/dvbcam_Kicad_Lib/repos?per_page=99&page=1
Reason: ‘Not found’

is not the path what i mention => https://api.github.com/orgs/
my path same like this => http://git.mybox.com:8080/ (not the real address just for example)

The git plugin only works with github, and it doesn’t use git api. I think it downloads a zip by creating a URL such as https://codeload.github.com/bobc/rmc_modules.pretty/zip/master based on what you tell it. So it must be github, and must be the head of the master branch.

Ah, there has been some talk about using generic git, but this has not been implemented. At the moment the plugin will only work with the github API.

I just took a look at the latest code, the URI must be a github.com repo, or any generic URL that returns a ZIP file. In the case of github, it does not use the Github API (api.github), but the codeload.github.com URL.

So if you were using bitbucket, the URI could be https://bitbucket.org/BRCElectronics/simplecortex-repo/get/318f444abb69.zip

1 Like

Ok,

Very thank for your help !

Ps: For libraries schematics we decide to set path with a relative path simply, work on each PC. For the other lib (footprint and 3D) just add a path like a local library on our computer. Disadvantage no automatic update… and we need to push if we change or create a footprint.