From 9d1859f323ca862ffdb77ef8f515bc32212f047f Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 16 Jun 2024 22:44:57 +0300
Subject: [PATCH 27/27] installer_cross: Build qt6x-client installer

See RM #720

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 .../installer_cross/meson-build_all_installers.sh     | 10 ++++++++++
 .../windows/installer_cross/meson-installer_build.sh  | 11 ++++++++---
 2 files changed, 18 insertions(+), 3 deletions(-)

diff --git a/platforms/windows/installer_cross/meson-build_all_installers.sh b/platforms/windows/installer_cross/meson-build_all_installers.sh
index c6bcef70a5..4f5770c8c3 100755
--- a/platforms/windows/installer_cross/meson-build_all_installers.sh
+++ b/platforms/windows/installer_cross/meson-build_all_installers.sh
@@ -85,6 +85,15 @@ else
   QT6="Success"
 fi
 
+if test "${CROSSER_QT6}" != "yes" ; then
+  QT7="N/A"
+elif ! ./meson-installer_build.sh "${DLLSPATH}" qt6x ; then
+  RET=1
+  QT7="Fail"
+else
+  QT7="Success"
+fi
+
 # sdl2-client comes with gtk4 modpack installer
 if test "${CROSSER_GTK4}" != "yes" ; then
   SDL2="N/A"
@@ -108,6 +117,7 @@ echo "Gtk3.22: ${GTK322}"
 echo "Gtk4:    ${GTK4}"
 echo "Gtk4x:   ${GTK4x}"
 echo "Qt6:     ${QT6}"
+echo "Qt6x:    ${QT7}"
 echo "Sdl2:    ${SDL2}"
 echo "Ruledit: ${RULEDIT}"
 
diff --git a/platforms/windows/installer_cross/meson-installer_build.sh b/platforms/windows/installer_cross/meson-installer_build.sh
index 97e5720496..d3d252ca19 100755
--- a/platforms/windows/installer_cross/meson-installer_build.sh
+++ b/platforms/windows/installer_cross/meson-installer_build.sh
@@ -115,7 +115,7 @@ fi
 DLLSPATH="$1"
 GUI="$2"
 
-case $GUI in
+case "$GUI" in
   gtk3.22)
     GUINAME="GTK3.22"
     MPGUI="gtk3"
@@ -136,6 +136,11 @@ case $GUI in
     CLIENT="qt"
     MPGUI="qt"
     FCMP="qt" ;;
+  qt6x)
+    GUINAME="Qt6x"
+    CLIENT="qt"
+    MPGUI="qt"
+    FCMP="qt" ;;
   ruledit)
     ;;
   *)
@@ -261,7 +266,7 @@ else
         exit 1
       fi
       ;;
-    qt6)
+    qt6|qt6x)
       if ! cp freeciv-ruledit.cmd "${INSTDIR}"
       then
         echo "Adding cmd-file failed!" >&2
@@ -274,7 +279,7 @@ else
       ;;
   esac
 
-  if test "${GUI}" = "qt6" ; then
+  if test "${GUI}" = "qt6" || test "${GUI}" = "qt6x" ; then
     EXE_ID="qt"
   else
     EXE_ID="${GUI}"
-- 
2.43.0

