From b506306648270eb2055e12351abcaf850c472af6 Mon Sep 17 00:00:00 2001 From: Marko Lindqvist Date: Mon, 29 Aug 2022 20:02:11 +0300 Subject: [PATCH 51/51] installer_cross / Meson: Add ruledit installer See osdn #45511 Signed-off-by: Marko Lindqvist --- .../meson-build_all_installers.sh | 10 ++++ .../installer_cross/meson-installer_build.sh | 46 +++++++++++++------ windows/installer_cross/meson-winbuild.sh | 7 ++- 3 files changed, 49 insertions(+), 14 deletions(-) diff --git a/windows/installer_cross/meson-build_all_installers.sh b/windows/installer_cross/meson-build_all_installers.sh index d8edd866db..426f9dc454 100755 --- a/windows/installer_cross/meson-build_all_installers.sh +++ b/windows/installer_cross/meson-build_all_installers.sh @@ -86,9 +86,19 @@ else SDL2="Success" fi +if test "$CROSSER_QT6" != "yes" ; then + RULEDIT="N/A" +elif ! ./meson-installer_build.sh "$DLLSPATH" ruledit ; then + RET=1 + RULEDIT="Fail" +else + RULEDIT="Success" +fi + echo "Gtk3.22: $GTK322" echo "Gtk4: $GTK4" echo "Qt6: $QT6" echo "Sdl2: $SDL2" +echo "Ruledit: $RULEDIT" exit $RET diff --git a/windows/installer_cross/meson-installer_build.sh b/windows/installer_cross/meson-installer_build.sh index e33285a931..145ae49fb2 100755 --- a/windows/installer_cross/meson-installer_build.sh +++ b/windows/installer_cross/meson-installer_build.sh @@ -120,6 +120,8 @@ case $GUI in CLIENT="qt" MPGUI="qt" FCMP="qt" ;; + ruledit) + ;; *) echo "Unknown gui type \"$GUI\"" >&2 exit 1 ;; @@ -170,8 +172,23 @@ if ! add_common_env "$DLLSPATH" "$INSTDIR" ; then fi if test "$GUI" = "ruledit" ; then - echo "Ruledit installer build not supported yet!" >&2 - exit 1 + if ! cp freeciv-ruledit.cmd "$INSTDIR" + then + echo "Adding cmd-file failed!" >&2 + exit 1 + fi + if ! add_qt6_env "$DLLSPATH" "$INSTDIR" ; then + echo "Copying Qt6 environment failed!" >&2 + exit 1 + fi + + NSIFILE="meson-freeciv-ruledit-$SETUP-$VERREV.nsi" + + if ! ./create-freeciv-ruledit-nsi.sh "$INSTDIR" "$VERREV" "$SETUP" \ + > "$NSIFILE" + then + exit 1 + fi else if ! cp freeciv-server.cmd freeciv-${CLIENT}.cmd freeciv-mp-${FCMP}.cmd $INSTDIR/ then @@ -238,28 +255,31 @@ else UNINSTALLER="" fi + NSIFILE="meson-freeciv-$SETUP-$VERREV-$GUI.nsi" + if test "$GUI" = "sdl2" ; then if ! ./create-freeciv-sdl2-nsi.sh "$INSTDIR" "$VERREV" "$SETUP" "$UNINSTALLER" \ - > meson-freeciv-$SETUP-$VERREV-$GUI.nsi + > "$NSIFILE" then exit 1 fi else if ! ./create-freeciv-gtk-qt-nsi.sh "$INSTDIR" "$VERREV" "$GUI" "$GUINAME" \ "$SETUP" "$MPGUI" "$EXE_ID" "$UNINSTALLER" \ - > meson-freeciv-$SETUP-$VERREV-$GUI.nsi + > "$NSIFILE" then exit 1 fi fi +fi - if ! mkdir -p Output ; then - echo "Creating Output directory failed" >&2 - exit 1 - fi - if ! makensis meson-freeciv-$SETUP-$VERREV-$GUI.nsi - then - echo "Creating installer failed!" >&2 - exit 1 - fi +if ! mkdir -p Output ; then + echo "Creating Output directory failed" >&2 + exit 1 +fi + +if ! makensis "$NSIFILE" +then + echo "Creating installer failed!" >&2 + exit 1 fi diff --git a/windows/installer_cross/meson-winbuild.sh b/windows/installer_cross/meson-winbuild.sh index 5a6c51c424..ec9a8608fe 100755 --- a/windows/installer_cross/meson-winbuild.sh +++ b/windows/installer_cross/meson-winbuild.sh @@ -24,7 +24,8 @@ GUI="$2" if test "$GUI" != "gtk3.22" && test "$GUI" != "gtk4" && test "$GUI" != "sdl2" && - test "$GUI" != "qt5" && test "$GUI" != "qt6" ; then + test "$GUI" != "qt5" && test "$GUI" != "qt6" && + test "$GUI" != "ruledit" ; then echo "Unknown gui \"$2\"" >&2 exit 1 fi @@ -81,6 +82,10 @@ case $GUI in FCMP="qt" RULEDIT=true QTPARAMS="-Dqtver=qt6" ;; + ruledit) CLIENT="[]" + FCMP="[]" + RULEDIT=true + QTPARAMS="-Dqtver=qt6" ;; esac if test "$CLIENT" = "" ; then -- 2.35.1