Windows Build Environment
The MyPaint project builds for Windows using MSYS2, a development environment based off of Cygwin with a focus on building Windows-native software.
- Follow MSYS2’s getting started guide. The MSYS2 environment will either
be installed at
c:\msys32
orc:\msys64
. - Install important development dependencies
$ pacman --sync --needed --noconfirm base-devel mingw-w64-{i686,x86_64}-toolchain
Building GTK3 From Source
GTK3 (the GUI toolkit used by MyPaint) is packaged in the MSYS shell, but you may want to install it from source. Unless specified otherwise, run these commands in the MSYS shell.
- Download and unpack GTK3:
- The following code block unpacks GTK3 into
src/gtk3
(C:\msys32\usr\src\MINGW-packages\mingw-w64-gtk3-git\src\gtk3
in the Windows filesystem).
- The following code block unpacks GTK3 into
$ cd /usr/src
$ git clone https://github.com/Alexpux/MINGW-packages.git
$ cd MINGW-packages/mingw-w64-gtk3-git
$ makepkg-mingw --syncdeps --nobuild # unpack but don't build
- Build GTK3:
makepkg-mingw
normally builds for bothMINGW32
andMINGW64
. TheMINGW_INSTALLS
variable species which target to build for.
$ MINGW_INSTALLS=mingw64 makepkg-mingw --force --holdver --noextract
- Install GTK3:
- The results of the final build command are
.pkg.tar.xz
files in themingw-w64-gtk3-git
folder.
- The results of the final build command are
$ ls *.pkg.tar.xz
$ pacman -U "mingw-w64-{{{ VARIOUS SPECIFICS HERE }}}.pkg.tar.xz"
- Test the installation using e.g.
gtk3-demo
from theMINGW32
orMINGW64
shell.