Happy new year.
Mine didn’t start well. I updated Kicad from 5.0.0 to 5.0.2 on a Mac to try help with creating footprints with slot cuts integrated following forum advice.
In doing so I have lost my custom symbols/footprints and am confused as to where they were kept. I have a disk backup from before the update but I can’t seem to find anything for Kicad in Library/Application Support which seems to be where libraries live under 5.0.2.
I’m struggling to understand how I update Kicad without overwriting any symbols I have added.
Any help gratefully received.
You know where you put the custom files, don’t you? I don’t think you can just put your custom libraries in the same place where the official libraries are installed, although I don’t use KiCad on Mac. It’s more probable that you have lost the old KiCad’s configuration and the global library table files were replaced. By default the configuration directory is under your home directory in Library/Preferences/kicad/. You can try reading from the FAQ articles anything which has “library” in the subject line. https://forum.kicad.info/c/faq
In terms of location on a hard drive, then no, I don’t know where my custom files went. When I created them, I added them to the appropriate library (Connectors/RF Module etc.) within Footprint Editor but I’m not sure how Kicad deals with additions to libraries - i.e. simply adds them or places files within some ‘custom’ folder. I would expect the latter otherwise every update could result in losing all user created objects if the library files are simply over-written with new versions?
What confuses me most is that I have a hard drive with my 5.0.0 install files but the library files don’t seem to be present in the same location that they are after update to 5.0.2.
If you add stuff to the existing libs than it adds them to these.
I am also quite confused as these should normally be read only. (Needs the admin (root) password to write to these files)
Is it possible that you started kicad as root?
I would suggest to add environment variabile to point to your own libs…
My (inexperienced) guess is that my custom symbols were added to a folder that was simply replaced during the 5.0.2 update. All use of Kicad including updating is done through my normal user login on a Macbook Pro. I am the only user though, and therefore admin.
If you add or modify parts in the standard (or official) libraries then they will be overwritten when you install a new version. That is why it is recommended to always save modified or new parts to your own explicitly created library.
In some versions of KiCad, it will tell you that the official libs are “readonly”, not sure how it knows that but it is pretty useful.
Ok, then I think that’s what happened. My confusion is that I can’t seem to find those libraries (which now contain my custom symbols) on the disk I have with a 5.0.0 install. I assume that if I could find them, I could simply overwrite the more recent libraries with my cu stomised version(s), but there is no Library/Application Support/Kicad folder…? So I wondered if libraries on a Mac might be saved somewhere else.
My version 5.0.0 install replace a version 4.x install so I don’t know if that would make a difference to library paths?
It’s possible that the libraries are inside app bundles. But this requires someone who uses KiCad on Mac and who knows about KiCad packages. Maybe @adamwolf can help here.
EDIT: and BTW, if it actually can happen that you loose your own component files without any warning with a default setup just by installing a new version of the software, I would consider it a serious bug.
Thanks for your help, and all the responses so far. It does seem to be a real oversight to not at least be warned that custom files can be lost when updating. I understand there’s probably all manner of file management tricks that could be used but I don’t really have time to learn a bunch of Terminal command wizardry - I just need to get my work done.
Only if the user did not somehow tinker with file system access rights. (Or is stupid enough to give their user full admin rights. No modern operating system allows that easily. Not even most widely used linux distors. They all disallow root to run in windowed mode. But a user could setup sudo to be in nopassword mode.)
KiCad relies on operating system write protections for the official libraries to protect the user from writing to these. If the user sets up their system such that these protections are lost then they are on their own. (loosing kicad libs is the least of their worries at this point.)
It might however be a good feature to be able to mark libraries as read only from within the library tables instead of relying on the operating system here. (The difference being: this would be a feature request.)
Yes, that’s why I wrote “with a default setup”, including both KiCad and OS/user setup.
My setup was entirely default. My normal logon and using the .dmg Kicad download. I did nothing that I’m aware of to customise the install but still no sign of my symbols… ;-/
Something that struck me as strange too is that my kicad.app file for V5.0.0 is 299MB and for V5.0.2 it’s 395MB…?? Seems like a very large jump for a .0.2 update. Probably not relevant to my data loss problem, just perculiar…
Lets try to analyze your problem properly.
First we will try to find out if you indeed are able to write to kicad system libraries. Open any library and try to edit it. If you can save it then you have write access to it for some reason.
If you can write to the libs now then it is indeed possible that you added your personal stuff to a system library. Check where the variable KISYSMOD points to (kicad main window -> Configure Paths) If you have a backup of that location than you can try to restore it.
You should also check why you have write access to this location as the default installation (to my knowledge) puts the libs into a write protected area for all operating systems. I would guess that in that case something is wrong with your mac installation. (This is outside the scope of kicad. You might want to talk to some experts about that.)
If you can not write to system libs now then there is a high chance you never could do that. In which case your personal libs might live somewhere else. use the file search tool of your operating system to search for .kicad_mod files (or .dcm for symbols. .lib might give too many false positives.)
We can not really be of more help here as it is your responsibility to organize your own data. (If you do not know where you save your stuff, how should we know that?)
If you do not have a backup or can not find the original location of your libs then you can still restore at least the symbols and footprints you used inside of projects. (Will be some work per symbol.) If you need help with that then simply ask.
I just made click for me. (Just saw the git commit by adam.) There was no official version 5.0.2 for Mac until a few minutes ago. Where did you get yours?
Bummer. No one wants this to happen! I hope you find your files.
Let me maybe shine a little light:
When you install KiCad on a Mac, following the official DMG, what you’re doing is putting files in /Applications/Kicad and in /Library/Application Support/kicad.
If your files were in there, it is possible they were overwritten. If not, they really shouldn’t have been overwritten.
KiCad is really, really configurable, and you can put your files nearly anywhere, so I can’t make a complete list of places to look, but try ~/Library/Application Support/kicad too. If they’re not in there, then maybe run a search for the file extensions you’re looking for.
This may not help you now, but there is a backup-kicad script included in the DMG, and instructions how to use it in the README.txt, just for folks who might not have full system backups. (Our official packages are pretty good but I still don’t want someone running from nightlies who hits a weird bug have to restore a bunch of files from their backups.)
The libraries are not inside the app bundles.
The 5.0.2 for macOS has been out for a while, but only got updated on the website recently.
Ah, I wonder. Are you looking in /Library/Application Support/kicad, or in the Library/Application Support/KiCad in your home directory?