Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/install_arcgis.sh
berrux-dev 598fc2560e Complete Qt6 migration: full clean build green across groups G1-G12 incl. runtime plugin set
new_docker_build.sh gains Group 12 (212 GUI/Data plugins); fixes LtsUtilsGuiDds visibility (LTO-stripped exports), LtsProjectionWorkstation unity name shadow, 6 unity-off dirs (dup file-scope statics, ddsftc INTERFACE sources) and reconfigures BUILD_FILTERMANAGEMENT/BUILD_PLUGINS_SERVICEMONITOR=ON
2026-10-20 09:36:57 +02:00

83 lines
3.4 KiB
Bash
Executable File

#!/bin/bash
# install_arcgis.sh - Install/setup ArcGIS Runtime SDK for Qt in Docker container
# This script prepares the ArcGIS SDK for use with Qt6 builds
set -e
ARCGIS_SRC="/workspace/external/ArcGIS"
ARCGIS_DEST="/workspace/qt-migration-legatus/qt6-after/qt6-migrated-legatus/external/ArcGIS"
echo "=== ArcGIS SDK Setup ==="
echo "Source: ${ARCGIS_SRC}"
echo "Destination: ${ARCGIS_DEST}"
# Check if source exists
if [ ! -d "${ARCGIS_SRC}" ]; then
echo "ERROR: ArcGIS SDK not found at ${ARCGIS_SRC}"
echo "Make sure the SDK is mounted in the Docker container"
exit 1
fi
# Create destination directory if needed
mkdir -p "$(dirname ${ARCGIS_DEST})"
# Remove existing symlink/directory if it exists
if [ -e "${ARCGIS_DEST}" ]; then
echo "Removing existing ArcGIS SDK at ${ARCGIS_DEST}"
rm -rf "${ARCGIS_DEST}"
fi
# Create symlink to the SDK
echo "Creating symlink: ${ARCGIS_DEST} -> ${ARCGIS_SRC}"
ln -s "${ARCGIS_SRC}" "${ARCGIS_DEST}"
# Verify the SDK structure
SDK_PATH="${ARCGIS_DEST}/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/qt300.0.0/sdk"
if [ -d "${SDK_PATH}" ]; then
echo "✓ ArcGIS SDK found at: ${SDK_PATH}"
echo " Include dir: ${SDK_PATH}/include"
echo " Library dir: ${SDK_PATH}/linux/x64/lib"
# List available libraries
echo " Available libraries:"
ls -lh "${SDK_PATH}/linux/x64/lib/" | grep -E '\.(so|a)$' || true
else
echo "WARNING: Expected SDK structure not found at ${SDK_PATH}"
echo "Available contents:"
ls -la "${ARCGIS_DEST}/" || true
fi
# Run configure.sh to properly set up the SDK
# According to README.txt, this is required after extracting/copying the SDK
# It (a) headlessly accepts the Esri Master License Agreement and (b) writes
# $HOME/.config/EsriRuntimeQt/ArcGIS Runtime SDK for Qt 300.0.0.ini with the
# InstallDir. The ArcGIS runtime reads that ini at startup; without it the 300
# SDK refuses to initialize and the Situation map view will not load.
CONFIGURE_SCRIPT="${ARCGIS_DEST}/MapsSDK_Qt_300.0.0/ArcGIS_Maps_SDK_Qt_300.0.0/configure.sh"
if [ -x "${CONFIGURE_SCRIPT}" ]; then
echo "=== Running ArcGIS SDK Configuration ==="
echo "Running configure.sh with -a flag to accept EULA for headless install"
# Run configure.sh with -a to accept EULA automatically (headless install)
# The -np flag skips postInstall.sh which integrates with Qt Creator
# Remove -np if Qt Creator integration is needed.
#
# configure.sh is mounted read-only (new_docker_build.sh mounts external:ro),
# so its `sed -i` on ideintegration/*.pri (Qt Creator IDE patching only) fails
# with "Read-only file system" and exits 1. That step is NOT used by the CMake
# build (which consumes ArcGISRuntime.cmake, not the .pri files), and the
# runtime .ini is written to $HOME before it runs. So treat a non-zero exit
# as a warning, not fatal, or the whole build aborts before cmake.
if ! "${CONFIGURE_SCRIPT}" -a -np; then
echo "WARNING: configure.sh returned non-zero (expected: sed -i on the read-only external mount fails)."
echo " The runtime .ini (InstallDir) was written to \$HOME before that step; the .pri"
echo " patching is Qt Creator-only and not needed for the CMake build. Continuing."
else
echo "✓ ArcGIS SDK configuration complete"
fi
else
echo "WARNING: configure.sh not found or not executable at ${CONFIGURE_SCRIPT}"
echo "SDK may not be properly configured for use"
fi
echo "=== ArcGIS SDK Setup Complete ==="