-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathmain.py
More file actions
33 lines (24 loc) · 883 Bytes
/
Copy pathmain.py
File metadata and controls
33 lines (24 loc) · 883 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
import sys
import os
from pathlib import Path
# ── CRITICAL: Always run from the project directory ───────────────────────────
# This ensures data/, config/, and profiles/ are created INSIDE cybersolu-dm-engine/
# and not in whatever folder the user launched python from.
os.chdir(Path(__file__).parent)
# Ensure local imports work correctly when packaged
sys.path.append(os.path.abspath(os.path.dirname(__file__)))
from PyQt6.QtWidgets import QApplication
from PyQt6.QtGui import QIcon
from data.db import init_db
from gui.main_window import MainWindow
def main():
# Initialize SQLite schema
init_db()
app = QApplication(sys.argv)
app.setStyle("Fusion")
# Run the Main window
window = MainWindow()
window.show()
sys.exit(app.exec())
if __name__ == "__main__":
main()