From 6228111aa58e3dded2609b3465f230345363edcf Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sun, 19 Jun 2022 21:59:54 +0300 Subject: [PATCH 43/43] Msys2 Makefile: Add ucrt64 support See osdn #44827 Signed-off-by: Marko Lindqvist --- windows/Makefile.am | 1 - windows/installer_msys2/Makefile | 22 +++++++++++++--------- windows/installer_msys2/win_arch.sh | 11 ----------- 3 files changed, 13 insertions(+), 21 deletions(-) delete mode 100755 windows/installer_msys2/win_arch.sh diff --git a/windows/Makefile.am b/windows/Makefile.am index f708a208f7..2d0ac331b0 100644 --- a/windows/Makefile.am +++ b/windows/Makefile.am @@ -27,7 +27,6 @@ dist_noinst_DATA = \ installer_msys2/Freeciv.url \ installer_msys2/Makefile \ installer_msys2/cleanup_checkout.sh \ - installer_msys2/win_arch.sh \ installer_cross/create-freeciv-gtk-qt-nsi.sh \ installer_cross/create-freeciv-sdl2-nsi.sh \ installer_cross/create-freeciv-ruledit-nsi.sh \ diff --git a/windows/installer_msys2/Makefile b/windows/installer_msys2/Makefile index febe906c0d..41365d18b9 100644 --- a/windows/installer_msys2/Makefile +++ b/windows/installer_msys2/Makefile @@ -8,18 +8,23 @@ # Variable setup # -WINARCH=$(shell ./win_arch.sh) - -ifeq ($(WINARCH),win64) +ifeq ($(MSYSTEM),MINGW64) +WINARCH=win64 ARCHDIR=mingw64 LIBGCCDLL=libgcc_s_seh-1.dll -GCCDLL=gcc_s-seh-1.dll CRYPTOLIB_SUFFIX=-x64 -else +else ifeq ($(MSYSTEM),MINGW32) +WINARCH=win32 ARCHDIR=mingw32 LIBGCCDLL=libgcc_s_dw2-1.dll -GCCDLL=gcc_s-1.dll CRYPTOLIB_SUFFIX= +else ifeq ($(MSYSTEM),UCRT64) +WINARCH=win64-10 +ARCHDIR=ucrt64 +CRYPTOLIB_SUFFIX=-x64 +LIBGCCDLL=libgcc_s_seh-1.dll +else +error "Unsupported MSYSTEM environment" endif ifeq ($(MIN_WIN_VER),) @@ -59,6 +64,8 @@ all-win64: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6- all-win32: gtk3.22-installer sdl2-installer ruledit-installer-qt5 qt5-installer +all-win64-10: gtk3.22-installer sdl2-installer ruledit-installer qt5-installer qt6-installer + gtk3.22-installer: make GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 @@ -85,9 +92,6 @@ ruledit-installer-qt6: # of escapes, needed for snapshot builds. make EXTRA_CONFIG="$(EXTRA_CONFIG)" MOCCMD="$(QT6_MOCCMD)" wrap-ruledit-qt6 -# Autogen.sh here will make ./win_arch.sh to work. -# The $(WINARCH) value we got for this run is not good. The new run -# launched from this target will pick correct value. snapshot: cd ../.. ; ./autogen.sh --no-configure-run make VERSION_REVTYPE="git" EXTRA_CONFIG="--enable-gitrev --with-project-definition=../../../bootstrap/snapshot.project CFLAGS=\\\"-Werror $$CFLAGS\\\" CXXFLAGS=\\\"$$CXXFLAGS\\\"" all diff --git a/windows/installer_msys2/win_arch.sh b/windows/installer_msys2/win_arch.sh deleted file mode 100755 index 40d6ab6434..0000000000 --- a/windows/installer_msys2/win_arch.sh +++ /dev/null @@ -1,11 +0,0 @@ -#!/bin/sh - -if ! test -f ../../bootstrap/config.guess ; then - echo "win" -else - case $(../../bootstrap/config.guess 2>/dev/null) in - *mingw32*) echo "win32" ;; - *mingw64*) echo "win64" ;; - *) echo "win" ;; - esac -fi -- 2.35.1