-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
38 lines (25 loc) · 827 Bytes
/
Copy pathmain.py
File metadata and controls
38 lines (25 loc) · 827 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
31
32
33
34
35
36
37
38
"""ReinstallSafe entry point.
Run with: uv run main.py
"""
from __future__ import annotations
import sys
from PyQt6.QtGui import QIcon
from PyQt6.QtWidgets import QApplication
from app.main_window import MainWindow
from app.styles import load_stylesheet
from app.utils.paths import app_icon_path
def main() -> int:
if sys.platform != "win32":
raise SystemExit("ReinstallSafe is a Windows-only backup/restore tool.")
app = QApplication(sys.argv)
app.setApplicationName("ReinstallSafe")
app.setOrganizationName("ReinstallSafe")
app.setStyleSheet(load_stylesheet())
icon_path = app_icon_path()
if icon_path.exists():
app.setWindowIcon(QIcon(str(icon_path)))
window = MainWindow()
window.show()
return app.exec()
if __name__ == "__main__":
sys.exit(main())