[gimp-web-devel/pat/bootstrap] content: adding back build tutorials from Wiki.



commit 90f6e627cfc7a037ece215fa311bf6e359511b5e
Author: Jehan <jehan girinstud io>
Date:   Tue Sep 6 20:12:18 2022 +0200

    content: adding back build tutorials from Wiki.
    
    Contents as stored in !3 by Robin Swift. I started re-formatting, though
    it's not finished.

 content/core_developers/setup/build/Linux.md   |  82 ++++
 content/core_developers/setup/build/Windows.md | 549 +++++++++++++++++++++++++
 content/core_developers/setup/build/_index.md  | 327 +++++++++++++++
 content/core_developers/setup/build/macOS.md   |  16 +
 content/core_developers/setup/git.md           |   2 +-
 5 files changed, 975 insertions(+), 1 deletion(-)
---
diff --git a/content/core_developers/setup/build/Linux.md b/content/core_developers/setup/build/Linux.md
new file mode 100644
index 0000000..46d0bc4
--- /dev/null
+++ b/content/core_developers/setup/build/Linux.md
@@ -0,0 +1,82 @@
+---
+title: "Building GIMP for Linux"
+Author: "GIMP team"
+Date: 2021-08-18
+weight: 2
+---
+
+The main GIMP building instructions are at [Building GIMP](../).
+
+This page is for Linux-specific additions to that page.
+
+
+## Dependencies
+
+GIMP depends on many packages in addition to <code>babl</code>, <code>gegl</code>, <code>libmypaint</code> 
and <code>mypaint-brushes</code>.
+
+Gimp.org may change the requirements for each Gimp release.
+Gimp.org changes which packages are required.
+The package names generally do not change.
+Build options affect which packages are required.
+
+This page lists dependencies for some linux distributions, on certain dates, with all build options enabled.
+
+
+#### Ubuntu 19.10
+
+Working in October 2019.
+
+<pre>sudo apt install \
+    libtool intltool \
+    meson \
+    asciidoc \
+    exiv2 libgexiv2-dev \
+    gjs \
+    gtk-3-examples \
+    gtk-doc-tools \
+    jasper \
+    libaa1-dev \
+    libappstream-glib-dev \
+    libarchive-dev \
+    libavcodec-dev libavformat-dev libavutil-dev \
+    libbz2-dev \
+    libgs-dev \
+    libgtk-3-dev libgtk2.0-dev gobject-introspection \
+    libgirepository1.0-dev \
+    libgudev-1.0-dev \
+    libheif-dev \
+    libjson-c-dev libjson-glib-dev \
+    liblcms2-dev \
+    liblensfun-dev \
+    libmng-dev \
+    libopenexr-dev \
+    libjpeg-dev libopenjp2-7-dev \
+    libpoppler-glib-dev \
+    libraw-dev \
+    librsvg2-bin librsvg2-dev \
+    libsdl2-dev \
+    libspiro-dev \
+    libswscale-dev \
+    libtiff-dev \
+    libumfpack5 \
+    libv4l-dev \
+    libwebkit2gtk-4.0-dev \
+    libwebp-dev \
+    luajit \
+    python-gi-dev python3-venv python3-wheel \
+    ruby \
+    w3m \
+    xsltproc
+</pre>
+
+Added in 2020, when building optional vala language plugins, the vala compiler tool:
+
+<pre>    valac
+</pre>
+
+Since Ubuntu 20.04 focal, the tool gtk-encode-symbolic-svg, an executable binary, has moved from package 
gtk-3-examples to package libgtk-3-bin.
+
+Since 2021, when building using the clang compiler, the OpenMP library i.e. -lomp :
+
+<pre>    libomp-dev
+</pre>
diff --git a/content/core_developers/setup/build/Windows.md b/content/core_developers/setup/build/Windows.md
new file mode 100644
index 0000000..6460e05
--- /dev/null
+++ b/content/core_developers/setup/build/Windows.md
@@ -0,0 +1,549 @@
+---
+title: "Building GIMP for Windows"
+Author: "GIMP team"
+Date: 2021-08-30
+weight: 3
+---
+
+The main GIMP building instructions are at [[Hacking:Building]]. This page is for Windows-specific additions 
to that page.
+
+Note: the instructions are not always kept up to date. The primary development platform is the Debian 
Testing GNU/Linux distribution, so the very latest code from Git might not always build on other platforms.
+
+
+
+## Building GIMP natively under Windows using MSYS2
+
+Msys2 is a POSIX environment with basically everything you would find on a Linux system (shell, package 
manager, GCC…). It allows to use POSIX tools to build Windows softwares.
+
+
+### Setting up the environment
+
+First, '''follow the installation instructions''' for msys2 available at [https://msys2.github.io/ 
msys2.github.io].
+
+To open a terminal, you need to execute <code>msys2.exe</code> or <code>mingw64.exe</code>
+
+Update the system :
+
+<pre>pacman -Syyuu
+</pre>
+
+If the shell tells you to close the terminal, close MSYS2 and run it again. That is a normal procedure.
+
+
+### Install the dependencies
+
+#### If you want to build gimp 2.10
+
+If you have Windows 64bits:
+
+<pre>pacman -S --needed \
+    base-devel \
+    git \
+    mingw-w64-x86_64-toolchain \
+    mingw-w64-x86_64-asciidoc \
+    mingw-w64-x86_64-drmingw \
+    mingw-w64-x86_64-gexiv2 \
+    mingw-w64-x86_64-ghostscript \
+    mingw-w64-x86_64-glib-networking \
+    mingw-w64-x86_64-graphviz \
+    mingw-w64-x86_64-gtk2 \
+    mingw-w64-x86_64-gobject-introspection \
+    mingw-w64-x86_64-iso-codes \
+    mingw-w64-x86_64-json-c \
+    mingw-w64-x86_64-json-glib \
+    mingw-w64-x86_64-lcms2 \
+    mingw-w64-x86_64-lensfun \
+    mingw-w64-x86_64-libheif \
+    mingw-w64-x86_64-libraw \
+    mingw-w64-x86_64-libspiro \
+    mingw-w64-x86_64-libwebp \
+    mingw-w64-x86_64-libwmf \
+    mingw-w64-x86_64-meson \
+    mingw-w64-x86_64-mypaint-brushes \
+    mingw-w64-x86_64-openexr \
+    mingw-w64-x86_64-poppler \
+    mingw-w64-x86_64-python2-pygtk \
+    mingw-w64-x86_64-SDL2 \
+    mingw-w64-x86_64-suitesparse \
+    mingw-w64-x86_64-xpm-nox
+</pre>
+
+If you have Windows 32 bit:
+
+<pre>pacman -S --needed \
+    base-devel \
+    git \
+    mingw-w64-i686-toolchain \
+    mingw-w64-i686-asciidoc \
+    mingw-w64-i686-drmingw \
+    mingw-w64-i686-gexiv2 \
+    mingw-w64-i686-ghostscript \
+    mingw-w64-i686-glib-networking \
+    mingw-w64-i686-graphviz \
+    mingw-w64-i686-gtk2 \
+    mingw-w64-i686-gobject-introspection \
+    mingw-w64-i686-iso-codes \
+    mingw-w64-i686-json-c \
+    mingw-w64-i686-json-glib \
+    mingw-w64-i686-lcms2 \
+    mingw-w64-i686-lensfun \
+    mingw-w64-i686-libheif \
+    mingw-w64-i686-libraw \
+    mingw-w64-i686-libspiro \
+    mingw-w64-i686-libwebp \
+    mingw-w64-i686-libwmf \
+    mingw-w64-i686-meson \
+    mingw-w64-i686-mypaint-brushes \
+    mingw-w64-i686-openexr \
+    mingw-w64-i686-poppler \
+    mingw-w64-i686-python2-pygtk \
+    mingw-w64-i686-SDL2 \
+    mingw-w64-i686-suitesparse \
+    mingw-w64-i686-xpm-nox
+</pre>
+
+#### If you want to build gimp master
+
+If you have Windows 64bits:
+
+<pre>pacman -S --needed \
+    base-devel \
+    git \
+    mingw-w64-x86_64-toolchain \
+    mingw-w64-x86_64-appstream-glib \
+    mingw-w64-x86_64-asciidoc \
+    mingw-w64-x86_64-drmingw \
+    mingw-w64-x86_64-gexiv2 \
+    mingw-w64-x86_64-ghostscript \
+    mingw-w64-x86_64-glib-networking \
+    mingw-w64-x86_64-graphviz \
+    mingw-w64-x86_64-gtk3 \
+    mingw-w64-x86_64-gobject-introspection \
+    mingw-w64-x86_64-iso-codes \
+    mingw-w64-x86_64-json-c \
+    mingw-w64-x86_64-json-glib \
+    mingw-w64-x86_64-lcms2 \
+    mingw-w64-x86_64-lensfun \
+    mingw-w64-x86_64-libarchive \
+    mingw-w64-x86_64-libheif \
+    mingw-w64-x86_64-libraw \
+    mingw-w64-x86_64-libspiro \
+    mingw-w64-x86_64-libwebp \
+    mingw-w64-x86_64-libwmf \
+    mingw-w64-x86_64-luajit \
+    mingw-w64-x86_64-maxflow \
+    mingw-w64-x86_64-meson \
+    mingw-w64-x86_64-mypaint-brushes \
+    mingw-w64-x86_64-openexr \
+    mingw-w64-x86_64-poppler \
+    mingw-w64-x86_64-python3-gobject \
+    mingw-w64-x86_64-SDL2 \
+    mingw-w64-x86_64-suitesparse \
+    mingw-w64-x86_64-vala \
+    mingw-w64-x86_64-xpm-nox
+</pre>
+
+If you have Windows 32bits:
+
+<pre>  pacman -S --needed \
+    base-devel \
+    git \
+    mingw-w64-i686-toolchain \
+    mingw-w64-i686-appstream-glib \
+    mingw-w64-i686-asciidoc \
+    mingw-w64-i686-drmingw \
+    mingw-w64-i686-gexiv2 \
+    mingw-w64-i686-ghostscript \
+    mingw-w64-i686-glib-networking \
+    mingw-w64-i686-graphviz \
+    mingw-w64-i686-gtk3 \
+    mingw-w64-i686-gobject-introspection \
+    mingw-w64-i686-iso-codes \
+    mingw-w64-i686-json-c \
+    mingw-w64-i686-json-glib \
+    mingw-w64-i686-lcms2 \
+    mingw-w64-i686-lensfun \
+    mingw-w64-i686-libarchive \
+    mingw-w64-i686-libheif \
+    mingw-w64-i686-libraw \
+    mingw-w64-i686-libspiro \
+    mingw-w64-i686-libwebp \
+    mingw-w64-i686-libwmf \
+    mingw-w64-i686-luajit \
+    mingw-w64-i686-maxflow \
+    mingw-w64-i686-meson \
+    mingw-w64-i686-mypaint-brushes \
+    mingw-w64-i686-openexr \
+    mingw-w64-i686-poppler \
+    mingw-w64-i686-python3-gobject \
+    mingw-w64-i686-SDL2 \
+    mingw-w64-i686-suitesparse \
+    mingw-w64-i686-vala \
+    mingw-w64-i686-xpm-nox
+</pre>
+
+Simply hit enter at the prompts for which packages to install (default=all). This step will download a ton 
of packages, and may take a while.
+
+
+### Building the software
+
+You can now just follow the instruction on the main page [[Hacking:Building]]. Just be careful of the 
following changes :
+
+<pre>export GIMP_PREFIX=`realpath ~/gimp_prefix`
+export PATH="$GIMP_PREFIX/bin:$PATH"
+export PKG_CONFIG_PATH="$GIMP_PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH"
+export PKG_CONFIG_PATH="$GIMP_PREFIX/share/pkgconfig:$PKG_CONFIG_PATH"
+export LD_LIBRARY_PATH="$GIMP_PREFIX/lib:$LD_LIBRARY_PATH"
+</pre>
+
+* If you are on Windows 64bits, you need to add mingw64 on 32bits mingw32
+<pre>#environment variable for Autotools
+export ACLOCAL_FLAGS="-I/c/msys64/mingw64/share/aclocal"
+#environment variable for introspection
+export XDG_DATA_DIRS="$XDG_DATA_DIRS:$GIMP_PREFIX/share:/usr/local/share/:/usr/share/:/mingw64/share/"
+</pre>
+
+
+You can add all the environment variable on C:\msys64_or_msys32\home\{USERNAME}\.bash_profile then run
+
+<pre>. .bash_profile
+</pre>
+
+
+
+* Disable docs for Babl : <code>-Dwith-docs=false</code> while calling Meson.
+
+* Disable docs for Gegl : <code>-Ddocs=false</code> while calling Meson.
+
+
+You may want to disable the docs while building Gimp :
+
+
+* Meson build : <code>-Dgtk-doc=false -Dgtk-doc-app=false</code>
+* Autotools build : <code>--disable-docs</code>
+
+## Cross-Compiling GIMP under UNIX using crossroad
+
+A tool named [https://pypi.python.org/pypi/crossroad crossroad] has been developed to cross-build for 
Windows under Linux (it was even originally started to crossbuild GIMP specifically).
+
+See the [http://girinstud.io/news/2016/05/crossroad-0-6-released-cross-building-gimp-as-an-example/ tutorial 
explaining how to build GIMP with it].
+
+Condensed, here is the process:
+
+<pre>crossroad w64 gimp-build
+
+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
+
+wget [http://prdownloads.sourceforge.net/libpng/libpng-1.6.29.tar.xz 
http://prdownloads.sourceforge.net/libpng/libpng-1.6.29.tar.xz]
+tar xf libpng-1.6.29.tar.xz
+pushd libpng-1.6.29
+crossroad configure
+make &amp;&amp; make install
+popd
+
+git clone <a class="external free" href="git://git.gnome.org/babl" 
rel="nofollow">git://git.gnome.org/babl</a>
+pushd babl
+crossroad configure
+make &amp;&amp; make install
+popd
+
+git clone <a class="external free" href="git://git.gnome.org/gegl" 
rel="nofollow">git://git.gnome.org/gegl</a>
+pushd gegl
+crossroad configure
+make &amp;&amp; make install
+popd
+
+git clone [https://github.com/mypaint/libmypaint.git https://github.com/mypaint/libmypaint.git]
+cd libmypaint
+crossroad configure
+make &amp;&amp; make install
+popd
+
+git clone <a class="external free" href="git://git.gnome.org/gimp" 
rel="nofollow">git://git.gnome.org/gimp</a>
+crossroad configure --disable-python
+make &amp;&amp; make install
+popd
+</pre>
+
+Check out the full tutorial for more details.
+
+Note: this is basically the same thing as the Mingw64 cross build, simply crossroad wraps all the 
complicated parts!
+
+
+## Cross-Compiling GIMP under Linux using MinGW-w64
+
+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).
+
+NOTE: the following procedure should be distribution-independent and does not rely on your package 
management system, even though it uses some OpenSuse packages. It would probably work on OSX or any other 
UNIX as well (add a note on the list below if you know this procedure works on another OS).
+
+Has been known to work on at least: Linux Mint 15, Ubuntu 12.04LST and Mageia 2 distributions.
+
+''Source of the original procedure from an 
[https://mail.gnome.org/archives/gimp-developer-list/2012-May/msg00067.html email by Victor Oliveira].''
+
+
+### Install mingw-w64
+
+This procedure relies on the newer [http://mingw-w64.sourceforge.net/ MinGW-w64] project.
+
+If your distribution provides the <code>mingw-w64</code> tools, you may install them with your package 
manager.
+
+Otherwise, download directly the last release 
[https://sourceforge.net/projects/mingw-w64/files/mingw-w64/mingw-w64-release on Sourceforge].
+
+The archive contains a prefix tree, that you can consider as read-only (just like your linux system).
+
+
+### Install GIMP Dependencies
+
+The default environment provided by MinGW does not have the huge list of dependencies that GIMP requires.
+
+Fortunately the [https://mail.gnome.org/archives/gimp-developer-list/2012-May/msg00067.html email] linked 
above has bash script named '''grab-stuff.sh''' (which calls itself a python3 script named 
"download-mingw-rpm.py", so you have to download both and have python3), which downloads pre-compiled version 
of all needed dependencies for cross-compiling (it uses OpenSuse repositories as source, but it does not mean 
at all you need rpm support).
+
+From the root of your cross-compiling prefix ($HOME/w64) run:
+
+<pre>bash grab-stuff.sh
+</pre>
+
+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.
+
+
+### Set your cross-compiling environment
+
+Define the environment variables as described in [[Hacking:Building]]. You may also need to reset pkg-config:
+
+<pre>export PKG_CONFIG_LIBDIR=
+</pre>
+
+### Build BABL
+<pre>git clone <a class="external free" href="git://git.gnome.org/babl" 
rel="nofollow">git://git.gnome.org/babl</a>
+cd babl
+./autogen.sh --prefix=$PREFIX --host=$HOST --enable-introspection=no
+make
+make install
+</pre>
+
+### Build GEGL
+<pre>git clone <a class="external free" href="git://git.gnome.org/gegl" 
rel="nofollow">git://git.gnome.org/gegl</a>
+cd gegl
+./autogen.sh --prefix=$PREFIX --host=$HOST --enable-introspection=no --disable-docs --disable-glibtest
+make
+make install
+</pre>
+
+### Build any optional dependency
+
+This step is not necessary if you compile GIMP with the minimum set of dependency as indicated at the next 
section.
+
+
+#### Compression support
+
+Nevertheless if for instance, you needed compression support (hence be able to load and save your images in 
various compressed format), you would need zlib,libbzip2 and liblzma installed. In particular the 
cross-compilation environment described on this page has no pre-compiled liblzma. You would need to 
cross-compile it first yourself.
+
+In my case xz-5.0.4 worked well.
+
+<pre>cd ..
+wget [http://tukaani.org/xz/xz-5.0.4.tar.xz http://tukaani.org/xz/xz-5.0.4.tar.xz]
+tar xf xz-5.0.4.tar.xz
+rm xz-5.0.4.tar.xz
+cd xz-5.0.4
+./configure --prefix=$PREFIX --host=$HOST
+make
+make install
+</pre>
+
+Finally obviously in the GIMP configure step, remove the ''--without-liblzma'' option on the autogen.sh 
command line before compiling GIMP.
+
+You should be able to do similar things for other optional features that you would want on your 
cross-compiled GIMP.
+
+Alternatively there exists a [http://eternallybored.org/misc/gimp/configrue-libbz2.patch patch] to get 
compression support working in 32 bit builds.
+
+
+#### Multi-Language support
+
+Multi-Language support is installed with the grab-stuff.sh script. Due to a bug in the package 
mingw32-iso-codes-devel the pkgconfig program can't find the iso-codes package.
+In this case you will notice, that GIMPs autogen.sh reports
+
+Language selection:  no
+
+and the finished GIMP build has no language selector listbox in ''Edit/Preferences/Interface''.
+To solve this, copy ''$HOME/w64/usr/$HOST/sys-root/mingw/share/pkgconfig/iso-codes.pc'' to 
''$HOME/w64/usr/$HOST/sys-root/mingw/lib/pkgconfig'' before executing autogen.sh or configure for GIMP.
+Note you have to do this for every value of $HOST you want to build (e.g. i686 and x86_64 architecture).
+Also merge the MinGW and GIMP build folders when installing it on Windows (see the <a 
href="#Troubleshooting"> Troubleshooting section</a>).
+
+
+### Build GIMP
+<pre>cd ..
+git clone <a class="external free" href="git://git.gnome.org/gimp" 
rel="nofollow">git://git.gnome.org/gimp</a>
+cd gimp
+./autogen.sh  --prefix=$PREFIX  --host=$HOST \
+    --enable-introspection=no \
+    --disable-glibtest \
+    --disable-gtktest \
+    --disable-docs \
+    --without-libjpeg \
+    --disable-python \
+    --without-xmc \
+    --without-dbus \
+    --without-libzma \
+make
+make install
+</pre>
+
+### Install On Windows
+
+To test your compiled installation, I found nothing better than moving the whole tree (in my case $HOME/w64) 
into Windows, because libraries are dynamically linked, then run $HOME/w64/bin/gimp-2.9.exe under Windows.
+
+If you really want to build a self contained GIMP, you should compile everything as static libraries.
+GIMP will probably still rely on some external files though, for instance what you find under 
$HOME/w64/share/gimp/2.0/. Maybe other things. But this will have to be tested if needed.
+
+
+
+
+
+### Troubleshooting
+
+#### Running gimp-2.x.exe on Windows fails. Error messages about a missing entry point in libglib-2.0-0.dll 
or a missing bzip2.dll are shown.
+
+'''Cause:'''
+
+The missing dll files are in the MinGW binary folder, which is separate from the GIMP folders.
+
+'''Solution:'''
+
+To export the GIMP build to Windows properly, use the following steps:
+
+1. On Windows create a folder for the GIMP build, like GIMP-Master.
+
+2. Copy all files from $HOME/w64/$HOST/sys-root/mingw to the newly created folder.
+
+3. Copy all files from your $PREFIX folder to the newly created folder. There are duplicate subfolders, for 
instance bin, share etc., in both directories. If your filemanager asks you to overwrite them, then confirm.
+
+It's important to keep this order to ensure you overwrite older BABL and GEGL from the grab-stuff.sh script 
by the newer ones from your build.
+
+At the end you have merged your MinGW installation and the GIMP build to a running GIMP on Windows build.
+(It also contains the unnecessary MinGW binaries, which are not needed anymore to run GIMP. But for testing 
purposes you have a running GIMP installation.)
+
+
+#### Some fonts, like Sans, are shown improperly
+
+See also [https://bugzilla.gnome.org/show_bug.cgi?id=688593 the Bugzilla report].
+
+'''Cause:'''
+
+The fontconfig package installation writes absolute paths of the building system to fonts.conf and 
conf.d/*.conf. When GIMP is installed on the Windows target system, these absolute paths become invalid.
+
+'''Solution:'''
+
+The bug should be reported to the Fontconfig developers. Meanwhile do on the Windows target system:
+
+1. Close GIMP.
+
+2. Edit the file ''<gimp folder="" installation="">\etc\fonts\fonts.conf</gimp>'':
+
+Replace the line <code><include ignore_missing="yes">$a_directory/conf.d</include></code> by <code><include 
ignore_missing="yes">..\..\share\fontconfig\conf.avail</include></code>
+
+3. Restart GIMP.
+
+
+## Troubleshooting
+
+#### Running gimp-2.x.exe on Windows fails. Error messages about a missing entry point in libglib-2.0-0.dll 
or a missing bzip2.dll are shown.
+
+'''Cause:'''
+
+The missing dll files are in the MinGW binary folder, which is separate from the GIMP folders.
+
+'''Solution:'''
+
+To export the GIMP build to Windows properly, use the following steps:
+
+1. On Windows create a folder for the GIMP build, like GIMP-Master.
+
+2. Copy all files from $HOME/w64/$HOST/sys-root/mingw to the newly created folder.
+
+3. Copy all files from your $PREFIX folder to the newly created folder. There are duplicate subfolders, for 
instance bin, share etc., in both directories. If your filemanager asks you to overwrite them, then confirm.
+
+It's important to keep this order to ensure you overwrite older BABL and GEGL from the grab-stuff.sh script 
by the newer ones from your build.
+
+At the end you have merged your MinGW installation and the GIMP build to a running GIMP on Windows build.
+(It also contains the unnecessary MinGW binaries, which are not needed anymore to run GIMP. But for testing 
purposes you have a running GIMP installation.)
+
+
+#### Some fonts, like Sans, are shown improperly
+
+See also [https://bugzilla.gnome.org/show_bug.cgi?id=688593 the Bugzilla report].
+
+'''Cause:'''
+
+The fontconfig package installation writes absolute paths of the building system to fonts.conf and 
conf.d/*.conf. When GIMP is installed on the Windows target system, these absolute paths become invalid.
+
+'''Solution:'''
+
+The bug should be reported to the Fontconfig developers. Meanwhile do on the Windows target system:
+
+1. Close GIMP.
+
+2. Edit the file ''<gimp folder="" installation="">\etc\fonts\fonts.conf</gimp>'':
+
+Replace the line <code><include ignore_missing="yes">$a_directory/conf.d</include></code> by <code><include 
ignore_missing="yes">..\..\share\fontconfig\conf.avail</include></code>
+
+3. Restart GIMP.
+
+
+## Building GIMP using Microsoft tools
+
+Microsoft Visual Studio comes with its own C compiler.
+Most of GIMP development is done with the GCC and its MinGW Windows port.
+
+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.
+
+Because of this you are recommended to use MinGW for building GIMP on Windows.
+
+
+## Building GIMP plug-ins using Microsoft tools
+
+[http://web.archive.org/ How to build a GIMP plug-in with Visual Studio] (archive.org link salvaged, 
original link, now broken, was: [http://registry.gimp.org/node/24883 http://registry.gimp.org/node/24883])
+
+
+## Packaging third-party GIMP plug-ins for Windows
+
+Users on the Windows and Mac OSX platforms expect software to be packaged in a self-installing file (an 
installer).  Even though GIMP plugins (whether scripts in Python or Scheme, or executables in the C language) 
are relatively easy to install, you might want to package them using an installer such as 
[http://www.jrsoftware.org/isinfo.php Inno Setup].
+
+
diff --git a/content/core_developers/setup/build/_index.md b/content/core_developers/setup/build/_index.md
new file mode 100644
index 0000000..659f871
--- /dev/null
+++ b/content/core_developers/setup/build/_index.md
@@ -0,0 +1,327 @@
+---
+title: "Building GIMP"
+Author: "GIMP team"
+Date: 2021-06-20
+weight: 2
+---
+
+This page describes how to build GIMP.
+
+See also the file [INSTALL](https://gitlab.gnome.org/GNOME/gimp/blob/gimp-2-10/INSTALL.in).
+That text file also describes how to build GIMP.
+
+## Prerequisites
+
+You should know how to use:
+* a terminal and the command line;
+* shell environment variables.
+
+## GIMP's dependencies
+
+GIMP depends on quite a few libraries, including but not limited to:
+* [GLib](https://docs.gtk.org/glib/) – a library used by many gnome applications, containing utilities and 
common data structures for programs written in C.
+* [GObject](https://docs.gtk.org/gobject) - a library for implemnting objects (as in 
Object-Oriented-Programming) in C.
+* [GTK](https://developer-old.gnome.org/gtk2/stable/index.html) – a graphical toolkit for building 
cross-platform user interfaces. GIMP 2.99 and later need GTK 3.0.
+* [Cairo_(graphics)](https://www.cairographics.org/) – a 2D graphics library, used for drawing some of 
GIMP’s widget and also used by Gtk+.
+* Python-Cairo: Python bindings for Cairo
+* [Pango](https://docs.gtk.org/Pango/) – a library for laying out and rendering text, used also in Gtk+.
+* [libmypaint](https://github.com/mypaint/libmypaint/) - a painting library that allows a lot of flexibility 
for brushes; it needs both libmypaint (the libmypaint-v1 branch) and mypaint-brushes (the v1.3.x branch).
+
+GIMP's core depends also on two libraries which are mainly (but not only) intended to be used with GIMP:
+* [babl](https://gegl.org/babl/) – a library for converting between pixel formats, heavily used by GIMP when 
communicating with GEGL.
+* [GEGL](https://gegl.org/website/) – a graph based image processing library, heavily used in GIMP’s core.
+
+Some of GIMP's plugins depend on (at least) the following libraries
+* [librsvg](https://wiki.gnome.org/Projects/LibRsvg) – a library for rendering 
[[Wikipedia:Scalable_Vector_Graphics|SVG]] files.
+* [libpng](http://www.libpng.org/pub/png/libpng.html) – a library for reading and writing 
[[Wikipedia:Portable_Network_Graphics|PNG]] image files. Used by Gtk+, GIMP and GEGL.
+* [libexif](http://libexif.sourceforge.net/) - a library for manipulating exif data (image metadata).
+* [libwmf](http://wvware.sourceforge.net/libwmf.html) - a library for working with [[Wikipedia:Windows 
Metafile|WMF]] files.
+* [libtiff](http://www.libtiff.org/) - a library for reading and writing 
[[Wikipedia:Tagged_Image_File_Format|TIFF]] image files.
+* [libjpeg](http://libjpeg.sourceforge.net/) - a library for reading and writing [[Wikipedia:JPEG|JPEG]] 
image files.
+* [liblcms](http://www.littlecms.com/)  - the Little Color Management System, a library for working with 
color profiles.
+This list is incomplete.
+
+See also the file [INSTALL](https://gitlab.gnome.org/GNOME/gimp/blob/gimp-2-10/INSTALL.in) (or equivalent 
[INSTALL](https://gitlab.gnome.org/GNOME/gimp/blob/master/INSTALL.in) in GIMP master for the development 
version).
+
+## Build system
+
+## Preparing for Building
+
+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
+
+2. Choose a place to install everything, and set a variable to point to it:
+
+If you're building GIMP from master, you may not want to install it in your system prefix, as you may break 
your system GIMP installation, or get odd behavior, especially if you also have a system version of GIMP 
installed.
+
+You should then create another prefix directory where GIMP (and some dependencies) may be installed safely. 
On Linux you could use `$HOME/.local`. Let's name your custom prefix :
+
+```sh
+ GIMP_PREFIX=${HOME}/gimp_prefix
+```
+
+3. Set some environment variables:
+
+Some dependencies may be installed in this prefix too, so the build system should be able to find them :
+
+```sh
+ # Used to find programs/tools during build
+ export PATH="${GIMP_PREFIX}/bin:$PATH"
+
+ # Used to detect the build dependencies
+ export 
PKG_CONFIG_PATH="${GIMP_PREFIX}/share/pkgconfig:${GIMP_PREFIX}/lib/pkgconfig${PKG_CONFIG_PATH:+:$PKG_CONFIG_PATH}"
+ # Assuming a 64-bit build. Remove otherwise.
+ export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib64/pkgconfig:$PKG_CONFIG_PATH"
+
+ # Used to find the glib-introspection dependencies
+ export XDG_DATA_DIRS="${XDG_DATA_DIRS:+$XDG_DATA_DIRS:}${GIMP_PREFIX}/share:/usr/local/share:/usr/share"
+
+ # Used to find the libraries at runtime
+ export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+
+ # Used by Autotools to find its tools
+ export ACLOCAL_FLAGS="-I $INSTALL_PREFIX/share/aclocal $ACLOCAL_FLAGS"
+```
+
+Later, to run the GIMGIMP you have installed outside the usual places, you also need some of these 
environment variables.
+If you intend to frequently run the GIMP you have built, you may want to set some of these environment 
variables in your profile (a shell script that sets environment variables when you login).
+In particular, you may want to set `PATH` and `LD_LIBRARY_PATH`, which affect runtime.
+
+
+4. For Debian or derivatives (Ubuntu, Mint…) only:
+
+Additionally to the previous commands (not in replacement), update some variables this way if you use a 
Debian derivative:
+
+```sh
+  arch="$(dpkg-architecture -qDEB_HOST_MULTIARCH 2> /dev/null)"
+  export PKG_CONFIG_PATH="${GIMP_PREFIX}/lib/${arch}/pkgconfig:$PKG_CONFIG_PATH"
+  export LD_LIBRARY_PATH="${GIMP_PREFIX}/lib/${arch}:${LD_LIBRARY_PATH:+:$LD_LIBRARY_PATH}"
+```
+
+Note: The `"${var:+:$var}"` syntax prevents a trailing `":"` character in the variable, that may lead to 
issues (especially for `LD_LIBRARY_PATH`).
+
+## Download the source code
+
+### Download with git
+
+This is preferred when working on the source code and developing GIMP.
+
+```sh
+ git clone https://gitlab.gnome.org/GNOME/babl.git
+ git clone https://gitlab.gnome.org/GNOME/gegl.git
+ git clone https://gitlab.gnome.org/GNOME/gimp.git
+```
+
+You can build specific versions by choosing a ''tag'' (a fixed git revision)…
+
+```sh
+ # List available tags
+ git tag
+ # Update the working directory to a specific tag :
+ git checkout GIMP_2_10_12
+```
+
+… or a ''branch'' :
+
+```sh
+ # 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
+```
+
+### Download release archives
+
+GIMP also provides release archives. This is preferred when building stable releases.
+
+* https://download.gimp.org/pub/babl
+* 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.
+
+You can read the file `meson_options.txt` to find a list of options.
+
+You may enable Link-time optimization (meson option <code>b_lto</code>)to have better performance.
+
+```sh
+ cd babl
+ meson _build \
+     --prefix=${GIMP_PREFIX} \
+     --buildtype=release \
+     -Db_lto=true
+
+ cd _build
+ ninja
+ ninja install
+```
+
+Then repeat for gegl.
+
+### GIMP
+
+Finally, you're ready to build GIMP!
+
+You can choose between Autotools and Meson.
+
+Meson is much faster than Autotools, but newer so considered "beta" quality.
+
+####  Autotools build
+
+The steps are similar to that for libmypaint, except that ./autogen.sh runs ./configure for you.
+
+cd into the directory where you unpacked gegl.
+
+If you're building source you checked out from git, run:
+
+```sh
+ ./autogen.sh --prefix=${GIMP_PREFIX}
+```
+
+(assuming, as recommended, you have chosen to install outside the usual place, and defined environment 
variable `GIMP_PREFIX`)
+
+This generates a configure script and then runs it.
+
+If you're building from a tarball, use configure instead of autogen:
+
+```sh
+ ./configure --prefix=${GIMP_PREFIX}
+```
+
+To see options you can configure, run:
+
+```sh
+ ./configure --help
+```
+
+(Generally, its easier to accept the default build configuration, at the expense of a longer build.)
+
+Then:
+
+```sh
+ make && make install
+```
+
+####  Meson build
+
+You can configure the build with options.
+
+Options for the meson build of GIMP are described in the repository file <code>gimp/meson_options.txt</code>.
+In the example below, the line '-Dpython=true' is one such option.
+
+Meson itself also provides options, such as :
+
+* <code>warning_level=[1, 2, 3]</code> : The level of compiler warnings
+* <code>b_lto=true|false</code> : Enable link-time optimizations
+* <code>b_coverage=true|false</code> : Enable coverage tools.
+* <code>b_pgo=off|generate|use</code> : Enable profile guided optimizations
+* <code>b_sanitize=none|address|thread|undefined|memory|address,undefined</code> : Use a code sanitizer
+
+```sh
+ cd gimp
+ meson _build \
+     --prefix=${GIMP_PREFIX} \
+     --buildtype=release \
+     -Dpython=true
+
+ cd _build
+ ninja
+ ninja install
+```
+
+####  Useful build options
+
+You can customize the directory where GIMP stores settings. This prevents any interference with other GIMP 
installations on the same computer.
+
+* Autotools build : <code>--with-gimpdir=GIMP/git-master</code>
+* Meson build : <code>-Dgimpdir=GIMP/git-master</code>
+
+## Problems?
+
+Most problems will occur during the configure stage, and with any luck it's just a missing package and the 
error message will make it clear what package you need. But there are more subtle problems that can occur. If 
you have a difficult error, look in:
+
+[[Hacking:Problems_and_solutions]]
+
+## Running Your New GIMP
+
+You need to keep defined the same environment variables as for the build. You may want to define them in a 
script that you will source with :
+
+```sh
+ source ~/gimp_definitions.sh
+```
+
+To keep those variables contained only for the execution of GIMP, you may want to use subshells :
+
+```sh
+ (source ~/gimp_definitions.sh ; $GIMP_PREFIX/bin/gimp-2.10)
+```
+
+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 the web GIMP documentation
+
+You can also build the [documentation website](https://docs.gimp.org/).
+
+It uses <code>docbook</code> that requires some softwares, such as:
+
+* gettext
+* automake
+* docbook2odf
+* pngcrush
+* pngnq
+* docbook-xsl
+* docbook-utils
+* dblatex
+
+Now, to build the documentation:
+
+```sh
+ git clone --depth=0 git gitlab gnome org:GNOME/gimp-help.git
+ cd gimp-help
+ # Set this variable to your own language. It should correspond to a directory in the "po" source folder.
+ export LINGUAS=en
+ ./autogen.sh [--without-gimp ALL_LINGUAS="en"]
+ make
+ make pdf-local
+```
diff --git a/content/core_developers/setup/build/macOS.md b/content/core_developers/setup/build/macOS.md
new file mode 100644
index 0000000..fd2814e
--- /dev/null
+++ b/content/core_developers/setup/build/macOS.md
@@ -0,0 +1,16 @@
+---
+title: "Building GIMP for macOS"
+Author: "GIMP team"
+Date: 2021-08-30
+weight: 4
+---
+
+## Current procedure
+
+GIMP has an official build whose scripts are located at this repo: 
https://gitlab.gnome.org/Infrastructure/gimp-macos-build
+
+## Historical links
+
+Some older links explain how to build and install GIMP on an Apple computer running the OSX operating 
system. We are not sure how acceptable they are with current code.
+
+One person describes [how to build Gimp on 
OSX](http://sites.google.com/site/httimchen/2011_imagesvn/build-gimp-on-mac) using native 
[gtk-osx](http://gtk-osx.sourceforge.net/)  and the [jhbuild](http://developer.gnome.org/jhbuild/)  tool.
diff --git a/content/core_developers/setup/git.md b/content/core_developers/setup/git.md
index 85e6f48..83e3f60 100644
--- a/content/core_developers/setup/git.md
+++ b/content/core_developers/setup/git.md
@@ -3,7 +3,7 @@ title = "Obtaining source code"
 date = "2022-08-07"
 abbrev = "Git"
 description = "Living on the bleeding edge"
-weight = 0
+weight = 1
 +++
 
 GIMP source code lives in the `gimp` repository on the [GNOME git


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]