#!/usr/bin/env bash # Install the ISOLATED Qt 5.14.2 toolchain into .qt514/ DIRECTLY ON THE HOST # (no Docker), using a local venv for aqtinstall. The host already has the right # toolchain (gcc 13.3, cmake 3.28); this just fetches Qt files into the repo. # # Usage: tools/install_qt_host.sh # Prefer this over docker_install_qt.sh when you don't need a container. # Verified: a binary built against .qt514/ links ONLY to .qt514/ (ldd shows 0 # system-Qt refs) and runs on the host with tools/run_qt.sh. set -euo pipefail REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)" VENV="$REPO_ROOT/.venv-aqt" QT_VERSION="5.14.2" if [ ! -x "$VENV/bin/aqt" ]; then echo ">> Creating local venv with aqtinstall at $VENV ..." python3 -m venv "$VENV" --system-site-packages "$VENV/bin/pip" install --quiet aqtinstall fi echo ">> Installing Qt ${QT_VERSION} gcc_64 into $REPO_ROOT/.qt514/ ..." "$VENV/bin/aqt" install-qt linux desktop "${QT_VERSION}" gcc_64 -O "$REPO_ROOT/.qt514" QT_ROOT="$REPO_ROOT/.qt514/${QT_VERSION}/gcc_64" echo ">> Verify:" "$QT_ROOT/bin/qmake" -query QT_VERSION echo ">> Qt installed at: $QT_ROOT" echo ">> Build on host: cmake -S . -B build -G Ninja -DBUILD_QT_PART=ON -DCMAKE_PREFIX_PATH='$QT_ROOT' && cmake --build build" echo ">> Run Qt targets: tools/run_qt.sh "