pyLyricFlow/run.py
stan44 e0f298ba36 Add LyricFlow .NET backend API and Python bridge integration
- introduce `LyricFlow.Core.Backend` with shared DTOs, rhyme/spellcheck engines, and REST endpoints
- wire Python GUI/core to run and call the backend via new bridge/client modules
- add backend parity/integration tests and update packaging/ignore settings
2026-03-15 01:44:56 -05:00

42 lines
980 B
Python

import sys
from pathlib import Path
# MARK: - Import Bootstrap
PROJECT_ROOT = Path(__file__).resolve().parent
if not getattr(sys, "frozen", False):
sys.path.insert(0, str(PROJECT_ROOT))
from src.gui.main_window import MainWindow
from src.gui.backend_runner import BackendRunner
from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import QCoreApplication
# MARK: - Application Entry Point
def main():
app = QApplication(sys.argv)
QCoreApplication.setOrganizationName("LyricFlow")
QCoreApplication.setOrganizationDomain("lyricflow.local")
QCoreApplication.setApplicationName("LyricFlow")
backend_runner = BackendRunner()
try:
backend_runner.start()
except Exception as e:
print(f"Failed to start C# backend: {e}")
window = MainWindow()
window.show()
exit_code = app.exec()
# Cleanup backend
backend_runner.stop()
sys.exit(exit_code)
if __name__ == "__main__":
main()