#!/usr/bin/env bash # Install the ISOLATED Qt 5.14.2 toolchain into the repo at .qt514/ using the # build container (keeps the host free of aqtinstall deps; Qt files land on the # host filesystem via the mount so the host can build/run against them later). # # Usage: tools/docker/docker_install_qt.sh # Idempotent: re-running refreshes/repairs the install. set -euo pipefail REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/../.." && pwd)" IMAGE_TAG="qt-course:builder" QT_DEST="/workspace/.qt514" QT_VERSION="5.14.2" if ! docker image inspect "$IMAGE_TAG" >/dev/null 2>&1; then echo ">> image ${IMAGE_TAG} not found; building it first." >&2 "$REPO_ROOT/tools/docker/docker_build_image.sh" fi mkdir -p "$REPO_ROOT/.qt514" echo ">> Installing Qt ${QT_VERSION} gcc_64 into $REPO_ROOT/.qt514/ (via container)..." docker run --rm \ -v "$REPO_ROOT:/workspace" \ "$IMAGE_TAG" \ aqt install-qt linux desktop "${QT_VERSION}" gcc_64 -O "${QT_DEST}" # Verify on the host (no container needed for this read). QT_ROOT="$REPO_ROOT/.qt514/${QT_VERSION}/gcc_64" echo ">> Verify (host):" "$QT_ROOT/bin/qmake" -query QT_VERSION echo ">> Qt installed at: $QT_ROOT" echo ">> Now build with: tools/docker/docker_build.sh (or host cmake, see README)"