From 2cf32806dcce2d41920be28bd0e7d12e5d049357 Mon Sep 17 00:00:00 2001 From: kali Date: Mon, 27 Jul 2020 18:18:38 +0200 Subject: [pkg] update build script for openvpn --- gui/backend.go | 1 + gui/build.sh | 13 +++++++++++-- gui/main.cpp | 6 ------ 3 files changed, 12 insertions(+), 8 deletions(-) (limited to 'gui') 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 @@ -97,12 +97,6 @@ int main(int argc, char **argv) { "main", "Install helpers (linux only, requires sudo)."), }, - { - {"v", "version"}, - QApplication::translate( - "main", - "Version of the bitmask-vpn."), - }, { {"o", "obfs4"}, QApplication::translate( -- cgit v1.2.3