Building Glimpse/Linux

From GlimpseWiki
< Building Glimpse
Revision as of 20:39, 22 September 2019 by ChaoModus (talk | contribs) (Instrugctions on how to build on debian etc →‎Build locally on Ubuntu 18.04 LTS)
Jump to navigation Jump to search

This page contains instructions specific to building the Glimpse source code locally on GNU/Linux systems.


Build in Gnome Builder

GNOME Builder is an IDE built around Flatpak technology, which makes it extremely easy to build and run your own changes as you contribute to Glimpse.

First, clone Glimpse in Builder: (if you already have a clone, simply open it with Builder)

Cloning Glimpse in Builder

If you are prompted to install the Sdk required to build Glimpse, you should accept as this is required. You will then be taken to the Builder workspace, where you can edit the Glimpse source code.

Next, click the build button in the top bar:

The "build" button

Builder will build Glimpse with Flatpak. This means it will build both Glimpse and its dependencies, which might take some time. Fortunately, this is only done once. Subsequent builds will only build the changes you have made to Glimpse.

Finally, when the build completes, you can click the run button:

The "run" button

The Glimpse main window should now appear.

Build in a Virtual Machine with Vagrant

For developer convenience we have provided a "development environment in a box" that can be provisioned and run on any distribution. You may also want to choose this approach if you do not want build dependency packages affecting the stability of workstations you rely on for daily productivity tasks.

  1. Install the latest version of Oracle Virtualbox with "Guest Additions".
  2. Also install Vagrant, the scripting engine you will use to provision the virtual machine.
  3. After cloning the Glimpse source code from Github, run this command from inside the cloned directory:
  4. $ vagrant up
  5. Once the virtual machine has finished being provisioned, log in to the virtual machine:
  6. $ vagrant ssh
  7. Change to the /vagrant directory, as that is where the source code is mounted on the virtual guest operating system.
  8. Run the provided build script inside the virtual machine:
  9. $ sh

Because X11 forwarding is already enabled you should be able to launch your built copy of Glimpse from inside the virtual machine:

$ ./glimpse-prefix/bin/glimpse

The vagrant up command uses Vagrantfile to determine the parameters of the virtual machine, and glimpse-vagrant.yml is used by Ansible to install the prerequisite packages.

Build locally on modern Ubuntu or Debian

This will build locally to the system and install in /usr/local.

  • First, currently there is a library namespace conflict, so GNU IMP must be removed from the system.
 sudo dpkg --purge libgimp2.0 libgimp2.0 gimp-data gimp-data

If you experience dependency errors, simply add the packages that depend on gimp to the list to purge and try again.

  • Next install build dependencies
sudo apt install build-essential git
sudo apt build-dep gimp
  • Now we can start by pulling the embedded dependencies which are included as git submodules.
git submodule update --init
  • Next we can build the embedded dependencies, starting with BABL
cd babl
 sudo make install
 cd ../

  • Next we build mypaint-brushes
cd mypaint-brushes
 sudo make install
 cd ../

  • Next libmypaint
cd libmypaint
 sudo make install
 cd ../

  • Finally GEGL
cd gegl
 sudo make install
 cd ../

  • At last we can build Glimpse itself
 sudo make install

To update glimpse, update the copy you're building from (git pull or similar) make clean and repeat the final build process.


Package as a Flatpak


Package as an AppImage