-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
31 lines (24 loc) · 817 Bytes
/
main.py
File metadata and controls
31 lines (24 loc) · 817 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
import sys
import os
import logging
# Ensure src is in path if needed (though local import should work)
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
from src.app import App
from src.utils.logger import setup_logging
if __name__ == "__main__":
# Check for debug flag
debug_mode = "--debug" in sys.argv
setup_logging(debug_mode=debug_mode)
try:
try:
from ctypes import windll
myappid = 'romifleur.v2.gui'
windll.shell32.SetCurrentProcessExplicitAppUserModelID(myappid)
except ImportError:
pass
logging.info("Starting Romifleur...")
app = App()
app.run()
except Exception as e:
logging.critical("Unhandled exception caused crash", exc_info=True)
sys.exit(1)