Project

General

Profile

Feature #27 » 0016-installer_cross-Drop-Qt5-support.patch

S3_1 - Marko Lindqvist, 12/05/2023 06:49 AM

View differences:

windows/installer_cross/build_all_installers.sh
RET=0
if grep "CROSSER_QT5" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
then
CROSSER_QT5=yes
fi
if grep "CROSSER_QT6" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
then
CROSSER_QT6=yes
......
GTK322="Success"
fi
if test "${CROSSER_QT5}" != "yes" ; then
QT5="N/A"
elif ! ./installer_build.sh "${DLLSPATH}" qt5 ; then
RET=1
QT5="Fail"
else
QT5="Success"
fi
if test "${CROSSER_QT6}" != "yes" ; then
QT6="N/A"
elif ! ./installer_build.sh "${DLLSPATH}" qt6 ; then
......
echo "Gtk3.22: ${GTK322}"
echo "Gtk4: ${GTK4}"
echo "Qt5: ${QT5}"
echo "Qt6: ${QT6}"
echo "Sdl2: ${SDL2}"
echo "Ruledit: ${RULEDIT}"
exit $RET
exit ${RET}
windows/installer_cross/installer_build.sh
cp $1/bin/SDL2_ttf.dll $2/
}
add_qt5_env() {
cp -R $1/qt5/plugins $2/ &&
cp $1/bin/Qt5Core.dll $2/ &&
cp $1/bin/Qt5Gui.dll $2/ &&
cp $1/bin/Qt5Widgets.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_qt6_env() {
cp -R $1/qt6/plugins $2/ &&
cp $1/bin/Qt6Core.dll $2/ &&
......
GUINAME="GTK3.22"
MPGUI="gtk3"
FCMP="gtk3" ;;
qt5)
GUINAME="Qt5"
CLIENT="qt"
MPGUI="qt"
FCMP="qt" ;;
qt6)
GUINAME="Qt6"
CLIENT="qt"
......
echo "Copying SDL2 environment failed!" >&2
exit 1
fi ;;
qt5)
if ! cp freeciv-ruledit.cmd $INSTDIR/
then
echo "Adding cmd-file failed!" >&2
exit 1
fi
if ! add_qt5_env $DLLSPATH $INSTDIR ; then
echo "Copying Qt5 environment failed!" >&2
exit 1
fi ;;
qt6)
if ! cp freeciv-ruledit.cmd $INSTDIR/
if ! cp freeciv-ruledit.cmd "${INSTDIR}/"
then
echo "Adding cmd-file failed!" >&2
exit 1
fi
if ! add_qt6_env $DLLSPATH $INSTDIR ; then
if ! add_qt6_env "${DLLSPATH}" "${INSTDIR}" ; then
echo "Copying Qt6 environment failed!" >&2
exit 1
fi ;;
......
exit 1
fi
else
if test "x$GUI" = "xqt5" || test "x$GUI" = "xqt6" ; then
if test "x$GUI" = "xqt6" ; then
EXE_ID="qt"
else
EXE_ID="$GUI"
windows/installer_cross/meson-winbuild.sh
GUI="$2"
if test "$GUI" != "gtk3.22" && test "$GUI" != "gtk4" &&
test "$GUI" != "sdl2" &&
test "$GUI" != "qt5" && test "$GUI" != "qt6" &&
test "$GUI" != "ruledit" ; then
if test "${GUI}" != "gtk3.22" && test "${GUI}" != "gtk4" &&
test "${GUI}" != "sdl2" &&
test "${GUI}" != "qt6" &&
test "${GUI}" != "ruledit" ; then
echo "Unknown gui \"$2\"" >&2
exit 1
fi
......
RULEDIT=false ;;
sdl2) FCMP="gtk4"
RULEDIT=false ;;
qt5) CLIENT="qt"
FCMP="qt"
RULEDIT=true
QTPARAMS="-Dqtver=qt5" ;;
qt6) CLIENT="qt"
FCMP="qt"
RULEDIT=true
windows/installer_cross/winbuild.sh
SETUP=$(grep "CrosserSetup=" $DLLSPATH/crosser.txt | sed -e 's/CrosserSetup="//' -e 's/"//')
# Make this Qt5/Qt6 or Qt-client/Ruledit specific as upstream updates
# Make this Qt-client/Ruledit specific as upstream updates
# to Qt headers allow. Currently needed in all cases.
CXXFLAGS="-Wno-error=attributes"
......
SINGLE_GUI=true
GUIP="-$2"
SERVER="yes"
if test "x$2" = "xqt5" || test "x$2" = "xqt6" ; then
if test "x$2" = "xqt6" ; then
RULEDIT="yes"
CLIENTS="qt"
else
......
sdl2) FCMP="gtk4" ;;
gtk3.22) FCMP="gtk3" ;;
gtk4) FCMP="gtk4" ;;
qt5) FCMP="qt"
QTVER="Qt5" ;;
qt6) FCMP="qt"
QTVER="Qt6"
MIN_WINVER="0x0A00" ;; # Qt6 requires Win10 anyway
......
exit 1
fi
if test "$SINGLE_GUI" != "true" || test "$2" = "ruledit" ; then
if grep "CROSSER_QT6" $DLLSPATH/crosser.txt | grep yes > /dev/null
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
if test "${SINGLE_GUI}" = "true" ; then
# Build is ONLY about Qt6 programs
MIN_WINVER="0x0A00" # Qt6 requires Win10 anyway
fi
elif grep "CROSSER_QT5" $DLLSPATH/crosser.txt | grep yes > /dev/null
then
QT5="yes"
QTVER="Qt5"
fi
fi
if test "$SINGLE_GUI" != "true" ; then
if test "$QT5" = "yes" || test "$QT6" = "yes"
if test "${SINGLE_GUI}" != "true" ; then
if test "${QT6}" = "yes"
then
CLIENTS="$CLIENTS,qt"
FCMP="$FCMP,qt"
CLIENTS="${CLIENTS},qt"
FCMP="${FCMP},qt"
fi
fi
if test "x$QTVER" = "xQt5" ; then
QTPARAMS="--with-qtver=Qt5 --with-qt5-includes=${DLLSPATH}/qt5/include --with-qt5-libs=${DLLSPATH}/lib"
MOC_CROSSER="${DLLSPATH}/bin/moc"
elif test "x$QTVER" = "xQt6"; then
if test "x$QTVER" = "xQt6"; 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 "Building for ${SETUP}"
echo "Freeciv version ${VERREV}"
echo "Clients: ${CLIENTS}"
echo "----------------------------------"
export CC="$TARGET-gcc -static-libgcc -static-libstdc++"
(2-2/2)