Building GIMP natively under Windows using MSYS2 Setting up a devel environment 1) Follow the installation instructions for msys2 available at msys2.github.io. Make sure to follow the post-installation instructions on that page to update the msys2, mingw64, mingw32 systems appropriately. This includes: a) Updating pacman and the package database: pacman -Sy pacman If needed, close MSYS2 and run it again (note: the installed .bat files don't appear to work on win10, launch it directly from the install location, ie: c:\msys64\msys2.exe). Note to the less experienced user: msys2 and mingw64 sound similar, and it is easy to get confused. It's important to run the correct one. msys2 has a purple/lavender icon, mingw64 has a blue icon. I didn't use minw32, so exclude references to that from my instructions. Update the package database and core system packages: pacman -Syu If an error is thrown about incompatible versions of the cygwin DLL and the following warnings are shown: warning: terminate MSYS2 without returning to shell and check for updates again warning: for example close your terminal window instead of calling exit Then follow the instructions and close the terminal window. For warning "running processes", choose "OK" to close it anyway. b) Re-open MSYS2 from the install directory msys64 by clicking on application msys2 (purple icon). Run: pacman -Syu. c) If needed, close MSYS2 and run it again (again). d) Finally update the rest with one more call: pacman -Su Once everything is updated, exit out of MSYS2 (upper right corner x on msys2 window). Directory structure on my machine: c:\msys64 Under this, dev etc home mingw32 mingw64 opt tmp usr var 2) Run mingw64.exe directly from the install directory (by default: c:\msys64\mingw64.exe). In this shell, run: pacman -S base-devel \ mingw-w64-x86_64-toolchain \ git \ mingw-w64-x86_64-gtk2 \ mingw-w64-x86_64-gtk3 \ mingw-w64-x86_64-json-glib \ mingw-w64-x86_64-json-c \ mingw-w64-x86_64-gexiv2 \ mingw-w64-x86_64-lcms2 \ mingw-w64-x86_64-glib-networking \ mingw-w64-x86_64-poppler \ mingw-w64-x86_64-imagemagick \ mingw-w64-x86_64-gtk-doc \ autoconf-archive \ mingw-w64-x86_64-meson 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. 3) Set up build site If software is downloaded and built at c:\users\{USERNAME}, it will create a cluttered subdirectory, which is a key one for many purposes. For that reason, it is better to build an install directory: mkdir $HOME/code mkdir $HOME/code/gimpdefault mkdir $HOME/code/gimpdefault/build mkdir $HOME/code/gimpdefault/install mkdir $HOME/code/gimpdefault/install/share mkdir $HOME/code/gimpdefault/install/share/aclocal touch $HOME/code/gimpdefault/install/share/aclocal/gimp-2.0.m4 This creates a single point of entry on c:\users\{USERNAME}, and puts all files in $HOME/code/gimpdefault/build. You may not wish to do this. That's fine - I try to use environmental vars below to allow flexibility in this location of code and installs. This works for me. Change it if you wish, but be sure to adjust the .bash_profile accordingly. 4) Set your .bash_profile. a) Begin by determining the current status of environmental variables. In the mingw shell: echo PATH: $PATH > curpath.txt echo LD_LIBRARY_PATH: $LD_LIBRARY_PATH >> curpath.txt echo PKG_CONFIG_PATH: $PKG_CONFIG_PATH >> curpath.txt echo XDG_DATA_DIRS: $XDG_DATA_DIRS >> curpath.txt This will produce the file curpath.txt: PATH: /mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/WINDOWS/System32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0/ PKG_CONFIG_PATH: /mingw64/lib/pkgconfig:/mingw64/share/pkgconfig LD_LIBRARY_PATH: XDG_DATA_DIRS: b) Edit this information to add "export" to each line, and to insert "=" to each line. c) Add the following lines to .bash_profile. .bash_profile is placed in the directory that is opened when the mingw64 window opens; this is usually c:\users\{USERNAME} export PATH=/mingw64/bin:/usr/local/bin:/usr/bin:/bin:/c/WINDOWS/System32:/c/WINDOWS:/c/WINDOWS/System32/Wbem:/c/WINDOWS/System32/WindowsPowerShell/v1.0/:/usr/bin/site_perl:/usr/bin/vendor_perl:/usr/bin/core_perl:. export PKG_CONFIG_PATH=/lib/pkgconfig:/mingw64/lib/pkgconfig:/mingw64/share/pkgconfig export LD_LIBRARY_PATH= export XDG_DATA_DIRS= export PREFIX=$HOME/code/gimpdefault/install export PATH=$PREFIX/bin:$PATH export LD_LIBRARY_PATH=$PREFIX/lib:$LD_LIBRARY_PATH export XDG_DATA_DIRS=$PREFIX/share:$XDG_DATA_DIRS export ACLOCAL_FLAGS="-I $PREFIX/share/aclocal" export PKG_CONFIG_PATH=$PREFIX/lib/pkgconfig:$PKG_CONFIG_PATH export PKG_CONFIG_PATH=$PREFIX/share/pkgconfig:$PKG_CONFIG_PATH export GIO_EXTRA_MODULES=/usr/lib/gio/modules/ export SRC_DIR=$HOME/code/gimpdefault/build export MAKEFLAGS=-j5 This will cause make to do a multi-core build, using the number of cores specified after the -j option. d) Reload your .bash_profile: . .bash_profile 4) Acquire all sources from git a) Git commands Below you see the git commands to pull all sources. i) I am not 100% sure you need to do glib. It's actually brought in using pacman. This may be unnecessary ii) You might also need gdk-pixbuf from git. I have yet to figure out how to build it, as it requires x11 which I cannot locate for msys2/mingw. iii) Code: cd $PREFIX git clone https://gitlab.gnome.org/GNOME/glib git clone https://gitlab.gnome.org/GNOME/gdk-pixbuf git clone https://gitlab.gnome.org/GNOME/babl git clone https://gitlab.gnome.org/GNOME/gegl git clone git://github.com/mypaint/libmypaint.git git clone https://github.com/Jehan/mypaint-brushes.git git clone -b gimp-2-10 https://gitlab.gnome.org/GNOME/gimp There is an unresolved issue with the current version of GIMP for Windows. A required dependency, appstream-glib, has not been ported to msys2/mingw, and thus this dependency cannot be satisfied. The 2.10.6 version (gimp-2-10) does not have this requirement. b) There is another unresolved dependency, for glib-networking. A suggestion from a long-term user is to simply remove this from configure.ac. To do this, cd gimp, edit configure.ac. For lines 739-764 (in my version), place "#" comment chars at the start of the line to remove them. The file should then look like: #AC_MSG_CHECKING([for glib-networking (GIO TLS implementation)]) #gimp_save_CFLAGS="$CFLAGS" #gimp_save_LIBS="$LIBS" #CFLAGS="$CFLAGS $GIO_CFLAGS" #LIBS="$LIBS $GIO_LIBS" #AC_RUN_IFELSE([AC_LANG_PROGRAM([#include ], # [return !g_tls_backend_supports_tls (g_tls_backend_get_default ());])], # [have_glib_networking="yes"], # [have_glib_networking="no"], # [have_glib_networking="unknown (cross-compiling)"]) #CFLAGS="$gimp_save_CFLAGS" #LIBS="$gimp_save_LIBS" #AC_MSG_RESULT($have_glib_networking) # #if test "x$have_glib_networking" = "xno"; then # add_deps_error([glib-networking], # [Test for glib-networking failed. This is required.]) #elif test "x$have_glib_networking" != "xyes"; then # warning_glib_networking=" #WARNING: Test for glib-networking cannot be performed while cross-compiling. # Make sure glib-networking is installed, otherwise GIMP will not be able # to display the remote help pages through the help browser, nor will it # be able to open remote HTTPS (or other protocol using SSL/TLS) files. # HTTPS is becoming the expected standard and should not be considered # optional anymore." #fi Regardless of the actual line numbers, it should start with #AC_MSG_CHECKING([for glib-networking (GIO TLS implementation)]) and end with #fi 5) Building the software a) glib cd $SRC_DIR cd glib ./autogen.sh --prefix=$PREFIX make $MAKEFLAGS make $MAKEFLAGS install b) babl cd $SRC_DIR cd babl ./autogen.sh --prefix=$PREFIX --disable-docs make $MAKEFLAGS make $MAKEFLAGS install c) gegl cd $SRC_DIR cd gegl ./autogen.sh --prefix=$PREFIX --enable-gtk-doc-html=no --enable-workshop --disable-docs make $MAKEFLAGS make $MAKEFLAGS install d) libmypaint cd $SRC_DIR cd libmypaint git checkout tags/v1.3.0 #Use tag 1.3.0 ./autogen.sh ./configure --prefix=$PREFIX make make install e) mypaint-brushes cd $SRC_DIR cd mypaint-brushes git checkout v1.3.x ./autogen.sh --prefix=$PREFIX ./configure --prefix=$PREFIX make $MAKEFLAGS make $MAKEFLAGS install f) gimp cd $SRC_DIR cd gimp ./autogen.sh --prefix=$PREFIX --disable-gtk-doc --with-gimpdir=$HOME/code/gimpdefault/install/config --disable-python make $MAKEFLAGS make $MAKEFLAGS install 6) Final newly built GIMP is at $SRC_DIR/gimp/app/.libs/gimp-2.10.exe