From 3728673e4059ac9849f9055d2197a116b49052f7 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 31 Aug 2025 03:14:22 +0300
Subject: [PATCH 27/27] Drop Windows support for gtk4x-client

See RM #1665

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 doc/README.msys2                                 |  3 +--
 platforms/windows/Makefile.am                    |  5 -----
 .../windows/installer_cross/freeciv-gtk4x.cmd    |  3 ---
 .../windows/installer_cross/freeciv-mp-gtk4x.cmd |  3 ---
 .../meson-build_all_installers.sh                | 10 ----------
 .../installer_cross/meson-installer_build.sh     |  8 ++------
 .../windows/installer_cross/meson-winbuild.sh    |  5 ++---
 platforms/windows/installer_msys2/Makefile.meson | 16 ++--------------
 .../installer_msys2/create-freeciv-gtk4x-nsi.sh  |  5 -----
 .../windows/installer_msys2/freeciv-gtk4x.cmd    |  3 ---
 .../windows/installer_msys2/freeciv-mp-gtk4x.cmd |  3 ---
 11 files changed, 7 insertions(+), 57 deletions(-)
 delete mode 100755 platforms/windows/installer_cross/freeciv-gtk4x.cmd
 delete mode 100755 platforms/windows/installer_cross/freeciv-mp-gtk4x.cmd
 delete mode 100644 platforms/windows/installer_msys2/create-freeciv-gtk4x-nsi.sh
 delete mode 100644 platforms/windows/installer_msys2/freeciv-gtk4x.cmd
 delete mode 100644 platforms/windows/installer_msys2/freeciv-mp-gtk4x.cmd

diff --git a/doc/README.msys2 b/doc/README.msys2
index dcbf72872b..c2d3bb7f2e 100644
--- a/doc/README.msys2
+++ b/doc/README.msys2
@@ -22,7 +22,7 @@ located here on top for quick reference for the specific freeciv revision.
 
 - With premade environment, buildable clients are:
   For "win64":    gtk3.22, gtk4, sdl2, Qt5
-  For "win64-10": gtk3.22, gtk4, gtk4x, sdl2, sdl3, Qt6, Qt6x
+  For "win64-10": gtk3.22, gtk4, sdl2, sdl3, Qt6, Qt6x
 
 
  Setup
@@ -213,7 +213,6 @@ Get the freeciv sources there somehow. Some options are:
   - "<gui>-installer", where <gui> is
      - gtk3.22
      - gtk4
-     - gtk4x
      - sdl2
      - sdl3
      - qt5
diff --git a/platforms/windows/Makefile.am b/platforms/windows/Makefile.am
index e550a0422e..f8879f06cd 100644
--- a/platforms/windows/Makefile.am
+++ b/platforms/windows/Makefile.am
@@ -7,7 +7,6 @@ dist_noinst_DATA = \
 		installer_msys2/create-freeciv-gtk-qt-nsi.sh	\
 		installer_msys2/create-freeciv-gtk3.22-nsi.sh	\
 		installer_msys2/create-freeciv-gtk4-nsi.sh	\
-		installer_msys2/create-freeciv-gtk4x-nsi.sh	\
 		installer_msys2/create-freeciv-qt5-nsi.sh	\
 		installer_msys2/create-freeciv-qt6-nsi.sh	\
 		installer_msys2/create-freeciv-qt6x-nsi.sh	\
@@ -17,10 +16,8 @@ dist_noinst_DATA = \
 		installer_msys2/create-freeciv-ruledit-nsi.sh	\
 		installer_msys2/freeciv-gtk3.22.cmd		\
 		installer_msys2/freeciv-gtk4.cmd		\
-		installer_msys2/freeciv-gtk4x.cmd		\
 		installer_msys2/freeciv-mp-gtk3.cmd		\
 		installer_msys2/freeciv-mp-gtk4.cmd		\
