This repository was archived by the owner on Jan 14, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathrun.py
More file actions
72 lines (51 loc) · 1.54 KB
/
run.py
File metadata and controls
72 lines (51 loc) · 1.54 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
"""
Elite Editor Entry Point
Launch the main application
"""
import sys
import logging
from pathlib import Path
logging.basicConfig(
level=logging.INFO,
format="%(asctime)s - %(name)s - %(levelname)s - %(message)s"
)
logger = logging.getLogger(__name__)
sys.path.insert(0, str(Path(__file__).parent))
def setup_windows_app_id():
try:
if sys.platform != "win32":
return False
import ctypes
from core.paths import PathManager
paths = PathManager.instance()
icon_path = paths.app_icon_file
if icon_path.exists():
ctypes.windll.shell32.SetCurrentProcessExplicitAppUserModelID(
"EliteEditor.App"
)
logger.info(f"Windows app ID set using {icon_path}")
return True
except Exception:
return False
return False
def main():
try:
from PySide6.QtWidgets import QApplication
from core.app import EliteEditorApp
setup_windows_app_id()
app = QApplication(sys.argv)
window = EliteEditorApp()
window.show()
logger.info("Elite Editor started successfully")
sys.exit(app.exec())
except ImportError as e:
logger.error(str(e))
print(f"Error: {e}")
print("Install dependencies with: pip install -r requirements.txt or check for local import errors")
sys.exit(1)
except Exception as e:
logger.exception(str(e))
print(f"Fatal error: {e}")
sys.exit(1)
if __name__ == "__main__":
main()