Added qt as fallback if gtk is not installed on linux

This commit is contained in:
RemixDev 2020-07-07 14:27:39 +02:00
parent 28213b55da
commit 18a5bb760d
4 changed files with 18 additions and 4 deletions

View file

@ -84,9 +84,18 @@ if __name__ == '__main__':
'persist_session_cookies': True,
'cache_path': configFolder
})
webview.start(gui='cef', debug=True)
webview.start(gui='cef')
if sys.platform == "linux":
try:
from gi import require_version as rv
rv('WebKit2', '4.0')
print("Starting with GTK")
webview.start()
except ValueError:
print("Starting with QT")
webview.start(gui='qt')
else:
webview.start(debug=True)
webview.start()
conn = HTTPConnection(url, port)
conn.request('GET', '/shutdown')
t.join()

View file

@ -1,5 +1,5 @@
deemix>=1.1.2
flask
flask-socketio
pywebview==3.3.1
pywebview>=3.3.1
cefpython3; platform_system == "Windows"

2
requirements_gtk.txt Normal file
View file

@ -0,0 +1,2 @@
-r requirements.txt
PyGObject

3
requirements_qt.txt Normal file
View file

@ -0,0 +1,3 @@
-r requirements.txt
PyQt5
pyqtwebengine