New OS X KiCad build with all the trimmings!

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:

  1. (In a shell window):

    cp ~/Library/Application\ Support/kicad/template/fp-lib-table.for-github ~/Library/Preferences/kicad/fp-lib-table

  2. Launched Applications/Utilities/Script Editor and entered this one-line script:

    do shell script “launchctl setenv KIGITHUB https://github.com/KiCad

  3. Saved the script as ~/.login-script.app with File Format set to Application.

  4. 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!)

  5. 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!

2 Likes

@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 :smile:

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 :smiley: 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?

Everyone, I’m afraid to inform you that I will no longer be releasing KiCad binaries. But, official nightlies are coming, hopefully in a matter of weeks. And I haven’t left everyone out in the cold, there is a better way now, and lets you stay up to date with the latest revision :smiley: : OS X homebrew KiCad tap! With library!

If I’m already successfully using the latest binary release from metacollin, then is there any particular reason for me to switch to the homebrew version rather than waiting for official nightlies?

NF6X: the homebrew version is --HEAD only, meaning it pulls the latest revision of the source code from the official KiCad development branch, then automatically builds and installs it as well as, optionally, lets you migrate your library to the online github repos (causing your libraries to be always up to date) if you want to but haven’t.

Whenever a new revision of KiCad comes out, you can follow the instructions in the tap’s README.md (which is also the text of the github page) to easily update your binaries to the newer version. I don’t know how much longer it will be before official nightlies start getting made - but this lets you build your own nightly whenever you want. Additionally, this builds everything so its specifically optimized for your system and OS X version, while the binary build is built for 10.8, and It happens to work on 10.9 and 10.10 too :).

But, many homebrew formula have downloadable binaries, the reason you would use homebrew over them is the same as any other. All files are kept in /usr/local, built against local dependencies which in turn are the optimal builds for your system, and the various other things homebrew brings.

The build settings are identical to my binary releases, so I wouldn’t call it ‘switching’. The homebrew tap lets users update or build KiCad to the latest version at will, so they are not at the mercy of people like me finding enough time to update it.

It’s not just for kicad though, it can also be used for library installation with non-homebrew versions of KiCad. It’s totally interoperable, and you can have a homebrew cutting edge build installed along side my binary release, and they will share a common library. I like to think I paid attention to as many details as I could think of and make everything ‘just work’ as best I could.

But if those are reasons to try building the tap or not is up to you. I imagine there will come a point where your version right now becomes outdated enough that you want a newer one, and maybe there will be nightlies being released by then, in which case you probably have little reason to bother. If there aren’t, well you have a backup option at least :smile:

Thank you for the explanation. I think I will stick with the binary that I have for now, and when I find a need to upgrade, I’ll see whether official nightlies that are suitable have become available yet. At the moment, the only particular thing that I feel like I’m missing is having more Mac-like trackpad/scroll wheel support.

After doing some work with this version there is one serious bug(/change?) I’d like to warn everybody about:

When using DRC, pressing “Start DRC” used to output rule violations/problems as well as unconnected tracks. It doesn’t do that anymore! You have to press the “List Unconnected” separately to see the unconnected tracks.

Otherwise everything so far seems fine.

Cheers
ff

I am going to resume my unofficial binary builds - despite my earlier post. I talked to the devs, and the official response from the developers is that their position is simply, “users should not have to build KiCad to use KiCad.” So, I think it is safe to say that unofficial builds distributed while we wait for official ones are OK with them. On the OS X platform, which still has no options for a recent non-stable binary, unofficial binaries save them the effort while reaping the ‘rewards’ of a larger number of testers/users and, hopefully, bug reports.

I will post again in this thread and update the main topic soon with new binary builds. I would like to say once again, these are not stable builds, the stable version is 4029. Be aware of the risks before using unstable versions in a production setting.

5 Likes

‘Upgrade Kicad Library.app’ addition.

I would love to try this out. I suspect my libraries don’t include everything I see on https://github.com/KiCad

could someone explain what all this .pretty business is about?

do you know why pcbnew or cvpcb search for the old folder reference where i’ve compiled the application after i’ve move it on Application folder from the Desktop? I have to compile directly in the

I know this is not about your homebrew tap, but nightlies are now officially available for download on http://downloads.kicad.org/osx/.