From 163f14df408febb1fe92f4ddeffdfe933164b87f Mon Sep 17 00:00:00 2001 From: kali Date: Tue, 13 Oct 2020 19:03:29 +0200 Subject: [pkg] add golib target to makefile - Resolves: #363 --- gui/build.sh | 48 ++++++++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 10 deletions(-) (limited to 'gui/build.sh') diff --git a/gui/build.sh b/gui/build.sh index deb73a1..c3d1699 100755 --- a/gui/build.sh +++ b/gui/build.sh @@ -20,6 +20,7 @@ VENDOR_PATH=${VENDOR_PATH-providers/riseup} PLATFORM=$(uname -s) LDFLAGS="" +BUILD_GOLIB="yes" if [ "$TARGET" == "" ] then @@ -45,7 +46,6 @@ function init { mkdir -p lib } -# TODO this should be moved to the makefile function buildGoLib { echo "[+] Using go in" $GO "[`go version`]" $GO generate ./pkg/config/version/genver/gen.go @@ -101,16 +101,44 @@ function renameOutput { fi } -echo "[+] Building BitmaskVPN" +function buildDefault { + echo "[+] Building BitmaskVPN" + lrelease bitmask.pro + if [ "$BUILD_GOLIB" == "yes" ] + then + buildGoLib + fi + buildQmake -lrelease bitmask.pro + make -C $QTBUILD clean + make -C $QTBUILD -j4 all + + renameOutput + echo "[+] Done." +} -# FIXME move buildGoLib to the main makefile, to avoid redundant builds if possible -buildGoLib -buildQmake -make -C $QTBUILD clean -make -C $QTBUILD -j4 all +for i in "$@" +do +case $i in + --skip-golib) + BUILD_GOLIB="no" + shift # past argument=value + ;; + --just-golib) + BUILD_GOLIB="just" + shift # past argument=value + ;; + *) + # unknown option + ;; +esac +done + +if [ "$BUILD_GOLIB" == "just" ] +then + buildGoLib +else + buildDefault +fi -renameOutput -echo "[+] Done." -- cgit v1.2.3