From 529ee75572f53191d43ec738cc46ade2e165a31f Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Fri, 4 Jun 2021 03:42:15 +0300 Subject: [PATCH 47/47] Msys2 Makefile: Rename Qt targets specifically Qt5 ones See osdn #42427 Signed-off-by: Marko Lindqvist --- windows/installer_msys2/Makefile | 110 ++++++++++++++++--------------- 1 file changed, 57 insertions(+), 53 deletions(-) diff --git a/windows/installer_msys2/Makefile b/windows/installer_msys2/Makefile index e9f54e4d27..b6c17a4e0a 100644 --- a/windows/installer_msys2/Makefile +++ b/windows/installer_msys2/Makefile @@ -43,18 +43,22 @@ DLLPATH_PREFIX=/$(ARCHDIR)/bin/ all: gtk3.22-installer sdl2-installer ruledit-installer qt-installer gtk3.22-installer: - make GUI=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 + make GUI=gtk3.22 CLIENT=gtk3.22 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-gtk3.22 sdl2-installer: - make GUI=sdl2 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-sdl2 + make GUI=sdl2 CLIENT=sdl2 FCMP=gtk3 EXTRA_CONFIG="--disable-ruledit $(EXTRA_CONFIG)" wrap-sdl2 -qt-installer: - make GUI=qt FCMP=qt EXTRA_CONFIG="--with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt +qt-installer: qt5-installer -ruledit-installer: +qt5-installer: + make GUI=qt5 CLIENT=qt FCMP=qt EXTRA_CONFIG="--with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG)" wrap-qt5 + +ruledit-installer: ruledit-installer-qt5 + +ruledit-installer-qt5: # EXTRA_CONFIG="$(EXTRA_CONFIG)" *does* make a difference - it unwraps one layer # of escapes, needed for snapshot builds. - make EXTRA_CONFIG="$(EXTRA_CONFIG)" wrap-ruledit + make EXTRA_CONFIG="$(EXTRA_CONFIG)" wrap-ruledit-qt5 # Autogen.sh here will make ./win_arch.sh to work. # The $(WINARCH) value we got for this run is not good. The new run @@ -73,13 +77,13 @@ configure-freeciv-common: # create build directory mkdir -p build-$(WINARCH)-$(GUI) # configure - cd build-$(WINARCH)-$(GUI); ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --enable-client=$(GUI) --with-followtag="windows-S3_1" --with-tinycthread --without-readline --disable-sys-lua --enable-fcdb=sqlite3 --with-sqlite3-prefix=/$(ARCHDIR) --enable-fcmp=$(FCMP) --with-cacert-path="./ssl/certs/ca-bundle.crt" $(EXTRA_CONFIG) + cd build-$(WINARCH)-$(GUI); ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --enable-client=$(CLIENT) --with-followtag="windows-S3_1" --with-tinycthread --without-readline --disable-sys-lua --enable-fcdb=sqlite3 --with-sqlite3-prefix=/$(ARCHDIR) --enable-fcmp=$(FCMP) --with-cacert-path="./ssl/certs/ca-bundle.crt" $(EXTRA_CONFIG) -configure-freeciv-ruledit: +configure-freeciv-ruledit-qt5: # create build directory - mkdir -p build-$(WINARCH)-ruledit + mkdir -p build-$(WINARCH)-ruledit-qt5 # configure - cd build-$(WINARCH)-ruledit; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) + cd build-$(WINARCH)-ruledit-qt5; ../../../configure FREECIV_LABEL_FORCE="-msys2" CPPFLAGS="-D_WIN32_WINNT=$(MIN_WIN_VER)" --disable-client --disable-server --disable-fcmp --disable-freeciv-manual --disable-sys-lua --enable-ruledit --enable-ai-static=stub --with-cacert-path="./ssl/certs/ca-bundle.crt" --with-qt5-includes=/$(ARCHDIR)/include --with-qt5-libs=/$(ARCHDIR)/lib $(EXTRA_CONFIG) # install Freeciv @@ -105,41 +109,41 @@ install-freeciv-common: configure-freeciv-common # strip 'freeciv-manual' and 'freeciv-mp-' executables strip install-$(WINARCH)-$(GUI)/freeciv-m* # add start menu files - cp freeciv-server.cmd freeciv-mp-$(FCMP).cmd freeciv-$(GUI).cmd Freeciv.url install-$(WINARCH)-$(GUI)/ + cp freeciv-server.cmd freeciv-mp-$(FCMP).cmd freeciv-$(CLIENT).cmd Freeciv.url install-$(WINARCH)-$(GUI)/ install-freeciv-gtk3.22: install-freeciv-common install-freeciv-sdl2: install-freeciv-common -install-freeciv-qt: install-freeciv-common +install-freeciv-qt5: install-freeciv-common # strip 'freeciv-ruledit' executable strip install-$(WINARCH)-$(GUI)/freeciv-ruledit.exe cp freeciv-ruledit.cmd install-$(WINARCH)-$(GUI)/ -install-ruledit-dir: - mkdir -p install-$(WINARCH)-ruledit/share +install-ruledit-dir-qt5: + mkdir -p install-$(WINARCH)-ruledit-qt5/share -install-ruledit: configure-freeciv-ruledit install-ruledit-dir +install-ruledit-qt5: configure-freeciv-ruledit-qt5 install-ruledit-dir-qt5 # make langstat files - make -C build-$(WINARCH)-ruledit/translations/ruledit update-po - make -C build-$(WINARCH)-ruledit/bootstrap langstat_ruledit.txt + make -C build-$(WINARCH)-ruledit-qt5/translations/ruledit update-po + make -C build-$(WINARCH)-ruledit-qt5/bootstrap langstat_ruledit.txt # make install - make -C build-$(WINARCH)-ruledit DESTDIR=`pwd`/install-$(WINARCH)-ruledit/ $(MAKE_PARAMS) install + make -C build-$(WINARCH)-ruledit-qt5 DESTDIR=`pwd`/install-$(WINARCH)-ruledit-qt5/ $(MAKE_PARAMS) install # reorder directory layout - mv install-$(WINARCH)-ruledit/$(INSTSUB)/bin/* install-$(WINARCH)-ruledit/ - mv install-$(WINARCH)-ruledit/$(INSTSUB)/share/freeciv install-$(WINARCH)-ruledit/data - mv install-$(WINARCH)-ruledit/$(INSTSUB)/share/locale install-$(WINARCH)-ruledit/share/ - mv install-$(WINARCH)-ruledit/$(INSTSUB)/share/doc install-$(WINARCH)-ruledit/doc - mkdir -p install-$(WINARCH)-ruledit/debuginfo - cp build-$(WINARCH)-ruledit/gen_headers/fc_config.h install-$(WINARCH)-ruledit/debuginfo - mkdir -p install-$(WINARCH)-ruledit/doc/freeciv/installer - cp licenses/COPYING.installer install-$(WINARCH)-ruledit/doc/freeciv/installer/ + mv install-$(WINARCH)-ruledit-qt5/$(INSTSUB)/bin/* install-$(WINARCH)-ruledit-qt5/ + mv install-$(WINARCH)-ruledit-qt5/$(INSTSUB)/share/freeciv install-$(WINARCH)-ruledit-qt5/data + mv install-$(WINARCH)-ruledit-qt5/$(INSTSUB)/share/locale install-$(WINARCH)-ruledit-qt5/share/ + mv install-$(WINARCH)-ruledit-qt5/$(INSTSUB)/share/doc install-$(WINARCH)-ruledit-qt5/doc + mkdir -p install-$(WINARCH)-ruledit-qt5/debuginfo + cp build-$(WINARCH)-ruledit-qt5/gen_headers/fc_config.h install-$(WINARCH)-ruledit-qt5/debuginfo + mkdir -p install-$(WINARCH)-ruledit-qt5/doc/freeciv/installer + cp licenses/COPYING.installer install-$(WINARCH)-ruledit-qt5/doc/freeciv/installer/ # delete unneeded files - rm -r install-$(WINARCH)-ruledit/$(INSTSUB) + rm -r install-$(WINARCH)-ruledit-qt5/$(INSTSUB) # strip 'freeciv-ruledit' executable - strip install-$(WINARCH)-ruledit/freeciv-ruledit.exe + strip install-$(WINARCH)-ruledit-qt5/freeciv-ruledit.exe # add start menu files - cp freeciv-ruledit.cmd Freeciv.url install-$(WINARCH)-ruledit/ + cp freeciv-ruledit.cmd Freeciv.url install-$(WINARCH)-ruledit-qt5/ # install Freeciv environment @@ -276,7 +280,7 @@ install-env-sdl2: install-env-default-fcmp # add DLLs cp -R $(addprefix $(DLLPATH_PREFIX), $(SDL2_DLLS)) install-$(WINARCH)-$(GUI)/ -QT_DLLS := \ +QT5_DLLS := \ libicuin68.dll \ libicuuc68.dll \ libicudt68.dll \ @@ -295,15 +299,15 @@ QT_DLLS := \ libdouble-conversion.dll \ libzstd.dll -install-env-qt: install-env-common +install-env-qt5: install-env-common # add DLLs - cp -R $(addprefix $(DLLPATH_PREFIX), $(QT_DLLS)) install-$(WINARCH)-$(GUI)/ - # add additional Qt files + cp -R $(addprefix $(DLLPATH_PREFIX), $(QT5_DLLS)) install-$(WINARCH)-$(GUI)/ + # add additional Qt5 files cp -R /$(ARCHDIR)/share/qt5/plugins install-$(WINARCH)-$(GUI)/ cp -R /$(ARCHDIR)/share/locale install-$(WINARCH)-$(GUI)/share/ find install-$(WINARCH)-$(GUI)/share/locale -type f -not -name "freeciv*.mo" -delete -RULEDIT_DLLS := \ +RULEDIT_QT5_DLLS := \ libstdc++-6.dll \ libcrypto-1_1${CRYPTOLIB_SUFFIX}.dll \ libpsl-5.dll \ @@ -352,14 +356,14 @@ RULEDIT_DLLS := \ libexpat-1.dll \ libfribidi-0.dll -install-env-ruledit: +install-env-ruledit-qt5: # add DLLs - cp -R $(addprefix $(DLLPATH_PREFIX), $(RULEDIT_DLLS)) install-$(WINARCH)-ruledit/ - cp -R $(addprefix $(DLLPATH_PREFIX), $(QT_DLLS)) install-$(WINARCH)-ruledit/ + cp -R $(addprefix $(DLLPATH_PREFIX), $(RULEDIT_QT5_DLLS)) install-$(WINARCH)-ruledit-qt5/ + cp -R $(addprefix $(DLLPATH_PREFIX), $(QT5_DLLS)) install-$(WINARCH)-ruledit-qt5/ # add additional Qt files - cp -R /$(ARCHDIR)/share/qt5/plugins install-$(WINARCH)-ruledit/ - cp -R /usr/share/locale install-$(WINARCH)-ruledit/share/ - find install-$(WINARCH)-ruledit/share/locale -type f -not -name "freeciv-ruledit.mo" -delete + cp -R /$(ARCHDIR)/share/qt5/plugins install-$(WINARCH)-ruledit-qt5/ + cp -R /usr/share/locale install-$(WINARCH)-ruledit-qt5/share/ + find install-$(WINARCH)-ruledit-qt5/share/locale -type f -not -name "freeciv-ruledit.mo" -delete # build installer @@ -367,27 +371,27 @@ installer-common: clean-install-common install-freeciv-$(GUI) install-env-$(GUI) # extract Freeciv version $(eval FREECIV_VERSION := $(shell ../../fc_version)) # create NSIS script - ./create-freeciv-$(GUI)-nsi.sh install-$(WINARCH)-$(GUI) $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi + ./create-freeciv-$(CLIENT)-nsi.sh install-$(WINARCH)-$(GUI) $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi # create installer executable mkdir -p Output makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi -installer-ruledit: clean-install-ruledit install-ruledit install-env-ruledit +installer-ruledit-qt5: clean-install-ruledit-qt5 install-ruledit-qt5 install-env-ruledit-qt5 # extract Freeciv version $(eval FREECIV_VERSION := $(shell ../../fc_version)) # create NSIS script - ./create-freeciv-ruledit-nsi.sh install-$(WINARCH)-ruledit $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit.nsi + ./create-freeciv-ruledit-nsi.sh install-$(WINARCH)-ruledit-qt5 $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt5.nsi # create installer executable mkdir -p Output - makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit.nsi + makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt5.nsi wrap-gtk3.22: installer-common wrap-sdl2: installer-common -wrap-qt: installer-common +wrap-qt5: installer-common -wrap-ruledit: installer-ruledit +wrap-ruledit-qt5: installer-ruledit-qt5 # cleanup @@ -395,27 +399,27 @@ wrap-ruledit: installer-ruledit clean-build-common: rm -rf build-*-$(GUI) -clean-build-ruledit: - rm -rf build-*-ruledit +clean-build-ruledit-qt5: + rm -rf build-*-ruledit-qt5 clean-install-common: rm -rf install-*-$(GUI) ./cleanup_checkout.sh ../.. -clean-install-ruledit: - rm -rf install-*-ruledit +clean-install-ruledit-qt5: + rm -rf install-*-ruledit-qt5 ./cleanup_checkout.sh ../.. clean-installer-common: rm -f Output/Freeciv-*-$(GUI)-setup.exe rm -f Freeciv-*-$(GUI).nsi -clean-installer-ruledit: +clean-installer-ruledit-qt5: rm -f Output/Freeciv-ruledit-*-setup.exe - rm -f Freeciv-*-ruledit.nsi + rm -f Freeciv-*-ruledit-qt5.nsi clean: make GUI=gtk3.22 clean-build-common clean-install-common clean-installer-common make GUI=sdl2 clean-build-common clean-install-common clean-installer-common make GUI=qt clean-build-common clean-install-common clean-installer-common - make clean-build-ruledit clean-install-ruledit clean-installer-ruledit + make clean-build-ruledit-qt5 clean-install-ruledit-qt5 clean-installer-ruledit-qt5 -- 2.30.2