#!/usr/bin/env bash # Install all development dependencies for asteria-qt on macOS. # Requires Homebrew (https://brew.sh) and Xcode Command Line Tools. # Run as a normal user (sudo is used only where needed). set -euo pipefail brew update brew install cmake ninja pkg-config uchardet minizip libarchive gitlab-runner echo "" echo "Installing Qt 6.12.0 via aqtinstall → /opt/qt ..." python3 -m venv /tmp/aqt-venv /tmp/aqt-venv/bin/pip install --quiet aqtinstall # Qt for macOS ships as a universal binary (arm64 + x86_64); aqtinstall installs to "macos" QT_ARCH="clang_64" QT_DIR_NAME="macos" sudo mkdir -p /opt/qt sudo chown "$USER" /opt/qt /tmp/aqt-venv/bin/aqt install-qt mac desktop 6.12.0 "$QT_ARCH" \ -m qtimageformats qtpdf --outputdir /opt/qt /tmp/aqt-venv/bin/aqt install-src mac 6.12.0 --outputdir /opt/qt rm -rf /tmp/aqt-venv QT_DIR="/opt/qt/6.12.0/$QT_DIR_NAME" echo "" echo "All dependencies installed." echo "" echo "Qt 6.12.0 is at $QT_DIR" echo "" echo "Build with:" echo " PKG_CONFIG_PATH=\"\$(brew --prefix libarchive)/lib/pkgconfig:\$PKG_CONFIG_PATH\" \\" echo " cmake --fresh -B build -G Ninja -DCMAKE_BUILD_TYPE=Debug -DCMAKE_PREFIX_PATH=$QT_DIR" echo " cmake --build build --parallel" echo " ctest --test-dir build --output-on-failure"