From 04949a4d0b16963ffc38674cb6dd4dabe06c5330 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 7 Aug 2022 01:02:48 +0300 Subject: [PATCH 22/26] Msys2: Add autotools gtk4-client installer See osdn #45320 Signed-off-by: Marko Lindqvist --- doc/README.msys2 | 12 ++++--- windows/Makefile.am | 2 ++ windows/installer_msys2/Makefile | 32 ++++++++++++------- .../create-freeciv-gtk4-nsi.sh | 5 +++ windows/installer_msys2/freeciv-gtk4.cmd | 3 ++ 5 files changed, 39 insertions(+), 15 deletions(-) create mode 100644 windows/installer_msys2/create-freeciv-gtk4-nsi.sh create mode 100644 windows/installer_msys2/freeciv-gtk4.cmd diff --git a/doc/README.msys2 b/doc/README.msys2 index 13f0959b80..978d51b189 100644 --- a/doc/README.msys2 +++ b/doc/README.msys2 @@ -9,7 +9,7 @@ using MSYS2 from https://www.msys2.org/ Status ==================================== -- Buildable clients are gtk3, gtk3.22, sdl2, and Qt5 for +- Buildable clients are gtk3, gtk3.22, gtk4, sdl2, and Qt5 for both win64 and win32 targets. For win64 target, one can build also Qt6-client. @@ -83,13 +83,16 @@ using MSYS2 from https://www.msys2.org/ 2.1.2.2) Arch-specific packages for building gtk3-client - mingw-w64-i686-gtk3 / mingw-w64-x86_64-gtk3 -2.1.2.3) Arch-specific packages for buildind Qt5-client and/or Qt5 Ruledit +2.1.2.3) Arch-specific packages for building gtk4-client + - mingw-w64-i686-gtk4 / mingw-w64-x86_64-gtk4 + +2.1.2.4) Arch-specific packages for buildind Qt5-client and/or Qt5 Ruledit - mingw-w64-i686-qt5 / mingw-w64-x86_64-qt5 -2.1.2.4) Arch-specific packages for building Qt6-client and/or Qt6 Ruledit +2.1.2.5) Arch-specific packages for building Qt6-client and/or Qt6 Ruledit - mingw-w64-x86_64-qt6-base -2.1.2.5) Arch-specific packages for building sdl2-client +2.1.2.6) Arch-specific packages for building sdl2-client - mingw-w64-i686-SDL2_image / mingw-w64-x86_64-SDL2_image - mingw-w64-i686-SDL2_ttf / mingw-w64-x86_64-SDL2_ttf - mingw-w64-i686-SDL2_gfx / mingw-w64-x86_64-SDL2_gfx @@ -174,6 +177,7 @@ Get the freeciv sources there somehow. Some options are: - "all" (default), build all installers - "-installer", where is - gtk3.22 + - gtk4 - sdl2 - qt5 - qt6 diff --git a/windows/Makefile.am b/windows/Makefile.am index 2d0ac331b0..46e9ebe945 100644 --- a/windows/Makefile.am +++ b/windows/Makefile.am @@ -12,11 +12,13 @@ dist_noinst_DATA = \ installer_msys2/licenses/header.txt \ 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-qt5-nsi.sh \ installer_msys2/create-freeciv-qt6-nsi.sh \ installer_msys2/create-freeciv-sdl2-nsi.sh \ installer_msys2/create-freeciv-ruledit-nsi.sh \ installer_msys2/freeciv-gtk3.22.cmd \ + installer_msys2/freeciv-gtk4.cmd \ installer_msys2/freeciv-mp-gtk3.cmd \ installer_msys2/freeciv-mp-gtk4.cmd \ installer_msys2/freeciv-mp-qt.cmd \ diff --git a/windows/installer_msys2/Makefile b/windows/installer_msys2/Makefile index 5d3e4f23e3..7ea22c1052 100644 --- a/windows/installer_msys2/Makefile +++ b/windows/installer_msys2/Makefile @@ -60,15 +60,18 @@ endif # by default build all installers. all: all-$(WINARCH) -all-win64: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6-installer +all-win64: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6-installer gtk4-installer -all-win32: gtk3.22-installer sdl2-installer ruledit-installer-qt5 qt5-installer +all-win32: gtk3.22-installer sdl2-installer ruledit-installer-qt5 qt5-installer gtk4-installer -all-win64-10: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6-installer +all-win64-10: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6-installer gtk4-installer gtk3.22-installer: make GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 +gtk4-installer: + make GUI=gtk4 CLIENT=gtk4 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk4 + sdl2-installer: make GUI=sdl2 CLIENT=sdl2 FCMP=gtk4 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-sdl2 @@ -151,6 +154,8 @@ install-freeciv-common: configure-freeciv-common install-freeciv-gtk3.22: install-freeciv-common +install-freeciv-gtk4: install-freeciv-common + install-freeciv-sdl2: install-freeciv-common install-freeciv-qt5: install-freeciv-common @@ -346,7 +351,13 @@ GTK4_FCMP_DLLS := \ libthai-0.dll \ liblzo2-2.dll \ libgraphite2.dll \ - libdatrie-1.dll + libdatrie-1.dll \ + libtiff-5.dll \ + libjpeg-8.dll \ + libLerc.dll \ + libwebp-7.dll \ + libdeflate.dll \ + libjbig-0.dll install-env-gtk4-fcmp: install-env-common cp -R $(addprefix $(DLLPATH_PREFIX), $(GTK4_FCMP_DLLS)) install-$(WINARCH)-$(GUI)/ @@ -357,17 +368,13 @@ install-env-gtk4-fcmp: install-env-common cp -R /$(ARCHDIR)/share/locale install-$(WINARCH)-$(GUI)/share/ find install-$(WINARCH)-$(GUI)/share/locale -type f -not -name "freeciv-*.mo" -and -not -name gtk40.mo -delete +install-env-gtk4: install-env-gtk4-fcmp + SDL2_DLLS := \ libSDL2_gfx-1-0-0.dll \ SDL2_image.dll \ SDL2_ttf.dll \ - libjpeg-8.dll \ - libtiff-5.dll \ - libwebp-7.dll \ - libzstd.dll \ - libdeflate.dll \ - libjbig-0.dll \ - libLerc.dll + libzstd.dll install-env-sdl2: install-env-gtk4-fcmp # add DLLs @@ -576,6 +583,8 @@ installer-ruledit-qt6: clean-install-ruledit-qt6 install-ruledit-qt6 install-env wrap-gtk3.22: installer-common +wrap-gtk4: installer-common + wrap-sdl2: installer-common wrap-qt5: installer-common @@ -623,6 +632,7 @@ clean-installer-ruledit-qt6: clean: make GUI=gtk3.22 CLIENT=gtk3.22 clean-build-common clean-install-common clean-installer-common + make GUI=gtk4 CLIENT=gtk4 clean-build-common clean-install-common clean-installer-common make GUI=sdl2 CLIENT=sdl2 clean-build-common clean-install-common clean-installer-common make GUI=qt5 CLIENT=qt clean-build-common clean-install-common clean-installer-common make GUI=qt6 CLIENT=qt clean-build-common clean-install-common clean-installer-common diff --git a/windows/installer_msys2/create-freeciv-gtk4-nsi.sh b/windows/installer_msys2/create-freeciv-gtk4-nsi.sh new file mode 100644 index 0000000000..95a6694d89 --- /dev/null +++ b/windows/installer_msys2/create-freeciv-gtk4-nsi.sh @@ -0,0 +1,5 @@ +#!/bin/sh + +# ./create-freeciv-gtk4-nsi.sh + +./create-freeciv-gtk-qt-nsi.sh $1 $2 "gtk4" "GTK4" $3 "gtk4" diff --git a/windows/installer_msys2/freeciv-gtk4.cmd b/windows/installer_msys2/freeciv-gtk4.cmd new file mode 100644 index 0000000000..82f0d3358c --- /dev/null +++ b/windows/installer_msys2/freeciv-gtk4.cmd @@ -0,0 +1,3 @@ +@echo off +if not "%1" == "auto" set LANG=%1 +start "%~n0" /D . "%~dp0\freeciv-gtk4.exe" %2 %3 %4 %5 %6 %7 %8 %9 -- 2.35.1