"""Bootstrap del cliente desktop Runtime (PySide6).""" from __future__ import annotations import sys from pathlib import Path from PySide6.QtGui import QIcon from PySide6.QtWidgets import QApplication from vmssailor.shared.logging_setup import setup_logging from vmssailor.studio.theme import apply_theme from vmssailor.version import __version__ BRAND_ROOT = Path(__file__).resolve().parents[3] / "docs" / "brand" class RuntimeClientApp(QApplication): """QApplication del cliente Runtime.""" def __init__(self, argv: list[str] | None = None) -> None: super().__init__(argv or sys.argv) self.setOrganizationName("Aerom") self.setApplicationName("VMS-Sailor Runtime Client") self.setApplicationDisplayName("VMS-Sailor Runtime") self.setApplicationVersion(__version__) icon_svg = BRAND_ROOT / "favicon.svg" if icon_svg.exists(): self.setWindowIcon(QIcon(str(icon_svg))) apply_theme(self) def run_client(argv: list[str] | None = None) -> int: """Lanza el cliente Runtime y bloquea hasta que cierre.""" setup_logging() app = RuntimeClientApp(argv) from vmssailor.runtime.client.main_window import RuntimeClientWindow window = RuntimeClientWindow() window.resize(1440, 900) window.show() return app.exec() if __name__ == "__main__": sys.exit(run_client())