diff --git a/selfdrive/ui/SConscript b/selfdrive/ui/SConscript index 938dd8b..2267cbb 100644 --- a/selfdrive/ui/SConscript +++ b/selfdrive/ui/SConscript @@ -92,7 +92,7 @@ qt_webengine_libs = qt_libs + ['Qt5WebEngineWidgets'] # Create clearpilot tools qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_shell", ["/data/openpilot/system/clearpilot/tools/qt_shell.cc"], LIBS=qt_libs) -# qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview", ["/data/openpilot/system/clearpilot/tools/qt_webview.cc"], LIBS=qt_webengine_libs) +qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview", ["/data/openpilot/system/clearpilot/tools/qt_webview.cc"], LIBS=qt_webengine_libs) qt_env.Program("/data/openpilot/system/clearpilot/tools/qt_webview2", ["/data/openpilot/system/clearpilot/tools/qt_webview2.cc"], LIBS=qt_webengine_libs) # build main UI diff --git a/system/clearpilot/tools/qt_webview.cc b/system/clearpilot/tools/qt_webview.cc index 3696836..3f2dcdf 100644 --- a/system/clearpilot/tools/qt_webview.cc +++ b/system/clearpilot/tools/qt_webview.cc @@ -11,11 +11,17 @@ #include #include #include +#include #include int main(int argc, char *argv[]) { + setenv("XDG_RUNTIME_DIR", "/var/tmp/weston", 1); + setenv("WAYLAND_DISPLAY", "wayland-0", 1); + setenv("QT_QPA_PLATFORM", "wayland", 1); + setenv("QT_WAYLAND_SHELL_INTEGRATION", "wl-shell", 1); + QApplication app(argc, argv); QCommandLineParser parser;