-		installer_msys2/freeciv-mp-gtk4x.cmd		\
 		installer_msys2/freeciv-mp-qt.cmd		\
 		installer_msys2/freeciv-qt.cmd			\
 		installer_msys2/freeciv-sdl2.cmd		\
@@ -36,10 +33,8 @@ dist_noinst_DATA = \
 		installer_cross/freeciv-server.cmd		\
 		installer_cross/freeciv-gtk3.22.cmd		\
 		installer_cross/freeciv-gtk4.cmd		\
-		installer_cross/freeciv-gtk4x.cmd		\
 		installer_cross/freeciv-mp-gtk3.cmd		\
 		installer_cross/freeciv-mp-gtk4.cmd		\
-		installer_cross/freeciv-mp-gtk4x.cmd		\
 		installer_cross/freeciv-qt.cmd			\
 		installer_cross/freeciv-mp-qt.cmd		\
 		installer_cross/freeciv-sdl2.cmd		\
diff --git a/platforms/windows/installer_cross/freeciv-gtk4x.cmd b/platforms/windows/installer_cross/freeciv-gtk4x.cmd
deleted file mode 100755
index d1fad55fa9..0000000000
--- a/platforms/windows/installer_cross/freeciv-gtk4x.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-if not "%1" == "auto" set LANG=%1
-start "%~n0" /D . "%~dp0\freeciv-gtk4x.exe" %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/platforms/windows/installer_cross/freeciv-mp-gtk4x.cmd b/platforms/windows/installer_cross/freeciv-mp-gtk4x.cmd
deleted file mode 100755
index ce1aeee6a8..0000000000
--- a/platforms/windows/installer_cross/freeciv-mp-gtk4x.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-if not "%1" == "auto" set LANG=%1
-start "%~n0" /D . "%~dp0\freeciv-mp-gtk4x.exe" %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/platforms/windows/installer_cross/meson-build_all_installers.sh b/platforms/windows/installer_cross/meson-build_all_installers.sh
index 4f5770c8c3..f5a733eee0 100755
--- a/platforms/windows/installer_cross/meson-build_all_installers.sh
+++ b/platforms/windows/installer_cross/meson-build_all_installers.sh
@@ -67,15 +67,6 @@ else
   GTK4="Success"
 fi
 
-if test "${CROSSER_GTK4}" != "yes" ; then
-  GTK4x="N/A"
-elif ! ./meson-installer_build.sh "${DLLSPATH}" gtk4x ; then
-  RET=1
-  GTK4x="Fail"
-else
-  GTK4x="Success"
-fi
-
 if test "${CROSSER_QT6}" != "yes" ; then
   QT6="N/A"
 elif ! ./meson-installer_build.sh "${DLLSPATH}" qt6 ; then
@@ -115,7 +106,6 @@ fi
 
 echo "Gtk3.22: ${GTK322}"
 echo "Gtk4:    ${GTK4}"
-echo "Gtk4x:   ${GTK4x}"
 echo "Qt6:     ${QT6}"
 echo "Qt6x:    ${QT7}"
 echo "Sdl2:    ${SDL2}"
diff --git a/platforms/windows/installer_cross/meson-installer_build.sh b/platforms/windows/installer_cross/meson-installer_build.sh
index dd433aa0ba..83285fb19f 100755
--- a/platforms/windows/installer_cross/meson-installer_build.sh
+++ b/platforms/windows/installer_cross/meson-installer_build.sh
@@ -135,10 +135,6 @@ case "${GUI}" in
     GUINAME="GTK4"
     MPGUI="gtk4"
     FCMP="gtk4" ;;
-  gtk4x)
-    GUINAME="GTK4x"
-    MPGUI="gtk4x"
-    FCMP="gtk4x" ;;
   sdl2)
     GUINAME="SDL2"
     FCMP="gtk4" ;;
@@ -260,7 +256,7 @@ else
         exit 1
       fi
       ;;
