#!/usr/bin/python3
# @file
# @ingroup camcom_testbench
# @copyright
#   SPDX-FileCopyrightText: 2026 European Southern Observatory (ESO)
#   SPDX-License-Identifier: LGPL-3.0-only

"""
CamCom GUI Launcher

This script launches the CamCom GUI application.
"""

import sys
import os

# Add the share directory to the path so we can import the camcom.gui package
script_dir = os.path.dirname(os.path.abspath(__file__))
install_prefix = os.path.dirname(script_dir)
share_dir = os.path.join(install_prefix, "share", "camcom")

if share_dir not in sys.path:
    sys.path.insert(0, share_dir)

try:
    from camcom.gui import main
except ImportError as e:
    print(f"Error: Could not import camcom.gui package: {e}")
    print(f"Looking in: {share_dir}")
    print("Please ensure the GUI package is properly installed.")
    sys.exit(1)

if __name__ == "__main__":
    main()
