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:
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 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 -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.