2022-09-15 00:24:08 +02:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
|
|
TAG=$1
|
|
|
|
|
if test -z "$TAG"; then
|
2024-11-01 14:12:34 +01:00
|
|
|
echo "Missing required argument 'TAG'"
|
2022-09-15 00:24:08 +02:00
|
|
|
exit
|
|
|
|
|
fi
|
|
|
|
|
echo "Based on Qt version $TAG" >> /etc/versions
|
|
|
|
|
source /etc/profile
|
2024-11-01 14:12:34 +01:00
|
|
|
export NINJA_STATUS='[%u/%r/%f] '
|
2022-09-15 00:24:08 +02:00
|
|
|
|
2022-11-28 11:15:07 +01:00
|
|
|
function checkout (
|
2022-12-14 16:29:38 +01:00
|
|
|
repo=$1
|
2022-11-28 11:15:07 +01:00
|
|
|
(cd /usr/local/cache
|
2022-12-14 16:29:38 +01:00
|
|
|
if ! test -d $repo.git; then
|
|
|
|
|
git clone --bare https://code.qt.io/qt/$repo.git
|
2023-01-15 16:52:50 +01:00
|
|
|
fi)
|
|
|
|
|
(cd ~builduser
|
|
|
|
|
if git clone -l /usr/local/cache/$repo.git -b $TAG
|
|
|
|
|
then
|
|
|
|
|
echo ".. OK"
|
|
|
|
|
else
|
|
|
|
|
echo "Calling exit"
|
|
|
|
|
exit 1
|
|
|
|
|
fi)
|
2022-11-28 11:15:07 +01:00
|
|
|
)
|
2022-09-15 00:24:08 +02:00
|
|
|
|
2022-11-28 11:15:07 +01:00
|
|
|
# The QtBase builds are different.
|
2024-11-01 14:12:34 +01:00
|
|
|
QTBASE_FLAGS="-no-widgets \
|
|
|
|
|
-no-dbus \
|
|
|
|
|
-no-feature-testlib \
|
|
|
|
|
-no-feature-sql \
|
|
|
|
|
-no-feature-xml \
|
|
|
|
|
-no-feature-networkproxy \
|
|
|
|
|
-no-feature-socks5 \
|
|
|
|
|
-no-feature-brotli \
|
|
|
|
|
-no-feature-dnslookup \
|
|
|
|
|
-no-feature-topleveldomain \
|
|
|
|
|
-no-feature-textmarkdownreader \
|
|
|
|
|
-no-feature-textmarkdownwriter \
|
|
|
|
|
-no-feature-textodfwriter"
|
|
|
|
|
# on qtbase flags:
|
|
|
|
|
# I checked and noticed that colornames are required (qml fails to load otherwise)
|
|
|
|
|
# the cssparser is also required for properly loading svgs.
|
2024-01-26 20:50:06 +01:00
|
|
|
|
2024-11-01 14:12:34 +01:00
|
|
|
checkout qtbase
|
2024-12-15 22:06:31 +01:00
|
|
|
cd ~builduser
|
2025-08-02 13:45:24 +02:00
|
|
|
patch -d qtbase -p1 < /usr/local/bin/qtbase-revert-qtranslator.patch
|
2022-11-28 11:15:07 +01:00
|
|
|
mkdir -p ~builduser/build/qtbase
|
2023-10-31 22:08:21 +01:00
|
|
|
cd ~builduser/build/qtbase
|
2022-09-15 00:24:08 +02:00
|
|
|
~builduser/qtbase/configure \
|
|
|
|
|
-prefix /usr/local \
|
|
|
|
|
-no-openssl \
|
|
|
|
|
-nomake examples \
|
2024-11-01 14:12:34 +01:00
|
|
|
$QTBASE_FLAGS
|
2023-10-31 22:08:21 +01:00
|
|
|
cmake --build . --parallel
|
|
|
|
|
cmake --install .
|
2022-11-28 11:15:07 +01:00
|
|
|
rm -rf ~builduser/build/*
|
2022-09-15 00:24:08 +02:00
|
|
|
|
|
|
|
|
### Android build
|
|
|
|
|
mkdir -p ~builduser/build/qtbase
|
|
|
|
|
cd ~builduser/build/qtbase
|
|
|
|
|
~builduser/qtbase/configure \
|
|
|
|
|
-platform android-clang \
|
|
|
|
|
-prefix /opt/android-qt6/ \
|
|
|
|
|
-android-ndk /opt/android-ndk \
|
|
|
|
|
-android-sdk /opt/android-sdk \
|
|
|
|
|
-qt-host-path /usr/local \
|
|
|
|
|
-android-abis arm64-v8a \
|
|
|
|
|
-android-style-assets \
|
|
|
|
|
-openssl-linked \
|
2024-11-01 14:12:34 +01:00
|
|
|
$QTBASE_FLAGS \
|
2022-09-15 00:24:08 +02:00
|
|
|
-- \
|
|
|
|
|
-DOPENSSL_USE_STATIC_LIBS=ON \
|
|
|
|
|
-DOPENSSL_ROOT_DIR=/opt/android-ssl
|
2023-10-31 22:08:21 +01:00
|
|
|
cmake --build . --parallel
|
|
|
|
|
cmake --install .
|
2022-11-28 11:15:07 +01:00
|
|
|
rm -rf ~builduser/build/*
|
2024-12-15 22:06:31 +01:00
|
|
|
rm -rf ~builduser/qtbase
|
2022-09-15 00:24:08 +02:00
|
|
|
|
2022-11-28 11:15:07 +01:00
|
|
|
# All the others.
|
|
|
|
|
for i in qtshadertools qtdeclarative qtsvg qtmultimedia
|
2022-09-15 00:24:08 +02:00
|
|
|
do
|
2022-11-28 11:15:07 +01:00
|
|
|
checkout $i
|
|
|
|
|
mkdir -p ~builduser/build/$i
|
|
|
|
|
cd ~builduser/build/$i
|
2024-11-01 14:12:34 +01:00
|
|
|
CONF=""
|
2024-12-15 22:06:31 +01:00
|
|
|
if test "$i" = "qtdeclarative"; then
|
|
|
|
|
CONF=" \
|
|
|
|
|
-no-feature-quick-tableview \
|
|
|
|
|
-no-feature-quick-treeview \
|
|
|
|
|
-no-feature-qml-xmllistmodel \
|
|
|
|
|
-no-feature-quick-designer \
|
|
|
|
|
-no-feature-qml-network \
|
|
|
|
|
-no-feature-qml-preview \
|
|
|
|
|
-no-feature-qml-worker-script \
|
|
|
|
|
-no-feature-quick-animatedimage \
|
|
|
|
|
-no-feature-quicktemplates2-calendar \
|
|
|
|
|
-no-feature-quickcontrols2-ios \
|
|
|
|
|
-no-feature-quickcontrols2-macos \
|
|
|
|
|
-no-feature-quickcontrols2-windows \
|
|
|
|
|
-no-feature-quickcontrols2-fluentwinui3 \
|
|
|
|
|
-no-feature-quickcontrols2-universal \
|
|
|
|
|
-no-feature-quickcontrols2-imagine \
|
|
|
|
|
-no-feature-quickcontrols2-fusion \
|
|
|
|
|
-no-feature-qml-debug \
|
|
|
|
|
-no-feature-qml-profiler \
|
|
|
|
|
-no-feature-qml-ssl \
|
|
|
|
|
-no-feature-qml-xml-http-request \
|
|
|
|
|
-no-feature-quick-pixmap-cache-threaded-download \
|
|
|
|
|
-no-feature-qml-table-model \
|
|
|
|
|
"
|
|
|
|
|
fi
|
2024-11-01 14:12:34 +01:00
|
|
|
/usr/local/bin/qt-configure-module ~builduser/$i $CONF
|
2023-10-31 22:08:21 +01:00
|
|
|
cmake --build . --parallel
|
|
|
|
|
cmake --install .
|
2022-11-28 11:15:07 +01:00
|
|
|
cd ~builduser
|
|
|
|
|
rm -rf build/*
|
|
|
|
|
|
|
|
|
|
# Android
|
|
|
|
|
mkdir -p ~builduser/build/$i
|
|
|
|
|
cd ~builduser/build/$i
|
2024-11-01 14:12:34 +01:00
|
|
|
/opt/android-qt6/bin/qt-configure-module ~builduser/$i $CONF
|
2024-12-15 22:06:31 +01:00
|
|
|
cmake --build . --parallel && cmake --install .
|
2022-11-28 11:15:07 +01:00
|
|
|
cd ~builduser
|
|
|
|
|
rm -rf build/*
|
2024-12-15 22:06:31 +01:00
|
|
|
rm -rf $i
|
2022-09-15 00:24:08 +02:00
|
|
|
done
|
2022-11-10 16:42:34 +01:00
|
|
|
|