hopefully finally fixed

This commit is contained in:
Agel committed 2026-11-13 14:07:56 +01:00
1 parent 1c83b4cb6b
commit fb65fadad6
4 files changed
+20 -71

No files matched your search

+1 -1
View File
@@ -97,7 +97,7 @@ packaging/package-windows.sh build-windows-arm64 /opt/qt/6.12.0/mingw_arm64 /opt
```
### Linux Build Environment (Ubuntu 24.04 — x86_64 & ARM64)
Setup via `sudo scripts/install-deps-ubuntu.sh` (add `--with-arm64` to also install Ubuntu `arm64` multiarch packages and `linux_gcc_arm64` Qt 6.12.0; CI targets also use `--skip-qt`, `--only-arm64`, and `--prune-qt`):
Setup via `sudo scripts/install-deps-ubuntu.sh` (add `--with-arm64` to also install Ubuntu `arm64` multiarch packages and `linux_gcc_arm64` Qt 6.12.0; CI targets also use `--skip-qt` and `--only-arm64`):
```bash
# Native x86_64 build & tests
cmake -S . -B build -G Ninja \
+17 -13
View File
@@ -47,17 +47,7 @@ RUN apt-get update -qq && \
&& rm -rf /tmp/aqt-venv \
&& rm -rf \
"${QT_LINUX_DIR}/doc" \
"${QT_LINUX_DIR}/examples" \
"${QT_LINUX_DIR}/phrasebooks" \
"${QT_LINUX_DIR}/translations" \
"${QT_LINUX_DIR}/qml/QtQuick/LocalStorage" \
"${QT_LINUX_DIR}/qml/QtQuick/Particles" \
"${QT_LINUX_DIR}/qml/QtQuick/Pdf" \
"${QT_LINUX_DIR}/qml/QtQuick/Scene2D" \
"${QT_LINUX_DIR}/qml/QtQuick/Scene3D" \
"${QT_LINUX_DIR}/qml/QtQuick/Timeline" \
"${QT_LINUX_DIR}/qml/QtQuick/VirtualKeyboard" \
"${QT_LINUX_DIR}/qml/QtQuick/tooling"
"${QT_LINUX_DIR}/examples"
# ── gitlab-runner (shell executor) ─────────────────────────────────────────────
RUN wget -q https://gitlab-runner-downloads.s3.amazonaws.com/latest/binaries/gitlab-runner-linux-amd64 \
@@ -119,8 +109,10 @@ ENV QT_LINUX_ARM64_DIR=${QT_INSTALL_DIR}/${QT_VERSION}/gcc_arm64
COPY scripts/install-deps-ubuntu.sh /tmp/install-deps-ubuntu.sh
RUN chmod +x /tmp/install-deps-ubuntu.sh && \
QT_VERSION=${QT_VERSION} QT_INSTALL_DIR=${QT_INSTALL_DIR} \
/tmp/install-deps-ubuntu.sh --only-arm64 --prune-qt && \
rm -rf /tmp/install-deps-ubuntu.sh /var/lib/apt/lists/* && \
/tmp/install-deps-ubuntu.sh --only-arm64 && \
rm -rf /tmp/install-deps-ubuntu.sh /var/lib/apt/lists/* \
"${QT_LINUX_ARM64_DIR}/doc" \
"${QT_LINUX_ARM64_DIR}/examples" && \
wget -q https://github.com/AppImage/type2-runtime/releases/download/continuous/runtime-aarch64 \
-O /opt/appimage/runtime-aarch64 && \
chmod +x /opt/appimage/runtime-aarch64
@@ -159,6 +151,12 @@ ENV MINGW_SYSROOT=${QT_WINDOWS_DIR}
COPY scripts/download-mingw-arm64-qt.py /tmp/download-mingw-arm64-qt.py
RUN chmod +x /tmp/download-mingw-arm64-qt.py && \
python3 /tmp/download-mingw-arm64-qt.py --arch x86_64 --dest "${QT_WINDOWS_DIR}" && \
rm -rf \
"${QT_WINDOWS_DIR}/share/doc" \
"${QT_WINDOWS_DIR}/share/man" \
"${QT_WINDOWS_DIR}/share/info" \
"${QT_WINDOWS_DIR}/share/qt6/doc" \
"${QT_WINDOWS_DIR}/share/qt6/examples" && \
ln -sfn "${QT_WINDOWS_DIR}" /opt/mingw-sysroot && \
rm /tmp/download-mingw-arm64-qt.py && \
x86_64-w64-mingw32-g++ --version
@@ -177,6 +175,12 @@ ENV MINGW_ARM64_SYSROOT=${QT_WINDOWS_ARM64_DIR}
COPY scripts/download-mingw-arm64-qt.py /tmp/download-mingw-arm64-qt.py
RUN chmod +x /tmp/download-mingw-arm64-qt.py && \
python3 /tmp/download-mingw-arm64-qt.py --arch arm64 --dest "${QT_WINDOWS_ARM64_DIR}" && \
rm -rf \
"${QT_WINDOWS_ARM64_DIR}/share/doc" \
"${QT_WINDOWS_ARM64_DIR}/share/man" \
"${QT_WINDOWS_ARM64_DIR}/share/info" \
"${QT_WINDOWS_ARM64_DIR}/share/qt6/doc" \
"${QT_WINDOWS_ARM64_DIR}/share/qt6/examples" && \
ln -sfn "${QT_WINDOWS_ARM64_DIR}" /opt/mingw-arm64-sysroot && \
rm /tmp/download-mingw-arm64-qt.py && \
aarch64-w64-mingw32-g++ --version
-30
View File
@@ -223,34 +223,6 @@ def download_and_extract_packages(resolved, repo, dest_dir):
raise RuntimeError(f"Failed to extract {filename}: {err}")
def prune_sysroot(abs_dest):
# Remove docs, manuals, locales, translations, and examples
prune_dirs = [
os.path.join(abs_dest, "share", "doc"),
os.path.join(abs_dest, "share", "man"),
os.path.join(abs_dest, "share", "info"),
os.path.join(abs_dest, "share", "locale"),
os.path.join(abs_dest, "share", "qt6", "doc"),
os.path.join(abs_dest, "share", "qt6", "examples"),
os.path.join(abs_dest, "share", "qt6", "translations"),
os.path.join(abs_dest, "share", "qt6", "phrasebooks"),
]
for unused_qml in ("LocalStorage", "Particles", "Pdf", "Scene2D", "Scene3D", "Timeline", "VirtualKeyboard", "tooling"):
prune_dirs.append(os.path.join(abs_dest, "share", "qt6", "qml", "QtQuick", unused_qml))
for d in prune_dirs:
if os.path.isdir(d):
shutil.rmtree(d)
# Remove static .a archives when a corresponding .dll.a import library exists
lib_dir = os.path.join(abs_dest, "lib")
if os.path.isdir(lib_dir):
for dll_a in glob.glob(os.path.join(lib_dir, "*.dll.a")):
static_a = dll_a[: -len(".dll.a")] + ".a"
if os.path.isfile(static_a):
os.remove(static_a)
def configure_sysroot(dest_dir, repo):
abs_dest = os.path.abspath(dest_dir)
@@ -280,8 +252,6 @@ def configure_sysroot(dest_dir, repo):
if os.path.isdir(tools_dir):
shutil.rmtree(tools_dir)
prune_sysroot(abs_dest)
def verify_installation(dest_dir):
bin_dir = os.path.join(dest_dir, "bin")
+2 -27
View File
@@ -3,7 +3,7 @@
# Run with sudo or as root.
#
# Usage:
# sudo scripts/install-deps-ubuntu.sh [--with-arm64] [--only-arm64] [--skip-qt] [--prune-qt] [--with-sources]
# sudo scripts/install-deps-ubuntu.sh [--with-arm64] [--only-arm64] [--skip-qt] [--with-sources]
#
# Environment variables:
# QT_VERSION Qt version to install via aqtinstall (default: 6.12.0)
@@ -16,7 +16,6 @@ QT_INSTALL_DIR="${QT_INSTALL_DIR:-/opt/qt}"
WITH_ARM64=false
ONLY_ARM64=false
SKIP_QT=false
PRUNE_QT=false
WITH_SOURCES=false
for arg in "$@"; do
@@ -24,11 +23,10 @@ for arg in "$@"; do
--with-arm64) WITH_ARM64=true ;;
--only-arm64) ONLY_ARM64=true; WITH_ARM64=true ;;
--skip-qt) SKIP_QT=true ;;
--prune-qt) PRUNE_QT=true ;;
--with-sources) WITH_SOURCES=true ;;
*)
echo "Unknown option: $arg" >&2
echo "Usage: $0 [--with-arm64] [--only-arm64] [--skip-qt] [--prune-qt] [--with-sources]" >&2
echo "Usage: $0 [--with-arm64] [--only-arm64] [--skip-qt] [--with-sources]" >&2
exit 1
;;
esac
@@ -176,26 +174,6 @@ if [ "$WITH_ARM64" = true ] && [ "$HOST_ARCH" = "amd64" ]; then
pkg-config --exists minizip libarchive
fi
prune_qt_dir() {
local qt_dir="$1"
if [ ! -d "$qt_dir" ]; then
return
fi
rm -rf \
"$qt_dir/doc" \
"$qt_dir/examples" \
"$qt_dir/phrasebooks" \
"$qt_dir/translations" \
"$qt_dir/qml/QtQuick/LocalStorage" \
"$qt_dir/qml/QtQuick/Particles" \
"$qt_dir/qml/QtQuick/Pdf" \
"$qt_dir/qml/QtQuick/Scene2D" \
"$qt_dir/qml/QtQuick/Scene3D" \
"$qt_dir/qml/QtQuick/Timeline" \
"$qt_dir/qml/QtQuick/VirtualKeyboard" \
"$qt_dir/qml/QtQuick/tooling"
}
QT_NATIVE_DIR="${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64"
if [ "$HOST_ARCH" = "arm64" ]; then
QT_NATIVE_DIR="${QT_INSTALL_DIR}/${QT_VERSION}/gcc_arm64"
@@ -209,19 +187,16 @@ if [ "$SKIP_QT" = false ]; then
if [ "$HOST_ARCH" = "arm64" ]; then
/tmp/aqt-venv/bin/aqt install-qt linux_arm64 desktop "${QT_VERSION}" linux_gcc_arm64 \
-m qtimageformats --outputdir "${QT_INSTALL_DIR}"
[ "$PRUNE_QT" = true ] && prune_qt_dir "${QT_INSTALL_DIR}/${QT_VERSION}/gcc_arm64"
else
if [ "$ONLY_ARM64" = false ]; then
/tmp/aqt-venv/bin/aqt install-qt linux desktop "${QT_VERSION}" linux_gcc_64 \
-m qtimageformats --outputdir "${QT_INSTALL_DIR}"
[ "$PRUNE_QT" = true ] && prune_qt_dir "${QT_INSTALL_DIR}/${QT_VERSION}/gcc_64"
fi
if [ "$WITH_ARM64" = true ]; then
echo "==> Installing Qt ${QT_VERSION} (Linux arm64) via aqtinstall -> ${QT_INSTALL_DIR}..."
/tmp/aqt-venv/bin/aqt install-qt linux_arm64 desktop "${QT_VERSION}" linux_gcc_arm64 \
-m qtimageformats --outputdir "${QT_INSTALL_DIR}"
[ "$PRUNE_QT" = true ] && prune_qt_dir "${QT_INSTALL_DIR}/${QT_VERSION}/gcc_arm64"
fi
fi