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




commit 8edec4fef67372b485c8891626f0bebdfd0db7ab
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   | 21 +++++++++++++++++++++
 build/windows/gitlab-ci/package-gimp-msys2.sh |  4 ++--
 2 files changed, 23 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..653a60185b 100644
--- a/build/windows/gitlab-ci/build-deps-msys2.sh
+++ b/build/windows/gitlab-ci/build-deps-msys2.sh
@@ -103,6 +103,27 @@ 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) ##
+
+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
+
+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]