IntroductionKicad is a great, open source (GPL) electronic design suite that we have started investigating for use in Fritzing. Unfortunately, there are no pre-built binaries for OS X available, and few instructions for building it from source. The method I used is given below. DetailsKicad uses the wxMac version of the wxWidgets GUI library, so you'll need to have wxMac installed first. Since we would like our build of Kicad to run on both Intel and PowerPC Macs, we need to build Kicad and wxMac as universal binaries. PrerequisitesYou will need the following things to build Kicad for OS X: - Kicad source from the Kicad site (I used the latest version from SVN - 20071122-r468 at the time of this writing)
- wxMac source from the wxWidgets download page (I used the older version 2.6.4 because newer versions of wxMac are not confirmed to work with Kicad)
- the XCode developers tools (available for download from Apple) or on your OS X install CDs)
Building wxMacThese are very rough instructions that will (hopefully) be fleshed-out later. Apologies. - extract the wxMac source archive to its own directory (ex. /src/wxmac/)
- create a sub-directory for the build (mkdir /src/wxmac/osx-build)
- change into the build directory (cd /src/wxmac/osx-build)
- auto-configure the wxMac build with the appropriate options (../configure --disable-shared --enable-monolithic --with-opengl --enable-universal_binary)
- run the wxMac build (make)
Point existing system references (if any) to your new build of wxMacOS X from 10.4 on ships with version 2.5 of wxMac installed, but this version does not support Kicad. Before building Kicad, you will need to replace existing system references to wxMac with a reference to the instance you just built. This is a messy method and could definitely be improved, but at least it seems to work. - check for an existing reference to the wx-config utility in your path (ls /usr/bin/wx-config)
- if wx-config is not already in your path, skip to the next section
- move the existing wx-config out of the way (sudo mv /usr/bin/wx-config /usr/bin/wx-config-backup)
- and replace it with a symlink to the newly-built version (sudo ln -s /src/wxmac/osx-build/wx-config /usr/bin/wx-config)
Build Kicad- extract the Kicad source archive to its own directory (ex. /src/kicad/)
- change into the build directory (cd /src/kicad)
- open the libs.macosx configuration file in your favorite text editor
- change the line in libs.macosx which reads "UNIVERSAL=0" to read "UNIVERSAL=1"
- change the line in libs.macosx which reads "DEBUG=1" to read "DEBUG=0"
- save libs.macosx
- run the Kicad build (make -f makefile.macosx)
|
I have been using KiCad? from a virtual machine for a while now, but would like to run it natively. I tried following these instructions, and everything compiles correctly, but when running the icons on the toolbars (Place Wire, Place Bus, Place Component, Add Zone, etc) disappear after the first time you click on them. This appears to happen in all programs (I tried eeschema and pcbnew). The 'button' object for the icon is still there, i.e., if you click on where the icon should be, you select the correct tool, but you don't see anything other than a grey space in the toolbar. I see a lot of errors in the log along the lines of "<Error>: invalid context". Does this happen to you? Any suggestions on what I may be doing wrong?
BTW, I used wxWidgets from Darwin Ports, and replaced wx-config --libs in the libs.macosx with /opt/local/bin/wx-config --libs (same with the cppflags at the top of the file). I used the new stable (2.8.7) as neither the Darwin Ports version or the vanilla source version of 2.6.4 would compile for me. Please let me know if your icons work properly; if so, I will try to play with getting 2.6.4 compiled correctly on my system.
Cheers
I followed these directions and managed to get the binaries to build. However, the installation target was broken, so I had to copy them into the .app packages manuall, and I've been having to figure out all sorts of other paths the hard way. The current showstopper for me are a bunch of drawing artifacts that turn the screen into garbage as soon as you try to move or place anything. The screen isn't getting refreshed properly or something. This does look like a good program, though; I'll probably try it on linux in a virtual machine.