Ok everyone, I uploaded a new build, BZR 5324 and fixed the Update Library script (thanks for finding that, Alric!). I finally got a OS X 10.8 and 10.9 environment set up and was able to test it under both, and it seems to work fine now on 10.8-10.10. Sorry it took so long. Download it here or at the top post.
Hello Metacollin,
I am glad that I was able to contribute. Anyway - I think I found another issue with the libraries. My KiCAD is not using the proper fp-lib-table
in the folder $HOME/Library/Application Support/kicad
. I am not sure which file it is actually been used but definitely not the one that gets downloaded by your update script. (I added a global GitHub library to alter/create the used file but was not able to find it - does it have the same name?)
A workaround is to simply copy the file fp-lib-table
from the folder $HOME/Library/Application Support/kicad
to a KiCAD project folder so that the libraries are being used as local ones. A global solution would still be nice as it could be updated by your script. Am I missing something?
Thanks again for your great work. It is awesome to be finally able to work without a VM!
Airic
Alric, it works on a clean slate, but there are probably going to be issues depending on what config files older versions of KiCad may have left various places. Resolving paths and which files where get precedence on OS X is an ongoing issue at the moment. There is likely an older fp-lib-table file in your ~/Library/Preferences/kicad
folder, delete or move/rename it and relaunch Kicad then go to Pcbnew. You should see a window pop up saying this is your first time using the new library system and some information worth reading. If you go to your Library tables window, you should see it populated with the github libraries.
Kicad copies the fp-table-lib file from $HOME/Application Support/kicad
to your $HOME/Library/Preferences/kicad
folder, but only if there isn’t one at that location already. If there is one, KiCad will not look anywhere else, and there is no point in doing so at the moment, as it doesn’t have the capability to merge or import table files (yet).
I could have the script do this, but it’s a fairly strict rule that programs on OS X are NOT to modify anything is the user’s Preferences folder beyond the folder or file a given .app is the creator of (or shares a bundle ID with). Even if I were to prompt the user, that’s still dangerous, I don’t want to risk doing anything that might cause real damage in a production environment by wiping something kept in that folder. So until KiCad can do it itself, the user must manually remove their old table file themselves, or alternatively, manually merge the two in a text editor. This is not specific to OS X, if you look in the official KiCad documentation, it instructs you to do exactly this, though you have to manually use git to pull in the fp-table-file files and do some other stuff (which is essentially what my script does for you).
I am hoping soon, it will merge a fp-lib-table file that is installed into application support, which would make for easy upgrading/addition of new libaries without disrupting whatever a given user has set up for themselves.
Note, by moving/deleting/renaming the fp-lib-table file in the preferences folder, you will lose whatever library setup you currently have (you can always move the old file back into place of course, but then you lose the github additions).
You’ll have to re-add them manually, or edit the file in your favorite text editor and past in the paths etc. from the old to the new. I just went with the clean slate then manually reimported some eagle libraries, personally. Bit of a hassle but it should be the last time anyone has to do it.
Thanks, that is exactly the response I was hoping for. I too agree it should be single .app bundle, and have had all those same thoughts, I have certain expectations of OS X distributions of software to conform to certain standard workflows/usage patterns/look and feel/simplicity. I wanted to be sure to not give my own opinion on the matter, even though I consider myself a hardcore mac user. I didn’t want to make it seem my own opinion was influencing others etc.
Very good and thoughtful feedback regardless. And that’s a very good idea on how to handle libraries. Application Support is, per Apple guidelines, for applications to store files that are not config/preference files, but files that cannot or should not be stored in the bundle itself (Application .app bundles can’t modify themselves, for example, so content that needs to change often will be put in Application support). BUT, the user should also never have to go into this folder, nay, is effectively prevented and discouraged from doing so, requiring special effort to even get into the Library folder.
I was thinking of simply doing what, for example, the Processing IDE (this is what the Arduino software uses) does, which is store user files in their Documents folder. At least by default, letting the user pick it manually is something they should have the freedom to do as well.
I’ve been really busy folks, so I haven’t been able to respond as quickly as I’d like, and have yet to suggest any of this to the KiCad team, but as soon as I am able, I will. By suggest, I mean I will be volunteering to make said changes myself, if they are ok with them. Only suggestions that the person suggesting them is also willing to implement and merge into the main code themselves are that helpful, since the people developing it have a fairly long list of things to do and won’t be looking for things to add to it for a while yet ;).
Nice one!
I just opened all parts of the suite and they seem to work fine. Only exception is cvpcb (started from eeschema) which crashed the application, but I blocked outgoing traffic from kicad to github, so that’s probably the cause.
Once I’m off work I’ll give it a thorough testing.
Question: will putting everything into one .app lead to the fact that all parts close upon a crash of one?
Because I tend to do work on both schematic and board during the final stage of design. That might lead to changes in one being lost due to crash of the other…
Odd… if it happens again, I’d love a crash report. Connecting to github works perfectly and happily for me. If it’s crashing for you, it’s probably my fault, but a crash report (just the first couple pages, I don’t need the part that give your computer setup etc.) and if its my fault, that also means its possible to fix it soon ;).
Nope. In fact, they’re still separate apps, just inside the KiCad app. It’s totally ok (and actually very common) to have apps within apps, like a digital matryoshka doll. For a while now, the other .apps have just been aliases to that app inside the KiCad .app hehe. Right click on KiCad, select Show Package Contents
then Contents->Applications
and boom. There they are, chillin’ in their new home.
I just omitted the aliases, because it was cluttered and potentially confusing. I don’t know though, maybe some people have workflows that involve only running one part of the suite without the others? I decided probably not, but I could definitely be wrong. Opinions on that are welcome
Ok, this worked. Thank you for the hint with ~/Library/Preferences/kicad
!
I am happy with the solution you described and I understand that automated installations might be tricky. As long as this is described somewhere (here!) I don’t see a problem in this.
Is it a bug in KiCad or why can’t I select the track-widths and grid sizes in PCBnew with the mouse? I need to scroll and select an item using the keyboard which is a disturbing interruption in the workflow. I guess every drop-down shows this behavior… Is there some flag you can set for the compilation?
Anyways - working with KiCAD was never so fast and fluent before (ok - maybe on a dedicated Windows machine but I really would like to stick with my Mac)!!
Cheers,
Airic
@metacollin Best OS X build yet, many thanks for all of your efforts!
Question for Mac KiCad users: has anyone found an efficient way to use KiCad using a standard issue macbook trackpad? What I’m missing most is the 2-finger scrolling gesture to pan around in a schematic or layout (this works as expected in Eagle, just like it does in OS X Preview, or other standard apps). In KiCad, the 2-finger gesture controls zoom level, and it is crazy-sensitive.
I’ve found that an external mouse with a middle-button-click-wheel is almost required, where scrolling click wheel = zoom, and dragging with click wheel depressed = pan; there is no convenient equivalent of this on a trackpad. Has anyone found a better approach, or way to change gesture responses in the settings or source code?
Dear @cbonsig from 8 hours ago: Here’s a patch that was created for this purpose a while ago. This is what I was hoping to find, but it does not appear to have found its way into the current dev branch. Any other thoughts or recommendations out there?
http://www.sharebrained.com/2012/05/21/patching-and-building-kicad-on-mac-os-x-lion/
Well, cvpcb crashes KiCad entirely (all processes) when refused a connection to github. KiCad itself gives no report on this and the one OSX provided seemed much to long. I didn’t follow up on that since I won’t depend on github. Anyway, with connection it worked, though giving me
Apart from that it seems to work excellent! Thank you so much!
A few old issues stay, but that’s probably actual coding work:
- in cvpcb the menu bar containing track width etc. sometimes vanishes. The dropdown menus there don’t respond to choosing with a mouse. You have to click and then use the cursors and enter.
- when opening programs, they don’t open in the foreground but as last in the back
- as others mentioned above it took me some time to remember where my old fp-lib-table was stored and then use it to replace the new one
*grid in openGL mode is almost invisible
But who cares? This version feels very responsive!
- so far no crash
- gerber export seems to work fine
- p/s-router works in openGL mode
AWESOME!!
cheers
ff
Hi! I’m an experienced PCB designer with most of my work experience being with Mentor PADS. I presently use Eagle on my Mac for my home projects and open-source stuff. I’ve been interested in trying to switch from Eagle 6.x to KiCad for a while, but the difficulty of building it has discouraged me so far. I found this thread last night and decided to take the plunge with metacollin’s build (thanks!).
I found that it wasn’t obvious how to set up the library list, and I had to dig through several threads here and on stackoverflow to figure out what to do, so I thought I’d share the steps I took in case they help anybody else.
I’m installing on a new Mac Pro running OS X 10.10.1. I installed the KiCad wrapper app by dragging it into Applications, and I had to go through the usual contortion to launch an unsigned app for the first time. I temporarily allowed running unsigned apps in Preferences to get the library updater script to run successfully.
After doing this, I found that ~/Library/Preferences/kicad/fp-lib-table contained an empty list. So, here’s what I did next:
-
(In a shell window):
cp ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github ~/Library/Preferences/kicad/fp-lib-table
-
Launched
Applications/Utilities/Script Editor
and entered this one-line script:do shell script “launchctl setenv KIGITHUB https://github.com/KiCad”
-
Saved the script as
~/.login-script.app
with File Format set toApplication
. -
In System Preferences->Users & Groups, I added the above script as a Login Item so that it would be executed at each login. To add that hidden dot-file in the file requester window, I pressed [Shift]+[Command]+[.] to temporarily reveal hidden dot-files (yet another trick that I didn’t know before!)
-
Logged out and back in.
Now, KIGITHUB is set when I launch KiCad as a normal app, and my Library Tables window in Pcbnew shows the GitHub libraries. I’d post a screen shot of the window, but it looks like I can’t do that as a new user here.
I’m still just barely getting started with KiCad, so I’m not positive that I’ve actually done the right things here. If anybody can offer suggestions about things I should have done differently, additional environment variables that I should set, etc., then I’ll update my post. I thought that just figuring out how to set environment variables for apps launched from Finder might be a useful thing to share, so I decided to post while it was still fresh in my mind.
I just wanted to thank you for the effort — it is very much appreciated!
The lack of KiCad releases (also on Mac OS X) is the single biggest obstacle to wider adoption. There are many people who aren’t capable of tweaking the flags and getting it to build. There are also people who are capable, but have lots of other things to do, so they decide to wait until KiCad becomes easily available — I fall into that second category.
Also, contrary to what Dave Jones says on the Amp Hour, there are lots of Mac users and lots of them do electronics. He might not care about the Macs (and be very vocal about it), but looking around me Macs is all I see. Which just means that we do need multiple platforms and one should not try to wave any of the platforms away.
So, thank you — and please continue!
@metacollin, I’m not trying to disparage the work you’ve done, but the problem is that everything you’re doing here is being worked on by the development team. Granted the developers have not done the best job of communicating this to the user community, but all of this is being done and OS X binaries are very close. Instead of launching a parallel effort here, you really should join the developers list and offer help with that effort. The best way to insure that the resulting binaries will best serve the user community is to express your wants and needs there. The development team has made great strides toward putting together a better OS X experience and Adam Wolf has done a huge amount of work to get that packaged up so that binaries can be released. A new, modern stable release is in the works.
@cbonsig, If you don’t mind building it yourself, there’s a branch on launchpad, osx-trackpad-gestures, that includes trackpad support and a few other things. It’s not yet in the mainline, but hopefully will be in the not too distant future.
@spike, I am just compiling binaries and zipping them. I don’t see what I am duplicating effort-wise, as there are no product branch binaries available on either launchpad or the official KiCad site that I could find. And I am, in fact, on the developers list, have a merge request awaiting approval on launchpad, and have a second branch I am actively developing. I asked what I asked on these forums with the intention of bringing these opinions to the developers via the mailing list, which I believe I stated, but if I am wrong and I forgot to mention that, I apologize. That was always the intent.
As soon as they have Jenkins running smoothly and making snapshot binaries for OS X, I will cease releasing my own binaries and remove it from my servers and redirect this thread to the official snapshots. This also was always my intent.
I haven’t posted to the mailing list yet simply because I am still working and testing some of the changes and to have some patches ready so they can see what a given feature will actually change code-wise. If not, then I’m just another person telling volunteers how they should spend their time, and that’s not really helpful. All of my work done to the actual code or project are available as branches listed on the official launchpad site for kicad. Also, none of that is seen here. The binaries I have put up for download are virgin and come straight from the repo, and use the .dmg creation script. I literally have been converting that to a r/w dmg, adding an apple script, making it read only again, and uploading it.
I am not really sure what the problem is, if you could be more specific, by all means, I would like to hear it.
Again, not trying to disparage you. The fact that you are putting in so much effort is great. It wasn’t clear that any of that effort was going into getting the official binaries produced, and I’m sure the help would be welcomed. There are things you posted above that seems more than building and zipping and some are being worked on by the development community, though. It would be great so see that effort going into the official binaries. Perhaps it will get them out just that much sooner.
There seems to be a lot of input from users here and you would be a good conduit for that input so that the resulting official binaries will truly serve the user community. I think you should go ahead and post to the developers list and introduce yourself; let them know what you’re doing and what the users here are asking for.
I will, I should hopefully mail them later today
The only thing I added was a ‘Update Libraries’ bash script disguised as a .app (for ease of use). The bash script is next to worthless and not worth being committed or anything. I wrote it in 5 minutes to ease installation until the official library wizard was finished, but its just a temporary hack, nothing more, to fill a gap until the official means of library management is added. Or was added I should say. It’s done and working now I had nothing to do with it, but I am thankful to the devs for writing it!
@spike I know you’re only encouraging me to do what is in the best interests of the community and KiCad, and I do not disagree with anything you’ve said, or think you were disparaging anything. I should have made certain things more clear, and by not doing so, gave you every reason to write that post.
What I AM working on is integration with boost 1.57 (maybe even unpatched, but that might not be possible), some improvements to the CMake files for OS X, taking advantage of link time optimization that only recently became available in clang, and documentation on creating a ‘distribution ready’ KiCad build, as this cannot be with XCode 6 and it’s command line tools alone, or using OS X’s built-in python, which I think has been overlooked but I will bring to the devs attention.
I have also intentionally made no website or other presence beyond a link in one post in this forum, to make sure everyone who obtained these unofficial builds will hopefully find out about official snapshots and to retire any use of my builds, so there are not random binaries floating around the net.
@spike thanks for pointing me to the osx-trackpad-gestures branch! After several attempts, I was able to get it compiled. WxWidgets took quite some effort to cooperate on Yosemite (10.10). In the end, despite adding the flag noted in the compiling instructions, I haven’t yet been successful getting the trackpad gestures working. I’ll keep hacking though.
@metacollin thanks again for making KiCad easier to install for those of us daring to live on the bleeding edge. I’ve been able to get some good layout work completed using your OSX build.
There are a couple of things that need to happen for it to work.
Documentation/compiling/mac-osx.txt is updated on that branch to reflect the build differences. There is an additional patch needed, wxwidgets-3.0.0_macosx_magnify_event.patch, and an additional build flag, -DUSE_OSX_MAGNIFY_EVENT=ON
Also, there is a new preference, “Use mousewheel to pan”, that should be checked. Unfortunately, due to the way kicad preferences work, this must be done in each application that supports it, e.g., eescheema, pcbnew, etc.
Let me know if you still have trouble getting this going. It should work for all canvas types, but works better in the speedier GL canvas. That branch is up to date with trunk as of this morning.
Thanks @spike! I was missing the “use mousewheel to pan” checkbox. I had tried checking/unchecking various pan+zoom preferences, but had not found the correct combination until I read your message. It would be helpful if that preference (or at least its tooltip) included a reference to “trackpad”. I’ll try to add a pull request to that effect.
Incidentally, although I have included the “magnify” patch and build flag, the pinch-to-zoom gesture using the built-in touchpad does not seem to work. Panning with the two-finger swipe gesture does work perfectly, though, and that is much more important, so I’m more than satisfied.
Well, technically that preference isn’t just for the trackpad, this can be used if you are using a mouse as well. That preference is just so that mousewheel events cause it to pan instead of zoom. The fact that the trackpad sends mousewheel events for two-finger scrolling is kind of incidental. Point taken, though, I’ll add something to the tooltip.
Not sure what’s going on with the pinch-to-zoom. Are you sure that the patch applied cleanly and that you are linking against the right wxWidgets?