[gimp/wip/Jehan/incremental-win-installer-improvements: 10/10] build: custom GTK3 compilation for the Windows installer.




commit c90205828c5910f8887c183094c05819014672c7
Author: Jehan <jehan girinstud io>
Date:   Sat Jul 3 16:01:24 2021 +0200

    build: custom GTK3 compilation for the Windows installer.

 build/windows/gitlab-ci/build-deps-msys2.sh   | 32 +++++++++++++++++++++++++++
 build/windows/gitlab-ci/package-gimp-msys2.sh |  4 ++--
 2 files changed, 34 insertions(+), 2 deletions(-)
---
diff --git a/build/windows/gitlab-ci/build-deps-msys2.sh b/build/windows/gitlab-ci/build-deps-msys2.sh
index 94eed4affd..747e19fa9e 100644
--- a/build/windows/gitlab-ci/build-deps-msys2.sh
+++ b/build/windows/gitlab-ci/build-deps-msys2.sh
@@ -103,6 +103,38 @@ mkdir -p ${GIMP_PREFIX}/lib/gio/modules/
 cp -fr ${MSYS_PREFIX}/lib/gio/modules/*.dll ${GIMP_PREFIX}/lib/gio/modules/
 # TODO: what about /mingw64/share/locale/*/LC_MESSAGES/glib-networking.mo ?
 
+## GTK (patched from MSYS2) ##
+
+pacman --noconfirm -S --needed \
+    mingw-w64-$MSYS2_ARCH-adwaita-icon-theme \
+    mingw-w64-$MSYS2_ARCH-atk \
+    mingw-w64-$MSYS2_ARCH-gdk-pixbuf2 \
+    mingw-w64-$MSYS2_ARCH-libepoxy \
+    mingw-w64-$MSYS2_ARCH-libxslt \
+    mingw-w64-$MSYS2_ARCH-sassc \
+    mingw-w64-$MSYS2_ARCH-shared-mime-info
+
+git clone --branch 3.24.29 --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/gtk.git _gtk
+
+cd _gtk/
+wget 
"https://github.com/msys2/MINGW-packages/raw/master/mingw-w64-gtk3/0002-Revert-Quartz-Set-the-popup-menu-type-hint-before-re.patch";
+wget 
"https://github.com/msys2/MINGW-packages/raw/master/mingw-w64-gtk3/0003-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch";
+wget 
"https://github.com/msys2/MINGW-packages/raw/master/mingw-w64-gtk3/0004-Disable-low-level-keyboard-hook.patch";
+patch -p1 < 0002-Revert-Quartz-Set-the-popup-menu-type-hint-before-re.patch
+patch -p1 < 0003-gtkwindow-Don-t-force-enable-CSD-under-Windows.patch
+patch -p1 < 0004-Disable-low-level-keyboard-hook.patch
+# Patches not in MSYS2 build.
+patch -p1 < ../build/windows/patches/gtk3-24-mr3275-gimp-issue-5475.patch
+
+mkdir _build
+cd _build
+meson -Dprefix="${GIMP_PREFIX}" \
+      --wrap-mode=nodownload --auto-features=enabled \
+      --buildtype=release
+ninja
+ninja install
+cd ../..
+
 ## babl and GEGL (follow master branch) ##
 
 git clone --depth=${GIT_DEPTH} https://gitlab.gnome.org/GNOME/babl.git _babl
diff --git a/build/windows/gitlab-ci/package-gimp-msys2.sh b/build/windows/gitlab-ci/package-gimp-msys2.sh
index c720a46abd..92357c505b 100644
--- a/build/windows/gitlab-ci/package-gimp-msys2.sh
+++ b/build/windows/gitlab-ci/package-gimp-msys2.sh
@@ -87,7 +87,7 @@ echo "bin\gimp-2.99.exe" > ${GIMP_DISTRIB}/gimp.cmd
 
 # Package library data and modules.
 cp -fr ${MSYS_PREFIX}/etc/fonts ${GIMP_DISTRIB}/etc/
-cp -fr ${MSYS_PREFIX}/etc/gtk-3.0 ${GIMP_DISTRIB}/etc/
+cp -fr ${GIMP_PREFIX}/etc/gtk-3.0 ${GIMP_DISTRIB}/etc/
 
 mkdir ${GIMP_DISTRIB}/lib/
 cp -fr ${GIMP_PREFIX}/lib/gimp ${GIMP_DISTRIB}/lib/
@@ -99,7 +99,7 @@ cp -fr ${GIMP_PREFIX}/lib/girepository-1.0/* ${GIMP_DISTRIB}/lib/girepository-1.
 
 cp -fr ${GIMP_PREFIX}/lib/gio ${GIMP_DISTRIB}/lib/
 cp -fr ${MSYS_PREFIX}/lib/gdk-pixbuf-2.0 ${GIMP_DISTRIB}/lib/
-cp -fr ${MSYS_PREFIX}/lib/gtk-3.0 ${GIMP_DISTRIB}/lib/
+cp -fr ${GIMP_PREFIX}/lib/gtk-3.0 ${GIMP_DISTRIB}/lib/
 
 cp -fr ${MSYS_PREFIX}/lib/python3.8 ${GIMP_DISTRIB}/lib/
 


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