From 24605ae63a1d23a476621b516f0eeaa674502435 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 3 Feb 2023 21:17:08 +0200 Subject: [PATCH 21/21] installer_cross / Meson: Add Qt5-client installer See osdn #46676 Signed-off-by: Marko Lindqvist --- .../meson-build_all_installers.sh | 15 +++++++++++ .../installer_cross/meson-installer_build.sh | 27 +++++++++++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) diff --git a/windows/installer_cross/meson-build_all_installers.sh b/windows/installer_cross/meson-build_all_installers.sh index 426f9dc454..b69b67f7a2 100755 --- a/windows/installer_cross/meson-build_all_installers.sh +++ b/windows/installer_cross/meson-build_all_installers.sh @@ -51,6 +51,11 @@ then CROSSER_QT6=yes fi +if grep "CROSSER_QT5" "$DLLSPATH/crosser.txt" | grep yes > /dev/null +then + CROSSER_QT5=yes +fi + if ! ./meson-installer_build.sh "$DLLSPATH" gtk3.22 ; then RET=1 GTK322="Fail" @@ -76,6 +81,15 @@ else QT6="Success" fi +if test "$CROSSER_QT5" != "yes" ; then + QT5="N/A" +elif ! ./meson-installer_build.sh "$DLLSPATH" qt5 ; then + RET=1 + QT5="Fail" +else + QT5="Success" +fi + # sdl2-client comes with gtk4 modpack installer if test "$CROSSER_GTK4" != "yes" ; then SDL2="N/A" @@ -98,6 +112,7 @@ fi echo "Gtk3.22: $GTK322" echo "Gtk4: $GTK4" echo "Qt6: $QT6" +echo "Qt5: $QT5" echo "Sdl2: $SDL2" echo "Ruledit: $RULEDIT" diff --git a/windows/installer_cross/meson-installer_build.sh b/windows/installer_cross/meson-installer_build.sh index 2d409656ab..ad2718e209 100755 --- a/windows/installer_cross/meson-installer_build.sh +++ b/windows/installer_cross/meson-installer_build.sh @@ -89,6 +89,17 @@ add_qt6_env() { cp ./helpers/installer-helper-qt.cmd $2/bin/installer-helper.cmd } +add_qt5_env() { + add_glib_env $1 $2 && + cp -R $1/qt5/plugins $2/ && + cp $1/bin/Qt5Core.dll $2/ && + cp $1/bin/Qt5Gui.dll $2/ && + cp $1/bin/Qt5Widgets.dll $2/ && + cp $1/bin/libpcre2-16-0.dll $2/ && + mkdir -p $2/bin && + cp ./helpers/installer-helper-qt.cmd $2/bin/installer-helper.cmd +} + add_sdl2_env() { cp $1/bin/SDL2_image.dll $2/ && cp $1/bin/SDL2_ttf.dll $2/ @@ -120,6 +131,11 @@ case $GUI in CLIENT="qt" MPGUI="qt" FCMP="qt" ;; + qt5) + GUINAME="Qt5" + CLIENT="qt" + MPGUI="qt" + FCMP="qt" ;; ruledit) ;; *) @@ -242,8 +258,15 @@ else fi ;; qt5) - echo "Qt5 installer build not supported!" >&2 - exit 1 + if ! cp freeciv-ruledit.cmd "$INSTDIR" + then + echo "Adding cmd-file failed!" >&2 + exit 1 + fi + if ! add_qt5_env "$DLLSPATH" "$INSTDIR" ; then + echo "Copying Qt5 environment failed!" >&2 + exit 1 + fi ;; esac -- 2.39.1