[gimp-web-devel/pat/bootstrap] content: update the build instructions.
- From: Jehan <jehanp src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp-web-devel/pat/bootstrap] content: update the build instructions.
- Date: Tue, 13 Sep 2022 12:16:27 +0000 (UTC)
commit bb24542f371510a8c239736ff5ca15301df974f2
Author: Jehan <jehan girinstud io>
Date: Tue Sep 13 13:34:37 2022 +0200
content: update the build instructions.
- Get rid of various instructions to build libmypaint and
mypaint-brushes. These days, even LTS distributions have these. And in
the rare case they don't, it can just be considered like any other
software (we aren't going to explain how to build every software out
there in the world).
- Update the crossroad cross-compilation instructions:
* Update dependency list (taken from our CI).
* Use meson where relevant.
* Use cd rather than pushd/popd (though these are nice, the much more
basic cd will be more understandable, which is important for a basic
tutorial; people knowing pushd/popd will know how to use these by
themselves).
- Update a bit the raw MinGW-w64 cross-compilation instructions:
* Update links.
* Add some warnings and info about outdated information.
- Various other small improvements here and there.
content/core/setup/build/Linux.md | 7 ++-
content/core/setup/build/Windows.md | 118 +++++++++++++++++-------------------
content/core/setup/build/_index.md | 61 ++++++-------------
3 files changed, 79 insertions(+), 107 deletions(-)
---
diff --git a/content/core/setup/build/Linux.md b/content/core/setup/build/Linux.md
index b1c2dd0..e80e544 100644
--- a/content/core/setup/build/Linux.md
+++ b/content/core/setup/build/Linux.md
@@ -41,11 +41,14 @@ Debian unstable and Fedora. Some passing contributors have also been
using Arch or Gentoo. Other distributions with longer support, and
especially LTS versions, can be quite unsuited for software development;
as the installed version grow older, you end up having to build yourself
-more and more dependencies.
+more and more dependencies. Some people contribute this way anyway, so
+in the end, it's up to everyone and there is no reason recent GIMP
+cannot build and run on any distribution (you'll just have to put more
+work sometimes).
## Dependencies
-GIMP depends on many packages in addition to `babl`, `gegl`, `libmypaint` and `mypaint-brushes`.
+GIMP depends on many packages in addition to `babl` and `gegl`.
Build options affect which packages are required.
diff --git a/content/core/setup/build/Windows.md b/content/core/setup/build/Windows.md
index a9dff85..a755373 100644
--- a/content/core/setup/build/Windows.md
+++ b/content/core/setup/build/Windows.md
@@ -276,82 +276,67 @@ build the GObject-Introspection files, e.g. using `yocto`, which is why
the `meson` configuration flag `-Dcan-crosscompile-gir=true` allows you
to force GObject-Introspection build.
-See the [tutorial explaining how to build GIMP with
+See the [tutorial (outdated) explaining how to build GIMP with
it](http://girinstud.io/news/2016/05/crossroad-0-6-released-cross-building-gimp-as-an-example/).
Condensed, here is the process:
```sh
-crossroad w64 gimp-build
-
+crossroad w64 gimp
+crossroad source msys2
crossroad install \
- glib2-devel \
- libexiv2-devel \
- json-glib-devel \
- libjpeg8-devel \
- libpng-devel \
- cairo-devel \
- libtiff-devel \
- librsvg-2-2 \
- librsvg-devel \
- pango-devel \
- libwebp5 \
- libwebp-devel \
- libjasper-devel \
- gdk-pixbuf-devel \
- libSDL-devel \
- libjson-c2 \
- libjson-c-devel \
- atk-devel \
- gtk2-devel \
- libbz2-1 \
- libbz2-devel \
- liblzma-devel \
- liblcms2-2 \
- liblcms2-devel \
- libgs8 \
- libgs-devel \
- libmng1 \
- libmng-devel \
- libpoppler-glib8 \
- libpoppler-glib-devel \
- poppler-data \
- xpm-nox-devel headers \
- iso-codes-devel \
- libwmf-devel \
- libgexiv2-devel headers
+ appstream-glib \
+ atk \
+ cairo \
+ drmingw \
+ gexiv2 \
+ glib2 \
+ graphviz \
+ json-c \
+ ghostscript \
+ iso-codes \
+ json-glib \
+ libheif \
+ lcms2 \
+ libjxl \
+ $LIBMNG \
+ libmypaint mypaint-brushes \
+ libwebp \
+ libwmf \
+ openexr \
+ poppler poppler-data \
+ xpm-nox
git clone git://git.gnome.org/babl
-pushd babl
-crossroad configure
-make && make install
-popd
+cd babl
+crossroad meson ..
+ninja && ninja install
+cd ..
git clone git://git.gnome.org/gegl
-pushd gegl
-crossroad configure
-make && make install
-popd
-
-git clone https://github.com/mypaint/libmypaint.git
-cd libmypaint
-crossroad configure
-make && make install
-popd
+cd gegl
+crossroad meson ..
+ninja && ninja install
+cd ..
git clone git://git.gnome.org/gimp
crossroad configure --disable-python
make && make install
-popd
```
-Check out the full tutorial for more details.
+Check out the full tutorial for more details on how `crossroad` works.
*Note: this is basically the same thing as the MinGW-w64 cross build,
simply crossroad wraps all the complicated parts!*
## Cross-Compiling GIMP under Linux using MinGW-w64
+*Note: this section seems outdated, in build instructions, as well as
+the troubleshooting subsection. We keep it for historical reasons and
+also because it's the base of how cross-compiling works. If anyone
+wishes to try this rawer cross-compilation build, don't just copy-paste.
+Understand and adapt the commands to newer build system instructions.*
+
Experience shows that working with the MinGW environment on a Linux
machine provides a much faster compilation, and you are still able to
compile for any Windows target (32 and 64 bits).
@@ -374,11 +359,11 @@ Oliveira](https://mail.gnome.org/archives/gimp-developer-list/2012-May/msg00067.
### Install mingw-w64
-This procedure relies on the newer [MinGW-w64](http://mingw-w64.sourceforge.net/) project.
+This procedure relies on the newer [MinGW-w64](https://www.mingw-w64.org/) project (forked from original
`MinGW` project).
If your distribution provides the `mingw-w64` tools, you may install them with your package manager.
-Otherwise, download directly the last release [on
Sourceforge](https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release).
+Otherwise, download directly the [last release](https://www.mingw-w64.org/downloads/).
The archive contains a prefix tree, that you can consider as read-only (just like your linux system).
@@ -396,11 +381,20 @@ bash grab-stuff.sh
You will notice in particular a new `usr/` folder, and inside `i686-w64-mingw32/` and `x86_64-w64-mingw32/`
sub-folders.
-TODO : Make a proper dependency list.
+⚠️ As you can see from the email date, this is a very old procedure,
+downloading an outdated list of packages. Chances are that it doesn't
+work anymore, though the "concepts" are still the same. So to make it
+work, you will have to read both scripts, understand what they do, and
+fix them to use more recent OpenSuse repository and an updated package
+list.
+
+ℹ️ This is actually one of the parts which `crossroad` greatly
+simplifies. The tool even support package sources from the MSYS2
+project, various Fedora versions and OpenSuse.
### Set your cross-compiling environment
-Define the environment variables as described in [[Hacking:Building]]. You may also need to reset pkg-config:
+Define the environment variables as described in [Building GIMP](../). You may also need to reset pkg-config:
```sh
export PKG_CONFIG_LIBDIR=
@@ -409,7 +403,7 @@ export PKG_CONFIG_LIBDIR=
### Build BABL
```sh
-git clone <a class="external free" href="git://git.gnome.org/babl"
rel="nofollow">git://git.gnome.org/babl</a>
+git clone git://git.gnome.org/babl
cd babl
./autogen.sh --prefix=$PREFIX --host=$HOST --enable-introspection=no
make
@@ -419,7 +413,7 @@ make install
### Build GEGL
```sh
-git clone <a class="external free" href="git://git.gnome.org/gegl"
rel="nofollow">git://git.gnome.org/gegl</a>
+git clone git://git.gnome.org/gegl
cd gegl
./autogen.sh --prefix=$PREFIX --host=$HOST --enable-introspection=no --disable-docs --disable-glibtest
make
@@ -543,8 +537,8 @@ Solution
## Building GIMP using Microsoft tools
Microsoft Visual Studio comes with its own C compiler.
-Most of GIMP development is done with `GCC` and its `MinGW` Windows
-port, or `Clang`.
+Most of GIMP development is done with `GCC` and its `MinGW` or
+`MinGW-w64` Windows ports, or `Clang`.
Unfortunately both are not fully compatible, so integrating GCC into the
Visual Studio build chain has its flaws, even while it might work in some points.
diff --git a/content/core/setup/build/_index.md b/content/core/setup/build/_index.md
index 66ce0f1..638f92b 100644
--- a/content/core/setup/build/_index.md
+++ b/content/core/setup/build/_index.md
@@ -49,9 +49,9 @@ See also the file [INSTALL](https://gitlab.gnome.org/GNOME/gimp/blob/gimp-2-10/I
1. You may need to install some software to build GIMP, including a C compiler, make, GNU autotools, meson,
and more, plus many dependencies. See the OS-specific pages for details:
-* [build/Linux](linux) - Building GIMP on Linux
-* [build/macOS](macos) - Building GIMP on macOS
-* [build/Windows](windows) - Building GIMP on Windows
+* [build/linux](linux) - Building GIMP on Linux
+* [build/macos](macos) - Building GIMP on macOS
+* [build/windows](windows) - Building GIMP on Windows
2. Choose a place to install everything, and set a variable to point to it:
@@ -120,7 +120,7 @@ You can build specific versions by choosing a ''tag'' (a fixed git revision)…
# List available tags
git tag
# Update the working directory to a specific tag :
- git checkout GIMP_2_10_12
+ git checkout GIMP_2_10_32
```
… or a ''branch'' :
@@ -129,15 +129,7 @@ You can build specific versions by choosing a ''tag'' (a fixed git revision)…
# List available branches
git branch -a
# Checkout a branch :
- git checkout
- git checkout -b wip/animation
-```
-
-If your distro does not provide them, you should get the Mypaint libs too :
-
-```sh
- git clone --branch libmypaint-v1 https://github.com/mypaint/libmypaint.git
- git clone --branch v1.3.x https://github.com/mypaint/mypaint-brushes.git
+ git checkout gimp-2-10
```
### Download release archives
@@ -148,30 +140,8 @@ GIMP also provides release archives. This is preferred when building stable rele
* https://download.gimp.org/pub/gegl
* https://download.gimp.org/pub/gimp
-Releases for mypaint can be found on their github page.
-
## Build the source code
-### Mypaint
-
-For both Libmypaint and Mypaint-brushes, use Autotools to install:
-
-```sh
- cd libmypaint
-
- # Generate the configure script. That may be unnecessary with release archives :
- # If you might want to set special options, you can now run `./configure --help` to see what's available.
- ./autogen.sh
-
- # Configure the build (you can call ./configure --help):
- ./configure --prefix=${GIMP_PREFIX}
-
- # Build the code :
- make -j$(nproc) install
-
- cd ..
-```
-
### babl and GEGL
Babl and GEGL use Meson. The build needs to be out-of-source, but the process is simple.
@@ -209,7 +179,9 @@ exist as fallback on `master` branch.
#### Autotools build
-The steps are similar to that for libmypaint, except that ./autogen.sh runs ./configure for you.
+The steps are the very common historical build process, refered to as
+`./configure && make && make install`, except that ./autogen.sh runs
+./configure for you.
cd into the directory where you unpacked gegl.
@@ -229,13 +201,14 @@ If you're building from a tarball, use configure instead of autogen:
./configure --prefix=${GIMP_PREFIX}
```
-To see options you can configure, run:
+To see options you can configure:
```sh
./configure --help
```
-(Generally, its easier to accept the default build configuration, at the expense of a longer build.)
+(for a first build, it may be easier to accept the default build
+configuration, then later tweak the configuration in steps)
Then:
@@ -255,10 +228,12 @@ Then:
You can configure the build with options.
-Options for the meson build of GIMP are described in the repository file `meson_options.txt`.
+Options for the meson build of GIMP are described in the repository file
+[meson_options.txt](https://gitlab.gnome.org/GNOME/gimp/-/blob/master/meson_options.txt).
In the example below, the line `-Dpython=true` is one such option.
-Meson itself also provides options, such as :
+Meson itself also provides [built-in
+options](https://mesonbuild.com/Builtin-options.html), such as :
* <code>warning_level=[1, 2, 3]</code> : The level of compiler warnings
* <code>b_lto=true|false</code> : Enable link-time optimizations
@@ -306,6 +281,6 @@ To keep those variables contained only for the execution of GIMP, you may want t
See the OS-specific pages for more specific advice:
-* [build/Linux](linux) - Building GIMP on Linux
-* [build/macOS](macos) - Building GIMP on macOS
-* [build/Windows](windows) - Building GIMP on Windows
+* [build/linux](linux) - Building GIMP on Linux
+* [build/macos](macos) - Building GIMP on macOS
+* [build/windows](windows) - Building GIMP on Windows
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]