summaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorkali <kali@leap.se>2020-07-27 18:18:38 +0200
committerRuben Pollan <meskio@sindominio.net>2020-10-13 19:08:40 +0200
commit2cf32806dcce2d41920be28bd0e7d12e5d049357 (patch)
tree5ecad10f0c2804ab0ded8380431490e475f57998 /gui
parent211fc457329b074fd4331aec0c4fc5d765e9023f (diff)
[pkg] update build script for openvpn
Diffstat (limited to 'gui')
-rw-r--r--gui/backend.go1
-rwxr-xr-xgui/build.sh13
-rw-r--r--gui/main.cpp6
3 files changed, 12 insertions, 8 deletions
diff --git a/gui/backend.go b/gui/backend.go
index 9453d88..f8ee2bd 100644
--- a/gui/backend.go
+++ b/gui/backend.go
@@ -3,6 +3,7 @@ package main
/* a wrapper around bitmask that exposes status to a QtQml gui.
Have a look at the pkg/backend module for further enlightment. */
+// #cgo CXXFLAGS: -mmacosx-version-min=10.10
import (
"C"
"unsafe"
diff --git a/gui/build.sh b/gui/build.sh
index 91be4fc..9c10341 100755
--- a/gui/build.sh
+++ b/gui/build.sh
@@ -1,6 +1,6 @@
#!/bin/bash
set -e
-
+set -x
XBUILD=${XBUILD-no}
WIN64="win64"
@@ -30,6 +30,7 @@ else
fi
fi
+PLATFORM=`uname -s`
function init {
mkdir -p lib
@@ -38,10 +39,18 @@ function init {
function buildGoLib {
echo "[+] Using go in" $GO "[`go version`]"
$GO generate ./pkg/config/version/genver/gen.go
+ if [ "$PLATFORM" == "Darwin" ]
+ then
+ OSX_TARGET=10.12
+ GOOS=darwin
+ CC=clang
+ CGO_CFLAGS="-g -O2 -mmacosx-version-min=$OSX_TARGET"
+ CGO_LDFLAGS="-g -O2 -mmacosx-version-min=$OSX_TARGET"
+ fi
if [ "$XBUILD" == "no" ]
then
echo "[+] Building Go library with standard Go compiler"
- CGO_ENABLED=1 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB
+ CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB
fi
if [ "$XBUILD" == "$WIN64" ]
then
diff --git a/gui/main.cpp b/gui/main.cpp
index a177e60..684b0be 100644
--- a/gui/main.cpp
+++ b/gui/main.cpp
@@ -98,12 +98,6 @@ int main(int argc, char **argv) {
"Install helpers (linux only, requires sudo)."),
},
{
- {"v", "version"},
- QApplication::translate(
- "main",
- "Version of the bitmask-vpn."),
- },
- {
{"o", "obfs4"},
QApplication::translate(
"main",