diff options
Diffstat (limited to 'gui')
-rw-r--r-- | gui/backend.go | 6 | ||||
-rw-r--r-- | gui/main.cpp | 6 |
2 files changed, 12 insertions, 0 deletions
diff --git a/gui/backend.go b/gui/backend.go index 812258d..ecff8dc 100644 --- a/gui/backend.go +++ b/gui/backend.go @@ -14,6 +14,7 @@ import ( "unsafe" "0xacab.org/leap/bitmask-vpn/pkg/bitmask" + "0xacab.org/leap/bitmask-vpn/pkg/pickle" "0xacab.org/leap/bitmask-vpn/pkg/systray2" "github.com/jmshal/go-locale" "golang.org/x/text/message" @@ -337,6 +338,11 @@ func RefreshContext() *C.char { return C.CString(string(c)) } +//export InstallHelpers +func InstallHelpers() { + pickle.InstallHelpers() +} + /* end of the exposed api */ /* we could enable this one optionally for the qt tests */ diff --git a/gui/main.cpp b/gui/main.cpp index f2545d3..3e96761 100644 --- a/gui/main.cpp +++ b/gui/main.cpp @@ -65,6 +65,12 @@ int main(int argc, char **argv) { bool debugQml = getEnv("DEBUG_QML_DATA") == "yes"; + if (argc > 1 && strcmp(argv[1], "install-helpers") == 0) { + qDebug() << "Will try to install helpers with sudo"; + InstallHelpers(); + exit(0); + } + QGuiApplication::setAttribute(Qt::AA_EnableHighDpiScaling); QGuiApplication app(argc, argv); app.setQuitOnLastWindowClosed(false); |