From 309f1fe4a70b090be622f473a245a6ebefef82eb Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 31 Dec 2022 17:29:11 +0200 Subject: [PATCH 41/41] Msys2: Produce autotools and meson builds to separate Output directories See osdn #46403 Signed-off-by: Marko Lindqvist --- windows/installer_msys2/Makefile.autotools | 19 ++++++++------- windows/installer_msys2/Makefile.meson | 13 +++++----- .../create-freeciv-gtk-qt-nsi.sh | 24 +++++++++---------- .../create-freeciv-gtk3.22-nsi.sh | 4 ++-- .../create-freeciv-gtk4-nsi.sh | 4 ++-- .../installer_msys2/create-freeciv-qt5-nsi.sh | 4 ++-- .../installer_msys2/create-freeciv-qt6-nsi.sh | 4 ++-- .../create-freeciv-ruledit-nsi.sh | 8 +++---- .../create-freeciv-sdl2-nsi.sh | 8 +++---- 9 files changed, 45 insertions(+), 43 deletions(-) diff --git a/windows/installer_msys2/Makefile.autotools b/windows/installer_msys2/Makefile.autotools index b1478565cf..c112443f81 100644 --- a/windows/installer_msys2/Makefile.autotools +++ b/windows/installer_msys2/Makefile.autotools @@ -9,6 +9,7 @@ # MAKEFILE_NAME=Makefile.autotools +OUT_DIR=autotools/Output ifeq ($(MSYSTEM),MINGW64) WINARCH=win64 @@ -580,27 +581,27 @@ installer-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-$(GUI)-nsi.sh install-$(WINARCH)-$(GUI) $(OUT_DIR) $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi # create installer executable - mkdir -p Output + mkdir -p $(OUT_DIR) makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi 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-qt5 $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt5.nsi + ./create-freeciv-ruledit-nsi.sh install-$(WINARCH)-ruledit-qt5 $(OUT_DIR) $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt5.nsi # create installer executable - mkdir -p Output + mkdir -p $(OUT_DIR) makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt5.nsi installer-ruledit-qt6: clean-install-ruledit-qt6 install-ruledit-qt6 install-env-ruledit-qt6 # extract Freeciv version $(eval FREECIV_VERSION := $(shell ../../fc_version)) # create NSIS script - ./create-freeciv-ruledit-nsi.sh install-$(WINARCH)-ruledit-qt6 $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt6.nsi + ./create-freeciv-ruledit-nsi.sh install-$(WINARCH)-ruledit-qt6 $(OUT_DIR) $(FREECIV_VERSION) $(WINARCH) > Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt6.nsi # create installer executable - mkdir -p Output + mkdir -p $(OUT_DIR) makensis Freeciv-$(WINARCH)-$(FREECIV_VERSION)-ruledit-qt6.nsi wrap-gtk3.22: installer-common @@ -641,15 +642,15 @@ clean-install-ruledit-qt6: ./cleanup_checkout.sh ../.. clean-installer-common: - rm -f Output/Freeciv-*-$(GUI)-setup.exe + rm -f $(OUT_DIR)/Freeciv-*-$(GUI)-setup.exe rm -f Freeciv-*-$(GUI).nsi clean-installer-ruledit-qt5: - rm -f Output/Freeciv-ruledit-*-setup.exe + rm -f $(OUT_DIR)/Freeciv-ruledit-*-setup.exe rm -f Freeciv-*-ruledit-qt5.nsi clean-installer-ruledit-qt6: - rm -f Output/Freeciv-ruledit-*-setup.exe + rm -f $(OUT_DIR)/Freeciv-ruledit-*-setup.exe rm -f Freeciv-*-ruledit-qt6.nsi clean: diff --git a/windows/installer_msys2/Makefile.meson b/windows/installer_msys2/Makefile.meson index 1c1025df20..28dcb6b0ce 100644 --- a/windows/installer_msys2/Makefile.meson +++ b/windows/installer_msys2/Makefile.meson @@ -10,6 +10,7 @@ # MAKEFILE_NAME=Makefile.meson +OUT_DIR=meson/Output ifeq ($(MSYSTEM),MINGW64) WINARCH=win64 @@ -98,9 +99,9 @@ sdl2-install: installer-common: install-freeciv-$(GUI) install-env-$(GUI) # extract Freeciv version $(eval FREECIV_VERSION := $(shell ../../fc_version)) - ./create-freeciv-$(GUI)-nsi.sh meson-install-$(WINARCH)-$(GUI) $(FREECIV_VERSION) $(WINARCH) > Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi + ./create-freeciv-$(GUI)-nsi.sh meson-install-$(WINARCH)-$(GUI) $(OUT_DIR) $(FREECIV_VERSION) $(WINARCH) > Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi # create installer executable - mkdir -p Output + mkdir -p $(OUT_DIR) makensis Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-$(GUI).nsi install-freeciv-common: clean-install-common @@ -332,9 +333,9 @@ installer-ruledit-common: install-ruledit-$(GUI) # Extract Freeciv version $(eval FREECIV_VERSION := $(shell ../../fc_version)) # create NSIS script - ./create-freeciv-ruledit-nsi.sh meson-install-$(WINARCH)-ruledit-$(GUI) $(FREECIV_VERSION) $(WINARCH) > Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-ruledit-$(GUI).nsi + ./create-freeciv-ruledit-nsi.sh meson-install-$(WINARCH)-ruledit-$(GUI) $(OUT_DIR) $(FREECIV_VERSION) $(WINARCH) > Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-ruledit-$(GUI).nsi # Create installer executable - mkdir -p Output + mkdir -p $(OUT_DIR) makensis Freeciv-meson-$(WINARCH)-$(FREECIV_VERSION)-ruledit-$(GUI).nsi RULEDIT_QT6_DLLS := \ @@ -364,11 +365,11 @@ clean-install-common: rm -rf meson-install-*-$(GUI) clean-installer-common: - rm -f Output/Freeciv-*-$(GUI)-setup.exe + rm -f $(OUT_DIR)/Freeciv-*-$(GUI)-setup.exe rm -f Freeciv-meson-*-$(GUI).nsi clean-ruledit-common: - rm -f Output/Freeciv-ruledit-*-setup.exe + rm -f $(OUT_DIR)/Freeciv-ruledit-*-setup.exe rm -f Freeciv-meson-*-ruledit-$(GUI).nsi clean: diff --git a/windows/installer_msys2/create-freeciv-gtk-qt-nsi.sh b/windows/installer_msys2/create-freeciv-gtk-qt-nsi.sh index 67733d4336..26e17f6553 100644 --- a/windows/installer_msys2/create-freeciv-gtk-qt-nsi.sh +++ b/windows/installer_msys2/create-freeciv-gtk-qt-nsi.sh @@ -1,15 +1,15 @@ #!/bin/sh -# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] +# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] -if test "x$7" != "x" ; then - EXE_ID="$7" +if test "x$8" != "x" ; then + EXE_ID="$8" else - EXE_ID="$3" + EXE_ID="$4" fi -if test "x$6" != "x" ; then - MPEXE_ID="$6" +if test "x$7" != "x" ; then + MPEXE_ID="$7" else MPEXE_ID="$EXE_ID" fi @@ -22,12 +22,12 @@ Unicode true SetCompressor /SOLID lzma !define APPNAME "Freeciv" -!define VERSION $2 -!define GUI_ID $3 +!define VERSION $3 +!define GUI_ID $4 !define EXE_ID $EXE_ID !define MPEXE_ID $MPEXE_ID -!define GUI_NAME $4 -!define WIN_ARCH $5 +!define GUI_NAME $5 +!define WIN_ARCH $6 !define APPID "\${APPNAME}-\${VERSION}-\${GUI_ID}" !define MULTIUSER_EXECUTIONLEVEL Highest @@ -46,7 +46,7 @@ SetCompressor /SOLID lzma ;General Name "\${APPNAME} \${VERSION} (\${GUI_NAME} client)" -OutFile "Output/\${APPNAME}-\${VERSION}-msys2-\${WIN_ARCH}-\${GUI_ID}-setup.exe" +OutFile "$2/\${APPNAME}-\${VERSION}-msys2-\${WIN_ARCH}-\${GUI_ID}-setup.exe" ;Variables @@ -125,7 +125,7 @@ cat < +# ./create-freeciv-gtk3.22-nsi.sh -./create-freeciv-gtk-qt-nsi.sh $1 $2 "gtk3.22" "GTK+3.22" $3 "gtk3" +./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "gtk3.22" "GTK+3.22" "$4" "gtk3" diff --git a/windows/installer_msys2/create-freeciv-gtk4-nsi.sh b/windows/installer_msys2/create-freeciv-gtk4-nsi.sh index 95a6694d89..20ad180f37 100644 --- a/windows/installer_msys2/create-freeciv-gtk4-nsi.sh +++ b/windows/installer_msys2/create-freeciv-gtk4-nsi.sh @@ -1,5 +1,5 @@ #!/bin/sh -# ./create-freeciv-gtk4-nsi.sh +# ./create-freeciv-gtk4-nsi.sh -./create-freeciv-gtk-qt-nsi.sh $1 $2 "gtk4" "GTK4" $3 "gtk4" +./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "gtk4" "GTK4" "$4" "gtk4" diff --git a/windows/installer_msys2/create-freeciv-qt5-nsi.sh b/windows/installer_msys2/create-freeciv-qt5-nsi.sh index d8018937fd..d10de062ab 100644 --- a/windows/installer_msys2/create-freeciv-qt5-nsi.sh +++ b/windows/installer_msys2/create-freeciv-qt5-nsi.sh @@ -1,5 +1,5 @@ #!/bin/sh -# ./create-freeciv-qt-nsi.sh +# ./create-freeciv-qt-nsi.sh -./create-freeciv-gtk-qt-nsi.sh $1 $2 "qt5" "Qt5" $3 "" "qt" +./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "qt5" "Qt5" "$4" "" "qt" diff --git a/windows/installer_msys2/create-freeciv-qt6-nsi.sh b/windows/installer_msys2/create-freeciv-qt6-nsi.sh index 1605945a19..8ec37626de 100644 --- a/windows/installer_msys2/create-freeciv-qt6-nsi.sh +++ b/windows/installer_msys2/create-freeciv-qt6-nsi.sh @@ -1,5 +1,5 @@ #!/bin/sh -# ./create-freeciv-qt-nsi.sh +# ./create-freeciv-qt-nsi.sh -./create-freeciv-gtk-qt-nsi.sh $1 $2 "qt6" "Qt6" $3 "" "qt" +./create-freeciv-gtk-qt-nsi.sh "$1" "$2" "$3" "qt6" "Qt6" "$4" "" "qt" diff --git a/windows/installer_msys2/create-freeciv-ruledit-nsi.sh b/windows/installer_msys2/create-freeciv-ruledit-nsi.sh index f3d4054830..1b8d398fd5 100644 --- a/windows/installer_msys2/create-freeciv-ruledit-nsi.sh +++ b/windows/installer_msys2/create-freeciv-ruledit-nsi.sh @@ -1,6 +1,6 @@ #!/bin/sh -# ./create-freeciv-ruledit.sh +# ./create-freeciv-ruledit.sh cat < +# ./create-freeciv-sdl2-nsi.sh cat <