Code Monkey home page Code Monkey logo

inkup's Introduction

alt tag

inkup

inkup is an attempt to write a Vagrantfile capable of building a virtual machine, which in turn can build Inkscape Trunk from sources.

Why?

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 VM

The base VM O/S is Lubuntu Desktop 14.04-64 bit.

Dependencies

  1. 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.
  2. Vagrant - tested with Vagrant 1.7.2 and 1.7.4.

Building Inkscape Trunk

  1. git clone https://github.com/objarni/inkup.git (or you could just download the Vagrantfile in this repo, and ignore git altogether)
  2. cd inkup (mkdir inkup if you ignored git!)
  3. vagrant up (this command needs Vagrantfile in the same directory to work!)
  4. 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!)

What happens on "vagrant up"?

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:

  1. Adds the PPA for Inkscape Trunk to the VM
  2. Installing all packages necessary to build Inkscape from sources
  3. Gets the Inkscape source
  4. Builds Inkscape
  5. Write a finished message with what you can do next (e.g. run Inkscape from within the VM)

Hey! A weird Ubuntu looking Window pops up during build!

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.

Running Inkscape Trunk

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.

Updating and rebuilding

To update and rebuild Inkscape, you need to get your hands dirty and work from inside the VM.

  1. Step into the VM (user/pw vagrant/vagrant), decline the update
  2. Open a terminal (Menu at bottom left, System Tools > XTerm)
  3. cd inkscape
  4. git pull
  5. cd ../build-inkscape
  6. make

If you get into a messed-up state:

  1. cd ~/build-inkscape
  2. cmake clean-cmake-files
  3. cmake ../inkscape
  4. make

Caveats

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.

inkup's People

Contributors

fredrikwendt avatar gecgooden avatar moini avatar objarni avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

inkup's Issues

Crunchbang as base OS?

Crunchbang is media-oriented and minimalistic, in a way idealistic environment for Inkscape.

A quick google didn't reveal any easily available basebox, but it would be possible to build one of course (how hard can it be..?).

This would also be a much nicer UX for an Inkscape dev env than Lubuntu which looks a bit dated to be frank.

Create up-to-date basebox to reduce initialisation time

This could simply be a newer version of janihurs' box, with apt-get update & upgrade already run. I still want to keep the current model of explicit dependency installation in the Vagrantfile (otherwise we get a "black box" and that defeats much of the purpose of having a recipe).

It would also enable switch of VM, however XFCE is quite a good compromise already.

Needs to be updated for move to gitlab

Hi Olof,

can you let me know if you have the time to update the vagrant file?

This repo was linked from the Inkscape website at https://inkscape.org/en/develop/getting-started/ , and I had to take it out of it now, because of the git move. However, I would like to include it again, when the repo has been updated.

[Note to self: this is the text:
Building inside a Virtual Box VM

Possibly the simplest way to build Inkscape is using inkup, which provides you with a Vagrantfile capable of building a virtual machine, which build Inkscape from sources. It requires you to have VirtualBox and Vagrant installed on your machine.]

Shared folder would be nice

Dispite several attempts to get VBox shared folders to work between host and guest, I have not managed to get it working.

VM H/W cfg out of date

3 GB ram may be too little for parallell builds. Also, the vb spec is for 4 cpus, while make is on -j2. How's so?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.