Enviroment Variable

I’m so sick and tired of developers changing things and not documenting anything. On top of that librarians are constantly messing with the libraries paths so the older projects get broken. And don’t give me that crap about “you should have local libraries” The whole point of having online libraries is that you can have them up to date and include all the new footprints and symbols automatically without constantly manually updating them. Otherwise remove them from repository and just include them with the latest install and call it a day! And there is no point for naming different folders in the first place. Just put it all in one dang folder and stop renaming it!!!

Ok, I’m done venting. To the subject - previously I used winbuilder and was running KiCad witn RunKicad.bat file where I would set all the enviroment variables. Now that we are so advanced and have a “stable” kicad version setting your variables before running kicad doesn’t seem to work. I add a batch file to the KiCad folder with two lines:

SET MYMOD=C:\Documents and Settings…(full path here)
start kicad.exe

The program starts but when I try to open pcbnew by clicking on the project pcb file - pcbnew doesn’t run and I see in the main project manager window the following:

opened [pid=6336]
pcbnew.exe closed [pid=6336]

So it attempts to run it and then closes it right away.

Now environment variable window is still available in the new version so I’m gonna go out on the limb and guess that there has to be a way to set them. Anybody got an idea as to how to do that?

Try using setenv.exe to set a volatile environment variable MYMOD

So KiCad doesn’t have a way to set its own enviroment variables? And why does PcbNew crashes (or fails to start) if I run it from a batch file?

Hey, I share your pain :frowning:

I’m not sure what happens with environment variables now either. It seems that paths are now configured by Preferences->Configure Paths on Kicad project manager, and these get stored in the kicac_common config file.

I got a warning about program settings overriding env vars (or vice versa?), I didn’t really understand what it was saying but it hasn’t happened again. The Kicad installer also seems to have put env vars into the system environment settings, but I don’t understand the relation between the two.

I haven’t seen any guidance on how the variables should be configured.

Thanks, that did the trick! Very typical KiCadian way to do it though. You can see your variables in one window but you can’t change them there. To change them you need to go to a different program. How hard would it be to merge configure paths into footprint library manager?

1 Like