diff --git a/deemix-pyweb.py b/deemix-pyweb.py index f40af23..674407a 100644 --- a/deemix-pyweb.py +++ b/deemix-pyweb.py @@ -1,8 +1,8 @@ #!/usr/bin/env python3 -from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QDialog, QVBoxLayout +from PyQt5.QtWidgets import QApplication, QMainWindow, QFileDialog, QDialog, QVBoxLayout, QSplashScreen from PyQt5.QtWebEngineWidgets import QWebEngineView, QWebEnginePage, QWebEngineProfile from PyQt5.QtCore import QUrl, pyqtSignal -from PyQt5.QtGui import QIcon +from PyQt5.QtGui import QIcon, QPixmap import json import webbrowser @@ -224,9 +224,11 @@ if __name__ == '__main__': dev = '--dev' in sys.argv if not server: + app = QApplication([]) + splash = QSplashScreen(QPixmap(path.join(appDir, 'splash.png'))) configFolder = portable or getConfigFolder() x,y,w,h = get_position() - app = QApplication([]) + splash.show() window = MainWindow('deemix', 'http://'+url+':'+str(port), x,y,w,h) t = Thread(target=run_server, args=(port, url, portable, window)) else: @@ -238,6 +240,7 @@ if __name__ == '__main__': while not url_ok(url, port): sleep(1) window.showWindow() + splash.finish(window) app.exec_() conn = HTTPConnection(url, port) conn.request('GET', '/shutdown') diff --git a/deemix-pyweb.spec b/deemix-pyweb.spec index 0713f69..3512844 100644 --- a/deemix-pyweb.spec +++ b/deemix-pyweb.spec @@ -15,7 +15,7 @@ sys.modules['FixTk'] = None a = Analysis(['deemix-pyweb.py'], binaries=[], - datas=[('webui/public', 'webui'), ('icon.ico', '.'), ('version.txt', '.')], + datas=[('webui/public', 'webui'), ('icon.ico', '.'), ('splash.png', '.'), ('version.txt', '.')], hiddenimports=['PyQt5', 'engineio.async_drivers.threading', 'pkg_resources.py2_warn', 'eventlet.hubs.epolls', 'eventlet.hubs.kqueue', 'eventlet.hubs.selects', 'dns', 'dns.dnssec', 'dns.e164', 'dns.hash', 'dns.namedict', 'dns.tsigkeyring', 'dns.update', 'dns.version', 'dns.zone'], hookspath=[], runtime_hooks=[], diff --git a/splash.png b/splash.png new file mode 100755 index 0000000..4f139db Binary files /dev/null and b/splash.png differ