From 67d77ed2b65e88f6ddb43285e500adec16c5a1b2 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Tue, 11 Jan 2022 20:56:25 +0200 Subject: [PATCH 41/41] installer_cross: Complete gtk4 environment Install all gtk4 environment files needed by gtk4 modpack installer See osdn #43602 Signed-off-by: Marko Lindqvist --- windows/Makefile.am | 1 + .../helpers/installer-helper-gtk4.cmd | 5 ++++ windows/installer_cross/installer_build.sh | 25 ++++++++++++------- 3 files changed, 22 insertions(+), 9 deletions(-) create mode 100755 windows/installer_cross/helpers/installer-helper-gtk4.cmd diff --git a/windows/Makefile.am b/windows/Makefile.am index 4290178921..90794cc459 100644 --- a/windows/Makefile.am +++ b/windows/Makefile.am @@ -44,6 +44,7 @@ dist_noinst_DATA = \ installer_cross/freeciv-ruledit.cmd \ installer_cross/licenses/COPYING.installer \ installer_cross/helpers/installer-helper-gtk3.cmd \ + installer_cross/helpers/installer-helper-gtk4.cmd \ installer_cross/helpers/installer-helper-qt.cmd \ installer_cross/helpers/uninstaller-helper-gtk3.sh diff --git a/windows/installer_cross/helpers/installer-helper-gtk4.cmd b/windows/installer_cross/helpers/installer-helper-gtk4.cmd new file mode 100755 index 0000000000..c499be156f --- /dev/null +++ b/windows/installer_cross/helpers/installer-helper-gtk4.cmd @@ -0,0 +1,5 @@ +cd %~dp0\.. + +bin\glib-compile-schemas.exe share\glib-2.0\schemas +bin\gdk-pixbuf-query-loaders.exe > lib\gdk-pixbuf-2.0\2.10.0\loaders.cache +bin\gtk4-update-icon-cache.exe share\icons\Adwaita diff --git a/windows/installer_cross/installer_build.sh b/windows/installer_cross/installer_build.sh index 9b61804d9e..f5df3f41ca 100755 --- a/windows/installer_cross/installer_build.sh +++ b/windows/installer_cross/installer_build.sh @@ -9,16 +9,12 @@ add_glib_env() { cp $1/bin/glib-compile-schemas.exe $2/bin/ } -add_gtk3_env() { - mkdir -p $2/etc && - cp -R $1/etc/gtk-3.0 $2/etc/ && +add_gtk_common_env() { mkdir -p $2/lib && cp -R $1/lib/gdk-pixbuf-2.0 $2/lib/ && mkdir -p $2/share/icons && cp -R $1/share/locale $2/share/ && cp -R $1/share/icons/Adwaita $2/share/icons/ && - cp $1/bin/libgtk-3-0.dll $2/ && - cp $1/bin/libgdk-3-0.dll $2/ && cp $1/bin/libgobject-2.0-0.dll $2/ && cp $1/bin/libpixman-1-0.dll $2/ && cp $1/bin/libcairo-gobject-2.dll $2/ && @@ -38,16 +34,27 @@ add_gtk3_env() { cp $1/bin/libxml2-2.dll $2/ && cp $1/bin/libjpeg-9.dll $2/ && mkdir -p $2/bin && - cp $1/bin/gdk-pixbuf-query-loaders.exe $2/bin/ && + cp $1/bin/gdk-pixbuf-query-loaders.exe $2/bin/ +} + +add_gtk3_env() { + add_gtk_common_env $1 $2 && + mkdir -p $2/etc && + cp -R $1/etc/gtk-3.0 $2/etc/ && + cp $1/bin/libgtk-3-0.dll $2/ && + cp $1/bin/libgdk-3-0.dll $2/ && cp $1/bin/gtk-update-icon-cache.exe $2/bin/ && cp ./helpers/installer-helper-gtk3.cmd $2/bin/installer-helper.cmd } add_gtk4_env() { + add_gtk_common_env $1 $2 && mkdir -p $2/etc && - cp -R $1/etc/gtk-4.0 $2/etc/ && cp $1/bin/libgtk-4-1.dll $2/ && - cp $1/bin/libgraphene-1.0-0.dll $2/ + cp $1/bin/libgraphene-1.0-0.dll $2/ && + cp $1/bin/libcairo-script-interpreter-2.dll $2/ && + cp $1/bin/gtk4-update-icon-cache.exe $2/bin/ && + cp ./helpers/installer-helper-gtk4.cmd $2/bin/installer-helper.cmd } add_sdl2_mixer_env() { @@ -244,7 +251,7 @@ else exit 1 fi else - if test "x$GUI" = "xgtk3.22" ; then + if test "x$GUI" = "xgtk3.22" || test "x$GUI" = "xgtk4" ; then UNINSTALLER="helpers/uninstaller-helper-gtk3.sh" else UNINSTALLER="" -- 2.34.1