-    gtk4|gtk4x)
+    gtk4)
       if ! add_gtk4_env "${DLLSPATH}" "${INSTDIR}" ; then
         echo "Copying gtk4 environment failed!" >&2
         exit 1
@@ -301,7 +297,7 @@ else
   fi
 
   if test "$GUI" = "gtk3.22" || test "$GUI" = "gtk4" ||
-     test "$GUI" = "gtk4x" || test "$GUI" = "sdl2" ; then
+     test "$GUI" = "sdl2" ; then
     UNINSTALLER="helpers/uninstaller-helper-gtk3.sh"
   else
     UNINSTALLER=""
diff --git a/platforms/windows/installer_cross/meson-winbuild.sh b/platforms/windows/installer_cross/meson-winbuild.sh
index d3b49e3aa5..ac9d2f7478 100755
--- a/platforms/windows/installer_cross/meson-winbuild.sh
+++ b/platforms/windows/installer_cross/meson-winbuild.sh
@@ -23,8 +23,8 @@ fi
 
 GUI="$2"
 
-if test "${GUI}" != "gtk3.22" && test "${GUI}" != "gtk4" &&
-   test "${GUI}" != "gtk4x" &&
+if test "${GUI}" != "gtk3.22" &&
+   test "${GUI}" != "gtk4" &&
    test "${GUI}" != "sdl2" &&
    test "${GUI}" != "qt6" &&
    test "${GUI}" != "qt6x" &&
@@ -84,7 +84,6 @@ TOOLS=manual,ruleup
 case "${GUI}" in
   gtk3.22) FCMP="gtk3" ;;
   gtk4) FCMP="gtk4" ;;
-  gtk4x) FCMP="gtk4x" ;;
   sdl2) FCMP="gtk4" ;;
   qt6) CLIENT="qt"
        FCMP="qt"
diff --git a/platforms/windows/installer_msys2/Makefile.meson b/platforms/windows/installer_msys2/Makefile.meson
index 02e2e61708..5e5cca55b4 100644
--- a/platforms/windows/installer_msys2/Makefile.meson
+++ b/platforms/windows/installer_msys2/Makefile.meson
@@ -76,9 +76,9 @@ all: all-$(WINARCH)
 
 all-win64: gtk3.22-installer sdl2-installer qt5-installer ruledit-installer-qt5
 
-all-win64-10: gtk3.22-installer sdl2-installer sdl3-installer gtk4-installer qt6-installer ruledit-installer-qt6 qt6x-installer gtk4x-installer
+all-win64-10: gtk3.22-installer sdl2-installer sdl3-installer gtk4-installer qt6-installer ruledit-installer-qt6 qt6x-installer
 
-all-win64+: gtk3.22-installer sdl2-installer sdl3-installer gtk4-installer qt6-installer ruledit-installer-qt6 qt6x-installer gtk4x-installer
+all-win64+: gtk3.22-installer sdl2-installer sdl3-installer gtk4-installer qt6-installer ruledit-installer-qt6 qt6x-installer
 
 release:
 	make -f $(MAKEFILE_NAME) EXTRA_CONFIG="-Dbuildtype=release -Doptimization=3 $(EXTRA_CONFIG)" all
@@ -96,9 +96,6 @@ gtk3.22-installer:
 gtk4-installer:
 	make -f $(MAKEFILE_NAME) GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 installer-common
 
-gtk4x-installer:
-	make -f $(MAKEFILE_NAME) GUI=gtk4x CLIENT=gtk4x FCMP=gtk4x installer-common
-
 sdl2-installer:
 	make -f $(MAKEFILE_NAME) GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 installer-common
 
@@ -129,9 +126,6 @@ gtk3.22-install:
 gtk4-install:
 	make -f $(MAKEFILE_NAME) GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 install-freeciv-gtk4
 
