Feature #27 » 0024-installer_cross-Drop-Qt5-support.patch
platforms/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}
|
platforms/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 "$GUI" = "qt5" || test "$GUI" = "qt6" ; then
|
||
if test "${GUI}" = "qt6" ; then
|
||
EXE_ID="qt"
|
||
else
|
||
EXE_ID="$GUI"
|
||
EXE_ID="${GUI}"
|
||
fi
|
||
if test "$GUI" = "gtk3.22" || test "$GUI" = "gtk4" ; then
|
||
UNINSTALLER="helpers/uninstaller-helper-gtk3.sh"
|
platforms/windows/installer_cross/meson-build_all_installers.sh | ||
---|---|---|
CROSSER_QT6=yes
|
||
fi
|
||
if grep "CROSSER_QT5" "${DLLSPATH}/crosser.txt" | grep yes > /dev/null
|
||
then
|
||
CROSSER_QT5=yes
|
||
fi
|
||
if ! ./meson-installer_build.sh "${DLLSPATH}" gtk3.22 ; then
|
||
RET=1
|
||
GTK322="Fail"
|
||
... | ... | |
QT6="Success"
|
||
fi
|
||
if test "${CROSSER_QT5}" != "yes" ; then
|
||
QT5="N/A"
|
||
elif ! ./meson-installer_build.sh "${DLLSPATH}" qt5 ; then
|
||
RET=1
|
||
QT5="Fail"
|
||
else
|
||
QT5="Success"
|
||
fi
|
||
# sdl2-client comes with gtk4 modpack installer
|
||
if test "${CROSSER_GTK4}" != "yes" ; then
|
||
SDL2="N/A"
|
||
... | ... | |
echo "Gtk4: ${GTK4}"
|
||
echo "Gtk4x: ${GTK4x}"
|
||
echo "Qt6: ${QT6}"
|
||
echo "Qt5: ${QT5}"
|
||
echo "Sdl2: ${SDL2}"
|
||
echo "Ruledit: ${RULEDIT}"
|
||
exit $RET
|
||
exit ${RET}
|
platforms/windows/installer_cross/meson-installer_build.sh | ||
---|---|---|
cp ./helpers/installer-helper-qt.cmd $2/bin/installer-helper.cmd
|
||
}
|
||
add_qt5_env() {
|
||
add_glib_env $1 $2 &&
|
||
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_sdl2_env() {
|
||
cp $1/bin/SDL2_image.dll $2/ &&
|
||
cp $1/bin/SDL2_ttf.dll $2/
|
||
... | ... | |
CLIENT="qt"
|
||
MPGUI="qt"
|
||
FCMP="qt" ;;
|
||
qt5)
|
||
GUINAME="Qt5"
|
||
CLIENT="qt"
|
||
MPGUI="qt"
|
||
FCMP="qt" ;;
|
||
ruledit)
|
||
;;
|
||
*)
|
||
... | ... | |
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
|
||
;;
|
||
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
|
||
;;
|
||
esac
|
||
if test "$GUI" = "qt5" || test "$GUI" = "qt6" ; then
|
||
if test "${GUI}" = "qt6" ; then
|
||
EXE_ID="qt"
|
||
else
|
||
EXE_ID="$GUI"
|
||
EXE_ID="${GUI}"
|
||
fi
|
||
if test "$GUI" = "gtk3.22" || test "$GUI" = "gtk4" ||
|
platforms/windows/installer_cross/meson-winbuild.sh | ||
---|---|---|
if test "${GUI}" != "gtk3.22" && test "${GUI}" != "gtk4" &&
|
||
test "${GUI}" != "gtk4x" &&
|
||
test "${GUI}" != "sdl2" &&
|
||
test "${GUI}" != "qt5" && test "${GUI}" != "qt6" &&
|
||
test "${GUI}" != "qt6" &&
|
||
test "${GUI}" != "ruledit" ; then
|
||
echo "Unknown gui \"$2\"" >&2
|
||
exit 1
|
||
... | ... | |
gtk4) FCMP="gtk4" ;;
|
||
gtk4x) FCMP="gtk4x" ;;
|
||
sdl2) FCMP="gtk4" ;;
|
||
qt5) CLIENT="qt"
|
||
FCMP="qt"
|
||
TOOLS="${TOOLS},ruledit"
|
||
QTPARAMS="-Dqtver=qt5" ;;
|
||
qt6) CLIENT="qt"
|
||
FCMP="qt"
|
||
TOOLS="${TOOLS},ruledit"
|
platforms/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="-client-$2"
|
||
SERVER="yes"
|
||
if test "$2" = "qt5" || test "$2" = "qt6" ; then
|
||
if test "$2" = "qt6" ; 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 "$QTVER" = "Qt5" ; then
|
||
QTPARAMS="--with-qtver=Qt5 --with-qt5-includes=${DLLSPATH}/qt5/include --with-qt5-libs=${DLLSPATH}/lib"
|
||
MOC_CROSSER="${DLLSPATH}/bin/moc"
|
||
elif test "$QTVER" = "Qt6"; then
|
||
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 "Building for ${SETUP}"
|
||
echo "Freeciv version ${VERREV}"
|
||
echo "Clients: ${CLIENTS}"
|
||
echo "----------------------------------"
|
||
export CC="$TARGET-gcc -static-libgcc -static-libstdc++"
|