Difference between revisions of "Building Glimpse/Linux"

From GlimpseWiki
Jump to navigation Jump to search
(→‎Build in Gnome Builder: Write the instructions, with screenshots)
(Instrugctions on how to build on debian etc →‎Build locally on Ubuntu 18.04 LTS)
Line 42: Line 42:
 
The <kbd>vagrant up</kbd> command uses <kbd>Vagrantfile</kbd> to determine the parameters of the virtual machine, and <kbd>glimpse-vagrant.yml</kbd> is used by [https://www.ansible.com/ Ansible] to install the prerequisite packages.
 
The <kbd>vagrant up</kbd> command uses <kbd>Vagrantfile</kbd> to determine the parameters of the virtual machine, and <kbd>glimpse-vagrant.yml</kbd> is used by [https://www.ansible.com/ Ansible] to install the prerequisite packages.
   
=== Build locally on Ubuntu 18.04 LTS ===
+
=== Build locally on modern Ubuntu or Debian ===
  +
TODO
 
  +
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.
  +
<nowiki>sudo dpkg --purge libgimp2.0 libgimp2.0 gimp-data gimp-data</nowiki>
  +
  +
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
  +
<nowiki>sudo apt install build-essential git
  +
sudo apt build-dep gimp</nowiki>
  +
  +
* Now we can start by pulling the embedded dependencies which are included as git submodules.
  +
<nowiki>git submodule update --init</nowiki>
  +
  +
* Next we can build the embedded dependencies, starting with ''BABL''
  +
<nowiki>cd babl
  +
./autogen.sh
  +
make
  +
sudo make install
  +
cd ../
  +
</nowiki>
  +
  +
* Next we build ''mypaint-brushes''
  +
<nowiki>cd mypaint-brushes
  +
./autogen.sh
  +
./configure.sh
  +
make
  +
sudo make install
  +
cd ../
  +
</nowiki>
  +
  +
* Next ''libmypaint''
  +
<nowiki>cd libmypaint
  +
./autogen.sh
  +
./configure
  +
make
  +
sudo make install
  +
cd ../
  +
</nowiki>
  +
  +
* Finally ''GEGL''
  +
<nowiki>cd gegl
  +
./autogen.sh
  +
make
  +
sudo make install
  +
cd ../
  +
</nowiki>
  +
  +
* At last we can build ''Glimpse'' itself
  +
<nowiki>./autogen.sh
  +
make
  +
sudo make install
  +
</nowiki>
  +
  +
To update glimpse, update the copy you're building from (''git pull'' or similar) ''make clean'' and repeat the final build process.
   
 
== Packaging ==
 
== Packaging ==

Revision as of 20:39, 22 September 2019

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

Building

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 glimpse-vagrant.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
 ./autogen.sh
 make 
 sudo make install
 cd ../

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

  • Next libmypaint
cd libmypaint
 ./autogen.sh
 ./configure
 make 
 sudo make install
 cd ../

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

  • At last we can build Glimpse itself
./autogen.sh
 make 
 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.

Packaging

Package as a Flatpak

TODO

Package as an AppImage

TODO