-gtk4x-install:
-	make -f $(MAKEFILE_NAME) GUI=gtk4x CLIENT=gtk4x FCMP=gtk4x install-freeciv-gtk4x
-
 sdl2-install:
 	make -f $(MAKEFILE_NAME) GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 install-freeciv-sdl2
 
@@ -345,8 +339,6 @@ install-freeciv-gtk3.22: install-freeciv-common
 
 install-freeciv-gtk4: install-freeciv-common
 
-install-freeciv-gtk4x: install-freeciv-common
-
 install-freeciv-sdl2: install-freeciv-common
 
 install-freeciv-qt5: install-freeciv-common
@@ -363,9 +355,6 @@ install-env-gtk3.22: install-env-gtk3-fcmp
 install-env-gtk4: install-env-gtk4-fcmp
 	cp -R $(addprefix $(DLLPATH_PREFIX), $(SOUND_DLLS_SDL2)) $(INST_DIR)/$(WINARCH)-client-$(GUI)/
 
-install-env-gtk4x: install-env-gtk4-fcmp
-	cp -R $(addprefix $(DLLPATH_PREFIX), $(SOUND_DLLS_SDL2)) $(INST_DIR)/$(WINARCH)-client-$(GUI)/
-
 SDL2_DLLS := \
 	SDL2_ttf.dll \
 	libSDL2_gfx-1-0-0.dll \
@@ -527,7 +516,6 @@ clean-ruledit-common:
 clean:
 	make -f $(MAKEFILE_NAME) GUI=gtk3.22 clean-build-client clean-install-client clean-installer-common
 	make -f $(MAKEFILE_NAME) GUI=gtk4 clean-build-client clean-install-client clean-installer-common
-	make -f $(MAKEFILE_NAME) GUI=gtk4x clean-build-client clean-install-client clean-installer-common
 	make -f $(MAKEFILE_NAME) GUI=sdl2 clean-build-client clean-install-client clean-installer-common
 	make -f $(MAKEFILE_NAME) GUI=sdl3 clean-build-client clean-install-client clean-installer-common
 	make -f $(MAKEFILE_NAME) GUI=qt5 clean-build-client clean-install-client clean-installer-common
diff --git a/platforms/windows/installer_msys2/create-freeciv-gtk4x-nsi.sh b/platforms/windows/installer_msys2/create-freeciv-gtk4x-nsi.sh
deleted file mode 100644
index d1b023d755..0000000000
--- a/platforms/windows/installer_msys2/create-freeciv-gtk4x-nsi.sh
+++ /dev/null
@@ -1,5 +0,0 @@
-#!/bin/sh
-
-# ./create-freeciv-gtk4x-nsi.sh <freeciv files dir> <output dir> <version> <win32|win64|win>
-
-./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "gtk4x" "GTK4x" "$4" "gtk4x"
diff --git a/platforms/windows/installer_msys2/freeciv-gtk4x.cmd b/platforms/windows/installer_msys2/freeciv-gtk4x.cmd
deleted file mode 100644
index d1fad55fa9..0000000000
--- a/platforms/windows/installer_msys2/freeciv-gtk4x.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-if not "%1" == "auto" set LANG=%1
-start "%~n0" /D . "%~dp0\freeciv-gtk4x.exe" %2 %3 %4 %5 %6 %7 %8 %9
diff --git a/platforms/windows/installer_msys2/freeciv-mp-gtk4x.cmd b/platforms/windows/installer_msys2/freeciv-mp-gtk4x.cmd
deleted file mode 100644
index ce1aeee6a8..0000000000
--- a/platforms/windows/installer_msys2/freeciv-mp-gtk4x.cmd
+++ /dev/null
@@ -1,3 +0,0 @@
-@echo off
-if not "%1" == "auto" set LANG=%1
-start "%~n0" /D . "%~dp0\freeciv-mp-gtk4x.exe" %2 %3 %4 %5 %6 %7 %8 %9
-- 
2.50.1

