-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmp_installer.py
More file actions
44 lines (32 loc) · 978 Bytes
/
mp_installer.py
File metadata and controls
44 lines (32 loc) · 978 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
39
40
41
42
43
44
'''
MP Installer
Linux
Need to package separately for Ubuntu 22.04 and 24.04 / Mint 22
What about other versions of linux?
Windows
'''
import time
start_time = time.time()
import sys
import os
from PyQt6.QtWidgets import QApplication
# START GUI
from matchypatchy.gui import MainWindow, AlertPopup
from matchypatchy.database import mpdb
from matchypatchy import config
from matchypatchy.algo import models
os.environ["CHROMA_TELEMETRY"] = "FALSE"
def main():
app = QApplication(sys.argv)
cfg = config.initiate()
mpDB = mpdb.MatchyPatchyDB(cfg['DB_DIR'])
window = MainWindow(mpDB)
window.show()
if not mpDB.key:
dialog = AlertPopup(window, prompt='Existing database contains an error. Please select a valid database in the configuration settings.')
if dialog.exec():
del dialog
print(f"Startup took {time.time() - start_time:.2f} seconds")
sys.exit(app.exec())
if __name__ == "__main__":
main()