Project

General

Profile

Feature #2321 » 0020-installer_cross-Drop-unsupported-autotools-build-scr.patch

Marko Lindqvist, 10/06/2026 05:22 AM

View differences:

doc/README.crosser
Scripts to create installers require specific crosser version
(MAJOR.MINOR, or "CROSSER_FEATURE_LEVEL") to know what exact files
they need to package with freeciv.
See CROSSER_FEATURE_LEVEL on top of winbuild.sh and meson-winbuild.sh
under windows/installer_cross/ to see what is the crosser version
currently supported and required.
See CROSSER_FEATURE_LEVEL on top of
windows/installer_cross/meson-winbuild.sh
to see what is the crosser version currently supported and required.
Using docker container for building with crosser
......
(likely you need to create that directory - or to create
it as a symbolic link to another location)
so that after unpacking you will have, e.g.
/usr/crosser/win64stack-full-2.5/
/usr/crosser/win64stack-full-2.9/
Install MinGW cross-compiler, also for C++.
On Debian derivatives those packages are
......
TODO: Find out what other native side requirements
crosser build has and list them.
At least 'ninja' is needed, in case of meson
based build.
At least 'ninja' is needed.
Building Windows Installers with crosser
=========================================
If everything is set up correctly, easiest way
to do the build is to run either
> ./meson-build_all_installer.sh (meson based build)
or
> ./build_all_installer.sh (autotools based build)
to do the build is to run
> ./meson-build_all_installer.sh
on windows/installer_cross/.
Currently these scripts need to be run on their own
Currently this script needs to be run on its own
directory, and they produce their output there
(within freeciv tree). If everything success, final
installers are generated to meson/output/
or autotools/output/
windows/Makefile.am
installer_cross/create-freeciv-gtk-qt-nsi.sh \
installer_cross/create-freeciv-sdl-nsi.sh \
installer_cross/create-freeciv-ruledit-nsi.sh \
installer_cross/installer_build.sh \
installer_cross/build_all_installers.sh \
installer_cross/winbuild.sh \
installer_cross/Freeciv.url \
installer_cross/freeciv-server.cmd \
installer_cross/freeciv-gtk3.22.cmd \
windows/installer_cross/build_all_installers.sh
#!/usr/bin/env bash
#/***********************************************************************
# Freeciv - Copyright (C) 2017-2023
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#***********************************************************************/
if test "$1" = "" || test "$1" = "-h" || test "$1" = "--help" ; then
USAGE_NEEDED=yes
fi
if test "$2" != "snapshot" && test "$2" != "release" ; then
USAGE_NEEDED=yes
fi
if test "${USAGE_NEEDED}" = "yes" ; then
echo "Usage: $0 <crosser dir> <snapshot|release>"
exit 1
fi
DLLSPATH="$1"
export INST_CROSS_MODE="$2"
if ! test -d "${DLLSPATH}" ; then
echo "Dllstack directory \"${DLLSPATH}\" not found!" >&2
exit 1
fi
if ! test -f "${DLLSPATH}/crosser.txt" ; then
echo "Directory \"${DLLSPATH}\" does not look like crosser environment!" >&2
exit 1
fi
RET=0
if grep "CROSSER_QT6" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
then
CROSSER_QT6=yes
fi
if grep "CROSSER_GTK4" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
then
CROSSER_GTK4=yes
fi
if ! ./installer_build.sh "${DLLSPATH}" gtk3.22 ; then
RET=1
GTK322="Fail"
else
GTK322="Success"
fi
if test "${CROSSER_QT6}" != "yes" ; then
QT6="N/A"
elif ! ./installer_build.sh "${DLLSPATH}" qt6 ; then
RET=1
QT6="Fail"
else
QT6="Success"
fi
# sdl2-client comes with gtk4 modpack installer
if test "${CROSSER_GTK4}" != "yes" ; then
SDL2="N/A"
elif ! ./installer_build.sh "${DLLSPATH}" sdl2 ; then
RET=1
SDL2="Fail"
else
SDL2="Success"
fi
if test "${CROSSER_GTK4}" != "yes" ; then
GTK4="N/A"
elif ! ./installer_build.sh "${DLLSPATH}" gtk4 ; then
RET=1
GTK4="Fail"
else
GTK4="Success"
fi
if test "${CROSSER_QT6}" != "yes" ; then
RULEDIT="N/A"
elif ! ./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}
windows/installer_cross/installer_build.sh
#!/usr/bin/env bash
#/***********************************************************************
# Freeciv - Copyright (C) 2017-2023
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2, or (at your option)
# any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
#***********************************************************************/
add_glib_env() {
mkdir -p $2/share/glib-2.0/schemas &&
cp -R $1/share/glib-2.0/schemas/*.gschema.xml $2/share/glib-2.0/schemas/ &&
cp $1/bin/libglib-2.0-0.dll $2/ &&
cp $1/bin/libpcre2-8-0.dll $2/ &&
mkdir -p $2/bin &&
cp $1/bin/glib-compile-schemas.exe $2/bin/
}
add_gtk_common_env() {
mkdir -p $2/lib &&
cp -R $1/lib/gdk-pixbuf-2.0 $2/lib/ &&
mkdir -p $2/share/icons &&
cp -R $1/share/locale $2/share/ &&
cp -R $1/share/icons/Adwaita $2/share/icons/ &&
cp $1/bin/libgobject-2.0-0.dll $2/ &&
cp $1/bin/libpixman-1-0.dll $2/ &&
cp $1/bin/libcairo-gobject-2.dll $2/ &&
cp $1/bin/libcairo-2.dll $2/ &&
cp $1/bin/libepoxy-0.dll $2/ &&
cp $1/bin/libgdk_pixbuf-2.0-0.dll $2/ &&
cp $1/bin/libgio-2.0-0.dll $2/ &&
cp $1/bin/libfribidi-0.dll $2/ &&
cp $1/bin/libpango-1.0-0.dll $2/ &&
cp $1/bin/libpangocairo-1.0-0.dll $2/ &&
cp $1/bin/libffi-8.dll $2/ &&
cp $1/bin/libatk-1.0-0.dll $2/ &&
cp $1/bin/libgmodule-2.0-0.dll $2/ &&
cp $1/bin/libpangowin32-1.0-0.dll $2/ &&
cp $1/bin/libfontconfig-1.dll $2/ &&
cp $1/bin/libxml2-16.dll $2/ &&
cp $1/bin/libjpeg-9.dll $2/ &&
mkdir -p $2/bin &&
cp $1/bin/gdk-pixbuf-query-loaders.exe $2/bin/
}
add_gtk3_env() {
add_gtk_common_env $1 $2 &&
mkdir -p $2/etc &&
cp -R $1/etc/gtk-3.0 $2/etc/ &&
cp $1/bin/libgtk-3-0.dll $2/ &&
cp $1/bin/libgdk-3-0.dll $2/ &&
cp $1/bin/gtk-update-icon-cache.exe $2/bin/ &&
cp ./helpers/installer-helper-gtk3.cmd $2/bin/installer-helper.cmd
}
add_gtk4_env() {
add_gtk_common_env $1 $2 &&
mkdir -p $2/etc &&
cp $1/bin/libgtk-4-1.dll $2/ &&
cp $1/bin/libgraphene-1.0-0.dll $2/ &&
cp $1/bin/libcairo-script-interpreter-2.dll $2/ &&
cp $1/bin/libtiff-6.dll $2/ &&
cp $1/bin/gdbus.exe $2/ &&
cp $1/bin/gtk4-update-icon-cache.exe $2/bin/ &&
cp ./helpers/installer-helper-gtk4.cmd $2/bin/installer-helper.cmd
}
add_sdl2_mixer_env() {
cp $1/bin/SDL2.dll $2/ &&
cp $1/bin/SDL2_mixer.dll $2/ &&
cp $1/bin/libvorbisfile-3.dll $2/ &&
cp $1/bin/libvorbis-0.dll $2/ &&
cp $1/bin/libogg-0.dll $2/
}
add_sdl2_env() {
cp $1/bin/SDL2_image.dll $2/ &&
cp $1/bin/SDL2_ttf.dll $2/
}
add_qt6_env() {
cp -R $1/qt6/plugins $2/ &&
cp $1/bin/Qt6Core.dll $2/ &&
cp $1/bin/Qt6Gui.dll $2/ &&
cp $1/bin/Qt6Widgets.dll $2/ &&
cp $1/bin/libpcre2-16-0.dll $2/ &&
mkdir -p $2/bin &&
cp ./helpers/installer-helper-qt.cmd $2/bin/installer-helper.cmd
}
add_common_env() {
cp $1/bin/libcurl-4.dll $2/ &&
cp $1/bin/liblzma-5.dll $2/ &&
cp $1/bin/libzstd-1.dll $2/ &&
cp $1/bin/libintl-8.dll $2/ &&
cp $1/bin/libsqlite3-0.dll $2/ &&
cp $1/bin/libiconv-2.dll $2/ &&
cp $1/bin/libz.dll.1.3.1 $2/ &&
cp $1/bin/icuuc76.dll $2/ &&
cp $1/bin/icudt76.dll $2/ &&
cp $1/bin/libpng16-16.dll $2/ &&
cp $1/bin/libfreetype-6.dll $2/ &&
cp $1/bin/libharfbuzz-0.dll $2/ &&
cp $1/bin/libharfbuzz-subset-0.dll $2/ &&
cp $1/bin/libpsl-5.dll $2/ &&
cp $1/bin/libMagickWand-7.Q16HDRI-10.dll $2/ &&
cp $1/bin/libMagickCore-7.Q16HDRI-10.dll $2/ &&
add_glib_env $1 $2
}
if test "$1" = x || test "$1" = "-h" || test "$1" = "--help" || test "$2" = "" ; then
echo "Usage: $0 <crosser dir> <gui>"
exit 1
fi
DLLSPATH="$1"
GUI="$2"
NAMEP="-client-${GUI}"
case $GUI in
gtk3.22)
GUINAME="GTK3.22"
MPGUI="gtk3"
FCMP="gtk3" ;;
qt6)
GUINAME="Qt6"
CLIENT="qt"
MPGUI="qt"
FCMP="qt" ;;
sdl2)
GUINAME="SDL2"
FCMP="gtk4" ;;
gtk4)
GUINAME="GTK4"
MPGUI="gtk4"
FCMP="gtk4" ;;
ruledit)
NAMEP="-ruledit" ;;
*)
echo "Unknown gui type \"$GUI\"" >&2
exit 1 ;;
esac
if test "$CLIENT" = "" ; then
CLIENT="$GUI"
fi
if ! test -d "$DLLSPATH" ; then
echo "Dllstack directory \"$DLLSPATH\" not found!" >&2
exit 1
fi
if ! ./winbuild.sh "$DLLSPATH" "$GUI" ; then
exit 1
fi
SETUP=$(grep "CrosserSetup=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSetup="//' -e 's/"//')
VERREV="$(../../fc_version)"
if test "$INST_CROSS_MODE" != "release" ; then
if test -d ../../.git || test -f ../../.git ; then
VERREV="$VERREV-$(cd ../.. && git rev-parse --short HEAD)"
GITREVERT=true
fi
fi
INSTDIR="autotools/install/freeciv-$SETUP-${VERREV}${NAMEP}"
if test "$GUI" = "ruledit" ; then
if ! make -C autotools/build/${SETUP}-${GUI}/translations/ruledit update-po ||
! make -C autotools/build/${SETUP}-${GUI}/bootstrap langstat_ruledit.txt
then
echo "Langstat creation failed!" >&2
exit 1
fi
if test "$GITREVERT" = true ; then
git checkout ../../translations/ruledit
fi
else
if ! make -C autotools/build/${SETUP}-client-${GUI}/translations/core update-po ||
! make -C autotools/build/${SETUP}-client-${GUI}/bootstrap langstat_core.txt
then
echo "Langstat creation failed!" >&2
exit 1
fi
if test "$GITREVERT" = true ; then
git checkout ../../translations/core
fi
fi
if ! mv $INSTDIR/bin/* $INSTDIR/ ||
! mv $INSTDIR/share/freeciv $INSTDIR/data ||
! mv $INSTDIR/share/doc $INSTDIR/ ||
! mkdir -p $INSTDIR/doc/freeciv/installer ||
! cat licenses/header.txt ../../COPYING > $INSTDIR/doc/freeciv/installer/COPYING.installer ||
! rm -Rf $INSTDIR/lib ||
! cp Freeciv.url $INSTDIR/
then
echo "Rearranging install directory failed!" >&2
exit 1
fi
if ! add_common_env $DLLSPATH $INSTDIR ; then
echo "Copying common environment failed!" >&2
exit 1
fi
NSI_DIR="autotools/nsi"
if ! mkdir -p "$NSI_DIR" ; then
echo "Cannot create \"$NSI_DIR\" directory" >&2
exit 1
fi
if ! mkdir -p autotools/output ; then
echo "Cannot create autotools/output directory" >&2
exit 1
fi
if test "$GUI" = "ruledit" ; then
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
if ! ./create-freeciv-ruledit-nsi.sh \
"${INSTDIR}" "autotools/output" "${VERREV}" "qt6" "Qt6" "${SETUP}" \
> "${NSI_DIR}/ruledit-${SETUP}-${VERREV}.nsi"
then
exit 1
fi
if ! makensis -NOCD "${NSI_DIR}/ruledit-${SETUP}-${VERREV}.nsi"
then
echo "Creating installer failed!" >&2
exit 1
fi
else
if ! cp freeciv-server.cmd freeciv-$CLIENT.cmd freeciv-mp-$FCMP.cmd $INSTDIR/
then
echo "Adding cmd-files failed!" >&2
exit 1
fi
if ! add_sdl2_mixer_env $DLLSPATH $INSTDIR ; then
echo "Copying SDL2_mixer environment failed!" >&2
exit 1
fi
case $GUI in
gtk3.22)
if ! add_gtk3_env $DLLSPATH $INSTDIR ; then
echo "Copying gtk3 environment failed!" >&2
exit 1
fi ;;
sdl2)
if ! add_gtk4_env $DLLSPATH $INSTDIR ; then
echo "Copying gtk4 environment failed!" >&2
exit 1
fi
if ! add_sdl2_env $DLLSPATH $INSTDIR ; then
echo "Copying SDL2 environment failed!" >&2
exit 1
fi ;;
qt6)
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 ;;
gtk4)
if ! add_gtk4_env $DLLSPATH $INSTDIR ; then
echo "Copying gtk4 environment failed!" >&2
exit 1
fi ;;
esac
if test "$GUI" = "sdl2" ; then
if ! ./create-freeciv-sdl-nsi.sh \
"$INSTDIR" "autotools/output" "$VERREV" "$SETUP" \
"${GUI}" "${GUINAME}" "helpers/uninstaller-helper-gtk3.sh" \
> "${NSI_DIR}/client-${SETUP}-${VERREV}-${GUI}.nsi"
then
exit 1
fi
else
if test "${GUI}" = "qt6" ; then
EXE_ID="qt"
else
EXE_ID="${GUI}"
fi
if test "$GUI" = "gtk3.22" || test "$GUI" = "gtk4" ; then
UNINSTALLER="helpers/uninstaller-helper-gtk3.sh"
else
UNINSTALLER=""
fi
if ! ./create-freeciv-gtk-qt-nsi.sh \
"$INSTDIR" "autotools/output" "$VERREV" "$GUI" "$GUINAME" \
"$SETUP" "$MPGUI" "$EXE_ID" "$UNINSTALLER" \
> "${NSI_DIR}/client-${SETUP}-${VERREV}-${GUI}.nsi"
then
exit 1
fi
fi
if ! makensis -NOCD "${NSI_DIR}/client-${SETUP}-${VERREV}-${GUI}.nsi"
then
echo "Creating installer failed!" >&2
exit 1
fi
fi
windows/installer_cross/winbuild.sh
#!/bin/sh
# winbuild.sh: Cross-compiling freeciv from linux to Windows using Crosser dllstack
#
# (c) 2008-2016 Marko Lindqvist
#
# 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.3 (28-Jan-23)
WINBUILD_VERSION="2.4.3"
MIN_WINVER=0x0603 # Windows 8.1, Qt6-client and Qt6-ruledit builds override this
CROSSER_FEATURE_LEVEL=2.11
if test "$1" = "" || test "$1" = "-h" || test "$1" = "--help" ; then
echo "Usage: $0 <crosser dir> [gui]"
exit 1
fi
if test "$1" = "-v" || test "$1" = "--version" ; then
echo "winbuild.sh version $WINBUILD_VERSION"
exit
fi
DLLSPATH="$1"
if ! test -d "$DLLSPATH" ; then
echo "Dllstack directory \"$DLLSPATH\" not found!" >&2
exit 1
fi
if ! test -f "$DLLSPATH/crosser.txt" ; then
echo "Directory \"$DLLSPATH\" does not look like crosser environment!" >&2
exit 1
fi
SRC_ROOT="$(cd ../.. || exit 1 ; pwd)"
VERREV="$(${SRC_ROOT}/fc_version)"
if test "$INST_CROSS_MODE" != "release" ; then
if test -d ${SRC_ROOT}/.git || test -f ${SRC_ROOT}/.git ; then
VERREV="$VERREV-$(cd ${SRC_ROOT} && git rev-parse --short HEAD)"
fi
fi
FLVL=$(grep "CrosserFeatureLevel=" $DLLSPATH/crosser.txt | sed -e 's/CrosserFeatureLevel="//' -e 's/"//')
if test "$FLVL" != "$CROSSER_FEATURE_LEVEL" ; then
echo "Crosser feature level \"$FLVL\", required \"$CROSSER_FEATURE_LEVEL\"!" >&2
exit 1
fi
CSET=$(grep "CrosserSet=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSet="//' -e 's/"//')
if test "$CSET" != "current" ; then
echo "Crosser set is \"$CSET\", only \"current\" is supported!" >&2
exit 1
fi
SETUP=$(grep "CrosserSetup=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSetup="//' -e 's/"//')
# Make -Wno-error=attributes Qt-client/Ruledit specific as
# upstream updates to Qt headers allow. Currently needed
# in all cases.
CXXFLAGS="-Wno-error=attributes -Wl,-allow-multiple-definition"
if test "$2" = "ruledit" ; then
SINGLE_GUI=true
GUIP="-ruledit"
RULEDIT="yes"
CLIENTS="no"
FCMP="no"
SERVER="no"
AIS="--enable-ai-static=stub"
elif test "$2" != "" ; then
SINGLE_GUI=true
GUIP="-client-$2"
SERVER="yes"
if test "$2" = "qt6" ; then
RULEDIT="yes"
CLIENTS="qt"
else
RULEDIT="no"
CLIENTS="$2"
fi
case $2 in
sdl2) FCMP="gtk4" ;;
gtk3.22) FCMP="gtk3" ;;
gtk4) FCMP="gtk4" ;;
qt6) FCMP="qt"
QTVER="Qt6"
MIN_WINVER="0x0A00" ;; # Qt6 requires Win10 anyway
*) echo "Unknown gui \"$2\"!" >&2
exit 1 ;;
esac
else
GUIP=""
SERVER="yes"
RULEDIT="yes"
fi
if test "$NAMEP" = "" ; then
NAMEP="$GUIP"
fi
if test "$MAKE_PARAMS" = "" ; then
MAKE_PARAMS="-j$(nproc)"
fi
BUILD_DIR="autotools/build/${SETUP}${NAMEP}"
if ! rm -Rf "${BUILD_DIR}" ; then
echo "Failed to clear out old build directory!" >&2
exit 1
fi
if ! mkdir -p "${BUILD_DIR}" ; then
echo "Can't create build directory \"${BUILD_DIR}\"!" >&2
exit 1
fi
if test "$SETUP" = "win64" ; then
TARGET=x86_64-w64-mingw32
if test "$SINGLE_GUI" != "true" ; then
CLIENTS="sdl2,gtk3.22"
FCMP="gtk3,cli"
fi
VERREV="win64-$VERREV"
elif test "$SETUP" = "win32" ; then
TARGET=i686-w64-mingw32
if test "$SINGLE_GUI" != "true" ; then
CLIENTS="sdl2,gtk3.22"
FCMP="gtk3,cli"
fi
VERREV="win32-$VERREV"
else
echo "Unsupported crosser setup \"${SETUP}\"!" >&2
exit 1
fi
if test "${SINGLE_GUI}" != "true" || test "$2" = "ruledit" ; then
if grep "CROSSER_QT6" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
then
QT6="yes"
QTVER="Qt6"
if test "${SINGLE_GUI}" = "true" ; then
# Build is ONLY about Qt6 programs
MIN_WINVER="0x0A00" # Qt6 requires Win10 anyway
fi
fi
fi
if test "${SINGLE_GUI}" != "true" ; then
if test "${QT6}" = "yes"
then
CLIENTS="${CLIENTS},qt"
FCMP="${FCMP},qt"
fi
fi
if test "${QTVER}" = "Qt6"; then
QTPARAMS="--with-qtver=Qt6 --with-qt6-includes=${DLLSPATH}/qt6/include --with-qt6-libs=${DLLSPATH}/lib"
MOC_CROSSER="${DLLSPATH}/linux/libexec/moc-qt6"
fi
echo "----------------------------------"
echo "Building for ${SETUP}"
echo "Freeciv version ${VERREV}"
echo "Clients: ${CLIENTS}"
echo "----------------------------------"
export CC="$TARGET-gcc -static-libgcc -static-libstdc++"
export CXX="$TARGET-g++ -static-libgcc -static-libstdc++"
if ! ${SRC_ROOT}/autogen.sh --no-configure-run ; then
echo "Autogen failed" >&2
exit 1
fi
INSTALL_DIR="$(pwd)/autotools/install/freeciv-${VERREV}${NAMEP}"
if ! (
cd "${BUILD_DIR}"
if test "$INST_CROSS_MODE" = "snapshot" ; then
GITREVP="--enable-gitrev"
else
GITREVP=""
fi
if test "$MOCCMD" = "" && test "$MOC_CROSSER" != "" ; then
MOCPARAM="MOCCMD=${MOC_CROSSER}"
fi
PATH="${DLLSPATH}/linux/bin:${PATH}"
hash -r
if ! ${SRC_ROOT}/configure \
ac_cv_working_gettimeofday=yes \
$MOCPARAM \
FREECIV_LABEL_FORCE="<base>-crs" \
CPPFLAGS="-I${DLLSPATH}/include -D_WIN32_WINNT=${MIN_WINVER}" \
CFLAGS="-Wno-error" \
CXXFLAGS="${CXXFLAGS}" \
PKG_CONFIG_LIBDIR="${DLLSPATH}/lib/pkgconfig" \
--enable-sys-tolua-cmd \
--with-magickwand="${DLLSPATH}/bin" \
--prefix="/" \
$GITREVP \
--enable-client=$CLIENTS \
--enable-fcmp=$FCMP \
--enable-debug \
--host=$TARGET \
--build=$(${SRC_ROOT}/bootstrap/config.guess) \
--with-libiconv-prefix=${DLLSPATH} \
--with-sqlite3-prefix=${DLLSPATH} \
--with-followtag="crosser" \
--enable-crosser \
${AIS} \
--disable-freeciv-manual \
--enable-sdl-mixer=sdl2 \
${QTPARAMS} \
--with-tinycthread \
--without-readline \
--enable-server=$SERVER \
--enable-ruledit=$RULEDIT \
$EXTRA_CONFIG
then
echo "Configure failed" >&2
exit 1
fi
rm -R "$INSTALL_DIR"
# Make each of 'clean', build, and 'install' in separate steps as
# relying on install to depend on all the build activities was not always working.
if ! make $MAKE_PARAMS DESTDIR="$INSTALL_DIR" clean
then
echo "Make clean failed" >&2
exit 1
fi
if ! make $MAKE_PARAMS DESTDIR="$INSTALL_DIR"
then
echo "Build failed" >&2
exit 1
fi
if ! make $MAKE_PARAMS DESTDIR="$INSTALL_DIR" install
then
echo "Make install failed" >&2
exit 1
fi
if ! cp gen_headers/fc_config.h $INSTALL_DIR/share/freeciv/ ; then
echo "Storing fc_config.h failed" >&2
exit 1
fi
if ! cp $DLLSPATH/crosser.txt $INSTALL_DIR/share/freeciv/ ; then
echo "Storing crosser.txt failed" >&2
exit 1
fi
if ! cp $DLLSPATH/ComponentVersions.txt $INSTALL_DIR/share/freeciv/CrosserComponents.txt ; then
echo "Storing CrosserComponents.txt failed" >&2
exit 1
fi
) then
exit 1
fi
if ! mkdir -p autotools/output ; then
echo "Creating autotools/output directory failed" >&2
exit 1
fi
if ! 7z a -r autotools/output/freeciv-${VERREV}${NAMEP}.7z \
freeciv-${VERREV}${NAMEP}
then
echo "7z failed" >&2
exit 1
fi
(2-2/2)