From a126d333e0d83d44d7306c3ddb9008c7e4df41c7 Mon Sep 17 00:00:00 2001 From: "kali kaneko (leap communications)" Date: Thu, 4 Jun 2020 16:25:04 +0200 Subject: [feat] pickled helpers ftw Signed-off-by: kali kaneko (leap communications) --- gui/backend.go | 6 ++++++ gui/main.cpp | 6 ++++++ 2 files changed, 12 insertions(+) (limited to 'gui') 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); -- cgit v1.2.3