From 7c2fccb9202704b4d0cd180d0084fc0a282a8c28 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 25 Jun 2022 14:46:47 +0300 Subject: [PATCH 51/51] installer_cross meson: Build gtk4-client installer See osdn #44943 Signed-off-by: Marko Lindqvist --- .../installer_cross/meson-build_all_installers.sh | 10 ++++++++++ windows/installer_cross/meson-installer_build.sh | 14 ++++++++++++-- windows/installer_cross/meson-winbuild.sh | 8 +++++--- 3 files changed, 27 insertions(+), 5 deletions(-) diff --git a/windows/installer_cross/meson-build_all_installers.sh b/windows/installer_cross/meson-build_all_installers.sh index aa4526f0f5..aa04ccc46f 100755 --- a/windows/installer_cross/meson-build_all_installers.sh +++ b/windows/installer_cross/meson-build_all_installers.sh @@ -53,6 +53,15 @@ else GTK322="Success" fi +if test "$CROSSER_GTK4" != "yes" ; then + GTK4="N/A" +elif ! ./meson-installer_build.sh "$DLLSPATH" gtk4 ; then + RET=1 + GTK4="Fail" +else + GTK4="Success" +fi + # sdl2-client comes with gtk4 modpack installer if test "$CROSSER_GTK4" != "yes" ; then SDL2="N/A" @@ -64,6 +73,7 @@ else fi echo "Gtk3.22: $GTK322" +echo "Gtk4: $GTK4" echo "Sdl2: $SDL2" exit $RET diff --git a/windows/installer_cross/meson-installer_build.sh b/windows/installer_cross/meson-installer_build.sh index 41250152af..ef967cc8fa 100755 --- a/windows/installer_cross/meson-installer_build.sh +++ b/windows/installer_cross/meson-installer_build.sh @@ -72,6 +72,7 @@ add_gtk4_env() { cp $1/bin/libgtk-4-1.dll $2/ && cp $1/bin/libgraphene-1.0-0.dll $2/ && cp $1/bin/libcairo-script-interpreter-2.dll $2/ && + cp $1/bin/libtiff-5.dll $2/ && cp $1/bin/gdbus.exe $2/ && cp $1/bin/gtk4-update-icon-cache.exe $2/bin/ && cp ./helpers/installer-helper-gtk4.cmd $2/bin/installer-helper.cmd @@ -79,8 +80,7 @@ add_gtk4_env() { add_sdl2_env() { cp $1/bin/SDL2_image.dll $2/ && - cp $1/bin/SDL2_ttf.dll $2/ && - cp $1/bin/libtiff-5.dll $2/ + cp $1/bin/SDL2_ttf.dll $2/ } if test "$1" = "" || test "$1" = "-h" || test "$1" = "--help" || @@ -97,6 +97,10 @@ case $GUI in GUINAME="GTK3.22" MPGUI="gtk3" FCMP="gtk3" ;; + gtk4) + GUINAME="GTK4" + MPGUI="gtk4" + FCMP="gtk4" ;; sdl2) GUINAME="SDL2" FCMP="gtk4" ;; @@ -171,6 +175,12 @@ else exit 1 fi ;; + gtk4) + if ! add_gtk4_env "$DLLSPATH" "$INSTDIR" ; then + echo "Copying gtk4 environment failed!" >&2 + exit 1 + fi + ;; sdl2) # For gtk4 modpack installer if ! add_gtk4_env "$DLLSPATH" "$INSTDIR" ; then diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index b3752958d8..f601cf829b 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -22,8 +22,8 @@ fi GUI="$2" -if test "$GUI" != "gtk3.22" && test "$GUI" != "sdl2" && - test "$GUI" != "qt5" ; then +if test "$GUI" != "gtk3.22" && test "$GUI" != "gtk4" && + test "$GUI" != "sdl2" && test "$GUI" != "qt5" ; then echo "Unknown gui \"$2\"" >&2 exit 1 fi @@ -68,6 +68,8 @@ QTPARAMS="" case $GUI in gtk3.22) FCMP="gtk3" RULEDIT=false ;; + gtk4) FCMP="gtk4" + RULEDIT=false ;; sdl2) FCMP="gtk4" RULEDIT=false ;; qt5) CLIENT="qt" @@ -77,7 +79,7 @@ case $GUI in QTPARAMS="-Dqtver=qt5" ;; esac -if test "x$CLIENT" = "x" ; then +if test "$CLIENT" = "" ; then CLIENT="$GUI" fi -- 2.35.1