diff --git a/deemix_gui.py b/deemix_gui.py index 5b3c9c8..06c0c13 100644 --- a/deemix_gui.py +++ b/deemix_gui.py @@ -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() diff --git a/requirements.txt b/requirements.txt index 51d53c2..5336202 100644 --- a/requirements.txt +++ b/requirements.txt @@ -1,5 +1,5 @@ deemix>=1.1.2 flask flask-socketio -pywebview==3.3.1 -cefpython3; platform_system== "Windows" +pywebview>=3.3.1 +cefpython3; platform_system == "Windows" diff --git a/requirements_gtk.txt b/requirements_gtk.txt new file mode 100644 index 0000000..57e392c --- /dev/null +++ b/requirements_gtk.txt @@ -0,0 +1,2 @@ +-r requirements.txt +PyGObject diff --git a/requirements_qt.txt b/requirements_qt.txt new file mode 100644 index 0000000..525fdbf --- /dev/null +++ b/requirements_qt.txt @@ -0,0 +1,3 @@ +-r requirements.txt +PyQt5 +pyqtwebengine