From 6ce7c66c8287cc30a35ee2b01c618c708e5c83e3 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Sat, 28 Jan 2023 20:43:49 +0200 Subject: [PATCH 29/29] installer_cross: Put results to build system specific directories See osdn #46612 Signed-off-by: Marko Lindqvist --- .../create-freeciv-gtk-qt-nsi.sh | 56 +++++++++---------- .../create-freeciv-ruledit-nsi.sh | 32 +++++------ .../create-freeciv-sdl2-nsi.sh | 40 ++++++------- windows/installer_cross/installer_build.sh | 22 +++++--- .../installer_cross/meson-installer_build.sh | 21 ++++--- windows/installer_cross/winbuild.sh | 11 ++-- 6 files changed, 96 insertions(+), 86 deletions(-) diff --git a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh b/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh index db9ada1242..4af9fbe547 100755 --- a/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh +++ b/windows/installer_cross/create-freeciv-gtk-qt-nsi.sh @@ -1,21 +1,21 @@ #!/bin/sh -# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] [unistall setup script] +# ./create-freeciv-gtk-qt-nsi.sh [mp gui] [exe id] [unistall setup script] -if test "x$7" != "x" ; then - EXE_ID="$7" +if test "$8" != "" ; then + EXE_ID="$8" else - EXE_ID="$3" + EXE_ID="$4" fi -if test "x$6" != "x" ; then - MPEXE_ID="$6" +if test "$7" != "" ; then + MPEXE_ID="$7" else MPEXE_ID="$EXE_ID" fi -if test "x$8" != "x" && ! test -x "$8" ; then - echo "$8 not an executable script" >&2 +if test "$9" != "" && ! test -x "$9" ; then + echo "$9 not an executable script" >&2 exit 1 fi @@ -27,12 +27,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 @@ -51,7 +51,7 @@ SetCompressor /SOLID lzma ;General Name "\${APPNAME} \${VERSION} (\${GUI_NAME} client)" -OutFile "Output/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" +OutFile "$2/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" ;Variables @@ -92,7 +92,7 @@ Page custom HelperScriptFunction EOF -### required files ### +### Required files ### cat < +# ./create-freeciv-ruledit.sh cat < [unistall setup script] +# ./create-freeciv-sdl2-nsi.sh [unistall setup script] -if test "x$4" != "x" && ! test -x "$4" ; then - echo "$4 not an executable script" >&2 +if test "$5" != "" && ! test -x "$5" ; then + echo "$5 not an executable script" >&2 exit 1 fi @@ -15,10 +15,10 @@ Unicode true SetCompressor /SOLID lzma !define APPNAME "Freeciv" -!define VERSION $2 +!define VERSION $3 !define GUI_ID sdl2 !define GUI_NAME SDL2 -!define WIN_ARCH $3 +!define WIN_ARCH $4 !define APPID "\${APPNAME}-\${VERSION}-\${GUI_ID}" !define MULTIUSER_EXECUTIONLEVEL Highest @@ -37,7 +37,7 @@ SetCompressor /SOLID lzma ;General Name "\${APPNAME} \${VERSION} (\${GUI_NAME} client)" -OutFile "Output/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" +OutFile "$2/\${APPNAME}-\${VERSION}-\${WIN_ARCH}-\${GUI_ID}-setup.exe" ;Variables @@ -78,7 +78,7 @@ Page custom HelperScriptFunction EOF -### required files ### +### Required files ### cat < Freeciv-ruledit-$SETUP-$VERREV.nsi + if ! ./create-freeciv-ruledit-nsi.sh \ + "$INSTDIR" "autotools/Output" "$VERREV" "$SETUP" \ + > Freeciv-ruledit-$SETUP-$VERREV.nsi then exit 1 fi - if ! mkdir -p Output ; then - echo "Cannot create Output directory" >&2 + if ! mkdir -p autotools/Output ; then + echo "Cannot create autotools/Output directory" >&2 exit 1 fi if ! makensis Freeciv-ruledit-$SETUP-$VERREV.nsi @@ -290,8 +292,10 @@ else esac if test "x$GUI" = "xsdl2" ; then - if ! ./create-freeciv-sdl2-nsi.sh $INSTDIR $VERREV $SETUP helpers/uninstaller-helper-gtk3.sh \ - > Freeciv-$SETUP-$VERREV-$GUI.nsi + if ! ./create-freeciv-sdl2-nsi.sh \ + "$INSTDIR" "autotools/Output" "$VERREV" "$SETUP" \ + "helpers/uninstaller-helper-gtk3.sh" \ + > Freeciv-$SETUP-$VERREV-$GUI.nsi then exit 1 fi @@ -306,14 +310,16 @@ else else UNINSTALLER="" fi - if ! ./create-freeciv-gtk-qt-nsi.sh $INSTDIR $VERREV $GUI $GUINAME \ - $SETUP $MPGUI $EXE_ID $UNINSTALLER > Freeciv-$SETUP-$VERREV-$GUI.nsi + if ! ./create-freeciv-gtk-qt-nsi.sh \ + "$INSTDIR" "autotools/Output" "$VERREV" "$GUI" "$GUINAME" \ + "$SETUP" "$MPGUI" "$EXE_ID" "$UNINSTALLER" \ + > Freeciv-$SETUP-$VERREV-$GUI.nsi then exit 1 fi fi - mkdir -p Output + mkdir -p autotools/Output if ! makensis Freeciv-$SETUP-$VERREV-$GUI.nsi then echo "Creating installer failed!" >&2 diff --git a/windows/installer_cross/meson-installer_build.sh b/windows/installer_cross/meson-installer_build.sh index 1e0cf0fb95..2d409656ab 100755 --- a/windows/installer_cross/meson-installer_build.sh +++ b/windows/installer_cross/meson-installer_build.sh @@ -188,8 +188,9 @@ if test "$GUI" = "ruledit" ; then NSIFILE="meson-freeciv-ruledit-$SETUP-$VERREV.nsi" - if ! ./create-freeciv-ruledit-nsi.sh "$INSTDIR" "$VERREV" "$SETUP" \ - > "$NSIFILE" + if ! ./create-freeciv-ruledit-nsi.sh \ + "$INSTDIR" "meson/Output" "$VERREV" "$SETUP" \ + > "$NSIFILE" then exit 1 fi @@ -262,23 +263,25 @@ else NSIFILE="meson-freeciv-$SETUP-$VERREV-$GUI.nsi" if test "$GUI" = "sdl2" ; then - if ! ./create-freeciv-sdl2-nsi.sh "$INSTDIR" "$VERREV" "$SETUP" "$UNINSTALLER" \ - > "$NSIFILE" + if ! ./create-freeciv-sdl2-nsi.sh \ + "$INSTDIR" "meson/Output" "$VERREV" "$SETUP" "$UNINSTALLER" \ + > "$NSIFILE" then exit 1 fi else - if ! ./create-freeciv-gtk-qt-nsi.sh "$INSTDIR" "$VERREV" "$GUI" "$GUINAME" \ - "$SETUP" "$MPGUI" "$EXE_ID" "$UNINSTALLER" \ - > "$NSIFILE" + if ! ./create-freeciv-gtk-qt-nsi.sh \ + "$INSTDIR" "meson/Output" "$VERREV" "$GUI" "$GUINAME" \ + "$SETUP" "$MPGUI" "$EXE_ID" "$UNINSTALLER" \ + > "$NSIFILE" then exit 1 fi fi fi -if ! mkdir -p Output ; then - echo "Creating Output directory failed" >&2 +if ! mkdir -p meson/Output ; then + echo "Creating meson/Output directory failed" >&2 exit 1 fi diff --git a/windows/installer_cross/winbuild.sh b/windows/installer_cross/winbuild.sh index d3a2307810..d1d4ddb663 100755 --- a/windows/installer_cross/winbuild.sh +++ b/windows/installer_cross/winbuild.sh @@ -7,9 +7,9 @@ # This script is licensed under Gnu General Public License version 2 or later. # See COPYING available from the same location you got this script. -# Version 2.4.2 (16-Dec-22) +# Version 2.4.3 (28-Jan-23) -WINBUILD_VERSION="2.4.2" +WINBUILD_VERSION="2.4.3" MIN_WINVER=0x0601 # Windows 7, Qt6-client and Qt6-ruledit builds override this CROSSER_FEATURE_LEVEL=2.5 @@ -274,12 +274,13 @@ fi exit 1 fi -if ! mkdir -p Output ; then - echo "Creating Output directory failed" >&2 +if ! mkdir -p autotools/Output ; then + echo "Creating autotools/Output directory failed" >&2 exit 1 fi -if ! 7z a -r Output/freeciv-${VERREV}${NAMEP}.7z freeciv-${VERREV}${NAMEP} +if ! 7z a -r autotools/Output/freeciv-${VERREV}${NAMEP}.7z \ + freeciv-${VERREV}${NAMEP} then echo "7z failed" >&2 exit 1 -- 2.39.0