Difference between revisions of "Building Glimpse"

From GlimpseWiki
Jump to navigation Jump to search
Line 105: Line 105:
<li>Initialize the submodules inside the cloned directory:</li>
<li>Initialize the submodules inside the cloned directory:</li>
<pre>git submodule update --init</pre>
<pre>git submodule update --init</pre>
<li>Build BABL in the <kbd>babl</kbd> folder:</li>
<li>Clone the BABL and GEGL repositories:</li>
<pre>git clone https://gitlab.gnome.org/GNOME/gegl.git
<pre>meson builddir
git clone https://gitlab.gnome.org/GNOME/babl.git</pre>
<li>Build BABL in the <kbd>babl</kbd> folder:
<pre>git checkout BABL_0_1_74
meson builddir
ninja && ninja install</pre>
ninja && ninja install</pre>
<li>Build MyPaint in the <kbd>mypaint-brushes</kbd> and <kbd>libmypaint</kbd> folders:</li>
<li>Build MyPaint in the <kbd>mypaint-brushes</kbd> and <kbd>libmypaint</kbd> folders:</li>
Line 113: Line 118:
make && make install</pre>
make && make install</pre>
<li>Build GEGL in the <kbd>gegl</kbd> folder:</li>
<li>Build GEGL in the <kbd>gegl</kbd> folder:</li>
<pre>git checkout GEGL_0_4_22
<pre>meson builddir
meson builddir
ninja && ninja install</pre>
ninja && ninja install</pre>
<li>Finally, build Glimpse from the top level of the cloned directory:</li>
<li>Finally, build Glimpse from the top level of the cloned directory:</li>

Revision as of 22:07, 24 March 2020


There are several components of the Glimpse source code that must be built in a specific order.

Component Purpose Link
BABL Converts between different image formats and color spaces http://www.gegl.org/babl/
MyPaint Provides different brushes and image editing components http://mypaint.org/
GEGL Core engine for non-destructive image editing and processing. Requires BABL http://www.gegl.org/
Glimpse Front end UI wrapper and plug-in framework based on the GNU Image Manipulation Program. Requires GEGL and MyPaint https://glimpse-editor.org

Release Versioning Scheme

  • 0.x releases are always based on the GNU Image Manipulation Program 2.10.x
  • 1.x releases will also be based on GNU Image Manipulation Program 3.x
  • 2.x releases could be an entirely new image editor that's been written from scratch

Component Versions

We stick to tagged versions of each component so builds can still be reproduced at a later date. That approach also ensures Glimpse development is never blocked by unanticipated upstream changes.

Release Status GNU IMP BABL MyPaint GEGL Release Date
Glimpse Image Editor 0.1.0 Released 2.10.12 0.1.68 1.3.0 0.4.16 2019-11-22
Glimpse Image Editor 0.1.2 Released 2.10.12 0.1.68 1.3.0 0.4.16 2020-03-02
Glimpse Image Editor 0.1.4 In Development 2.10.12 0.1.74 1.3.0 0.4.22 2020-04 (TBC)
Glimpse Image Editor 0.1.6 Planning 2.10.12* TBD TBD TBD 2020-05 (TBC)
Glimpse Image Editor 0.1.x Planning 2.10.12 TBD TBD TBD TBC
Glimpse Image Editor 0.2.0 Planning 2.10.xx TBD TBD TBD TBC
Glimpse Image Editor 0.2.2 Planning 2.10.xx TBD TBD TBD

"*" = Contains backported changes

Version Control

The source code we maintain is available at https://github.com/glimpse-editor/Glimpse. We currently maintain three locked branches:

Branch name Purpose
dev-g210 Latest development changes based on the GNU Image Manipulation Program 2.10.x
beta-g210 Pre-release code that is stable enough to be beta tested
glimpse-0-1 Stable release code for Glimpse Image Editor 0.1.x

You should ignore any other branches you see as they will usually be related to a pull request, and as a result they may not build and will usually be deleted once the changes have been merged into the development branch.

