Files
qt-migration-legatus/qt6-after/qt6-migrated-legatus/install_arcgis.sh
T

68 lines
2.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
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_SCRIPT}" -a -np
echo "✓ ArcGIS SDK configuration complete"
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 ==="