#!/bin/bash set -e # Check if .envrc exists if [ ! -f .envrc ]; then echo "ERROR: .envrc not found in current directory" echo "Please create .envrc with required environment variables (e.g., MIGRATE_PIPELINE_ROOT)" exit 1 fi # Load environment variables from .envrc set -a source .envrc set +a # Run CMake configuration and build inside Docker docker run --rm \ -e MIGRATE_PIPELINE_ROOT \ -e LANG \ -e LC_ALL \ -v ${MIGRATE_PIPELINE_ROOT}:/workspace \ -v ${MIGRATE_PIPELINE_ROOT}/rti_license.dat:/workspace/rti_license.dat \ -w /workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus \ ubuntu:26.04 bash -c " apt-get update -qq && \ apt-get install -y -qq \ build-essential \ cmake \ libkf6texttemplate-dev \ libqt6core6 \ libqt6gui6 \ libqt6widgets6 \ qt6-base-dev \ qt6-tools-dev-tools \ qt6-tools-dev \ qt6-l10n-tools \ libgtest-dev \ libpq-dev \ postgresql-server-dev-all \ git > /dev/null 2>&1 # Set RTI license export RTI_LICENSE_FILE=/workspace/rti_license.dat # Qt6 is installed via apt - CMake finds it automatically in /usr/lib/x86_64-linux-gnu/cmake # Clean and configure rm -rf build4 mkdir -p build4 cd build4 cmake .. \ -DBUILD_RTI=ON \ -DBUILD_ARCGIS=OFF \ -DCMAKE_CXX_STANDARD=17 make -j8 ddscore ddsftccore ddsQoS ddsconnector ddsfts 2>&1 | tee build.log "