We have added the components that Glimpse project does not maintain as git submodules already preset at the correct tagged versions. This is provided for convenience so that you do not need to clone them separately and can have confidence that changes in the upstream "master" branches are not affecting your builds.

Build Tools

Because Glimpse 0.x is forked from the GNU Image Manipulation Program 2.10.12, we use Autotools and other programs contained within the GNU Build System. This also applies to the tagged versions of BABL, MyPaint and GEGL that we rely on.

When the GNU Image Manipulation Program 3.0 is released in 2020, that code will require Meson, an entirely different build system. If you do not stick to tagged releases of the components the Glimpse source code relies on, our documented build instructions will not work.

The Glimpse project and community can offer assistance with the instructions provided on https://wiki.glimpse-editor.org. If you choose to follow the upstream documentation instead and run into problems, we may not be able to help you.

Build Steps

The components you need and any additional steps required will vary depending on your computer's operating system. Please read the relevant post that applies to you before proceeding any further:

The order of the build commands you need to run will be the same regardless of your chosen platform. The main differences relate to how you set up your build environment, fetch prerequisite components and determining which environment and build variables you need to set. The essential steps are:

  1. Clone the source code:
  2. git clone https://github.com/glimpse-editor/Glimpse.git
  3. Initialize the submodules inside the cloned directory:
  4. git submodule update --init
  5. Clone the BABL and GEGL repositories:
  6. git clone https://gitlab.gnome.org/GNOME/gegl.git
    git clone https://gitlab.gnome.org/GNOME/babl.git
  7. Build BABL in the babl folder:
  8. git checkout BABL_0_1_74
    meson builddir
    ninja && ninja install
  9. Build MyPaint in the mypaint-brushes and libmypaint folders:
  10. ./autogen.sh
    make && make install
  11. Build GEGL in the gegl folder:
  12. git checkout GEGL_0_4_22
    meson builddir
    ninja && ninja install
  13. Finally, build Glimpse from the top level of the cloned directory:
  14. ./autogen.sh
    make && make install

If you have already installed Glimpse on your computer and want to keep the configuration files of your self-built copy separate, you can optionally use the --with-gimpdir build flag with autogen.sh during the Glimpse build step:

./autogen.sh --with-gimpdir=Glimpse/dev

Faster Builds

There are additional optimizations you can optionally make if you want to speed up the build process on your computer.

Removing Documentation

If you already have the stable version of Glimpse installed then you may not necessarily want to rebuild documentation for your own self-built version.

For the BABL component, you can change the meson builddir step as follows:

meson builddir --buildtype=release -Dwith-docs=false

For the GEGL component you could change the meson builddir step as follows:

meson builddir --buildtype=release -Ddocs=false

To achieve the same thing for the Glimpse build step:

./autogen.sh --disable-gtk-doc

Processing in Parallel

If your computer's CPU has more than one core, you can instruct the build system to run multiple build tasks simultaneously by setting the MAKEFLAGS environment variable:

export MAKEFLAGS=-j4

That example will make use of up to 4 cores to run tasks in parallel. For an optimal setup you should set the number to match the number of cores your CPU has.

Fixing Translations

Glimpse Image Editor relies on *.po files that are generated with the gettext tool. As a result, fixing broken translations is not as easy as making a file edit because the automated build tools could overwrite your changes.

The best way to fix a broken translation is to follow this process:

  1. Find the hard-coded value where it is in the codebase (the translation file itself will give you a filename and line number) and change that if needed
  2. Now run the following command from the folder the po file you want to change is located in:
    make update-po
  3. Make the change you want to make within the po file. If you see this line above the text, go back to step 1 or (if it's already fixed) remove it:
    #, Fuzzy
  4. Now re-run the build steps for Glimpse Image Editor. Do not edit translations for subcomponents like BABL, GEGL or MyPaint! We use upstream tagged versions and don't want to fork them, so your change will not be merged if you do that.
  5. Test the program by manually specifying the language file you are editing. For example, to test with the German language:
    LANG="de.UTF-8" glimpse
  6. Rinse and repeat until you are satisfied with your translation fixes.