29 lines
617 B
Python
29 lines
617 B
Python
# main.py
|
|
import sys
|
|
import json
|
|
import os
|
|
from PySide6.QtWidgets import QApplication
|
|
from pirc_setup_wizard import PIRCSetupWizard
|
|
from pirc_client import PIRCClient
|
|
|
|
CONFIG_FILE = "pirc_config.json"
|
|
|
|
def main():
|
|
app = QApplication(sys.argv)
|
|
|
|
# Check if config exists
|
|
if not os.path.exists(CONFIG_FILE):
|
|
wizard = PIRCSetupWizard()
|
|
if wizard.exec() != 0:
|
|
pass # Wizard handled saving config
|
|
else:
|
|
print("Setup cancelled.")
|
|
sys.exit(0)
|
|
|
|
client = PIRCClient()
|
|
client.show()
|
|
sys.exit(app.exec())
|
|
|
|
if __name__ == "__main__":
|
|
main()
|