#!/usr/bin/env bash
# Launch the ISOLATED Qt Creator 4.11.0 installed into .qt514/Tools/QtCreator
# (period-matched to the isolated Qt 5.14.2 SDK), wired to open this repo's
# CMakeLists.txt against .qt514/ by default.
#   Usage: tools/run_qtcreator.sh [args...]
# -settingspath keeps this Creator's config separate from any system/other
# Qt Creator install on the host (avoids config-format crashes across versions).
set -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
QT_ROOT="$REPO_ROOT/.qt514/5.14.2/gcc_64"
CREATOR_BIN="$REPO_ROOT/.qt514/Tools/QtCreator/bin/qtcreator"
export CMAKE_PREFIX_PATH="$QT_ROOT${CMAKE_PREFIX_PATH:+:$CMAKE_PREFIX_PATH}"
exec "$CREATOR_BIN" -settingspath "$REPO_ROOT/.qt514/qtcreator-settings" "$@"
