Edit Dec 29, 2017: added cmake flag enabling external plugins
Edit Aug 28,2018: added cmake flags for skipping more recent stuff like spice. Also added libboost-all-dev to list of packages installed
These instructions don’t work on ubuntu 18.0 or the recents linux mints (since they’re based on ubuntu 18). This is due to wxpython gtk2/3 issues.
end edit Aug 28, 2018
In my last post, I mentioned that compiling Kicad is something most would not be willing to do.
Most of the scripting in this blog will not work in version 4.0.5 which the most recent as of this writing. I recommend to install either the nightly or build yourself. If you just want the latest verion of Kicad, then you can find nightly builds in the Kicad Downloads Area
The scripting support in the latest source based kicad has progressed a bit beyond the released Kicad. There are one or two APIs that have appeared and the scripting window has some IDE’ish features added 2. I do want to make some C++ changes, so I have the need to compile. I was also helpful to step through execution to understand some of the APIs
VirtualBox Ubuntu install
These are my notes from installing Ubuntu VirtualBox.
- create virtual machine
- linux – ubuntu 64
- 4 GB ram
- virtual disk image
- file location and size to 32GB
virtualbox settings->storage->controller IDE->empty = set to ubuntu-16.04.1-desktop-amd64.iso
no install updates
erase and install
write the changes to disks – continue
set time zone
put in login details
it will want to reboot. do that now.
it will say to remove the install medium. VirtualBox seems to do that automagically
At this point you’ll have a clean install of ubuntu.
Take a snapshot so you’ll have it later.
in VirtualBox manager in the upper right. click snapshots
click on the blue camera and take a snapshot
start the machine again
go the the devices menu at the top-> shared clipboard -> bidirectional
devices menu -> insert guest additions
click run on the popup
give your password
start an xterm
Based on a list here: https://gist.github.com/ceremcem/4024c0a4a8649e858855 with some additions:
Edit Aug 28, 2018. Here is the cmake line that I have been using recently. It turns off the spice and oce stuff. You still need to install do something like the other lines listed below.
cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_ACTION_MENU=ON -DCMAKE_INSTALL_PREFIX=`realpath ../install` -DCMAKE_EXPORT_COMPILE_COMMANDS=1 -DKICAD_SPICE=OFF -DKICAD_USE_OCE=OFF ..
sudo apt-get -y install libwxgtk3.0-0v5 libglew-dev libcairo2-dev libbz2-dev doxygen libssl-dev libboost-dev libboost-thread-dev libboost-context-dev libboost-filesystem-dev libboost-iostreams-dev libboost-locale-dev libboost-program-options-dev libboost-all-dev swig python-wxgtk3.0* git cmake libwxgtk3.0 libglm-dev libcurl3 libcurl3-dev python-dev mkdir kicad cd kicad mkdir build mkdir install git clone -b master https://git.launchpad.net/kicad cd build cmake -DCMAKE_BUILD_TYPE=Debug -DwxWidgets_USE_DEBUG=ON -DKICAD_SCRIPTING_WXPYTHON=ON -DKICAD_SCRIPTING=ON -DKICAD_SCRIPTING_MODULES=ON -DKICAD_SCRIPTING_ACTION_MENU=ON -DCMAKE_INSTALL_PREFIX=`realpath ../install` ../kicad make make install
If you install into something other than /usr/lib; if you use prefix as is shown above, you’ll need to do this:
export LD_LIBRARY_PATH=`realpath ../install/lib/`
This is for Ubuntu 16.04.1. If these directions stop working, please leave a comment below.