inkup is an attempt to write a Vagrantfile capable of building a virtual machine, which in turn can build Inkscape Trunk from sources.
I've been interested in contributing to the great open source vector-graphics editor Inkscape for years. However, every time I've started reading the build instructions, I've stopped because of all the build dependencies which would "mess up" my computer. Inkscape is written primarily in C/C++, with extension support via an embedded Python interpreter -- and there's probably a lot more that I don't even know of. On top of that, it's got a huge list of build dependencies, not only direct dependencies but also build system dependencies.
After years of building up courage, I spent a weekend making Inkscape compile, then modified the Rectangle Tool to always place the resulting rectangle object at (0, 0). What a feeling seeing Inkscape behaving in this irratic way because I told it to!
Also during that weekend, I started writing this Vagrantfile, so the effort could be re-used for someone else and lower the threshold to build Inkscape from sources. It also means restarting development a breeze, e.g. if you re-install your OS or switch computer.
inkup was inspired by this forum thread.
The base VM O/S is Lubuntu Desktop 14.04-64 bit.
- VirtualBox - tested with version 4.3.10, 4.3.26 and 5.0.14, host OS Windows 7, Ubuntu 14.04 and 15.10. Make sure you enable virtualization technology in your UEFI/BIOS boot settings.
- Vagrant - tested with Vagrant 1.7.2 and 1.7.4.
- git clone https://github.com/objarni/inkup.git (or you could just download the Vagrantfile in this repo, and ignore git altogether)
- cd inkup (mkdir inkup if you ignored git!)
- vagrant up (this command needs Vagrantfile in the same directory to work!)
- Enjoy the build process Depending on your computers and network speed, wait from 30 mins to several hours (don't worry - rebuilding Inkscape from within the VM will be a lot faster!)
The provisioning script is defined in the Vagrantfile.
When you type "vagrant up", first it will download a Lubuntu 14.04 virtual machine image, then the provisioning script will do this:
- Adds the PPA for Inkscape Trunk to the VM
- Installing all packages necessary to build Inkscape from sources
- Gets the Inkscape source
- Builds Inkscape
- Write a finished message with what you can do next (e.g. run Inkscape from within the VM)
Yeah, that is by design. You want to see Inkscape - after all it's a graphical editor, not some server software :)
Just minimize the VM window during the build, and enter it when the build is finished to run your fresh, home-brewn version of Inkscape.
Once the build is finished (this will take at least 15 minutes, or more if you do not have the VM base image to start with), you can log into the VM using username 'vagrant' and password 'vagrant'.
The Inkscape binary will be built to /home/vagrant/build-inkscape/bin/inkscape
inside of the VM.
To update and rebuild Inkscape, you need to get your hands dirty and work from inside the VM.
- Step into the VM (user/pw vagrant/vagrant), decline the update
- Open a terminal (Menu at bottom left, System Tools > XTerm)
- cd inkscape
- git pull
- cd ../build-inkscape
- make
If you get into a messed-up state:
- cd ~/build-inkscape
- cmake clean-cmake-files
- cmake ../inkscape
- make
The shared folder feature of Vagrant / VirtualBox does not work so you cannot browse the source in your host OS which would be nicer than browsing and editing the source inside the VM. I get around this by downloading the Inkscape source on my host machine too, so I get fast navigation/source reading, and then I make changes in the VM using gedit or similar.