Show splash screen on app start. Only supported on Windows, Linux

This commit is contained in:
Debanjum Singh Solanky
2022-08-18 20:50:25 +03:00
parent 0079c13bf7
commit 60dacf3f2c
3 changed files with 72 additions and 24 deletions

View File

@@ -67,6 +67,18 @@ def run():
# Start Application
server.start()
gui.aboutToQuit.connect(server.terminate)
# Close Splash Screen if still open
if system() != 'Darwin':
try:
import pyi_splash
# Update the text on the splash screen
pyi_splash.update_text("Khoj setup complete")
# Close Splash Screen
pyi_splash.close()
except:
pass
gui.exec()