pyLyricFlow/run.py
2026-02-24 13:22:10 -06:00

30 lines
851 B
Python

import sys
import os
import nltk
# Add bundled nltk_data path if running as executable
if getattr(sys, 'frozen', False):
bundle_dir = sys._MEIPASS
nltk_data_path = os.path.join(bundle_dir, 'nltk_data')
if nltk_data_path not in nltk.data.path:
nltk.data.path.append(nltk_data_path)
# Add src to path
sys.path.insert(0, os.path.abspath(os.path.join(os.path.dirname(__file__), 'src')))
from gui.main_window import MainWindow
from PyQt6.QtWidgets import QApplication
from PyQt6.QtCore import QCoreApplication
def main():
app = QApplication(sys.argv)
QCoreApplication.setOrganizationName("LyricFlow")
QCoreApplication.setOrganizationDomain("lyricflow.local")
QCoreApplication.setApplicationName("LyricFlow")
window = MainWindow()
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()