diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2020-09-15 16:30:40 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2020-09-25 12:36:09 +0200 |
commit | 6d234d0e6cde42917ee3477062e136fc73aff92f (patch) | |
tree | 9b40d96b4ced8f0c9fd757875bde16aa82523be2 /build.sh | |
parent | bbc227c82fe6a60462d496ae052f954613651824 (diff) |
[pkg] pass target name to the build script
Diffstat (limited to 'build.sh')
-rwxr-xr-x | build.sh | 13 |
1 files changed, 12 insertions, 1 deletions
@@ -10,6 +10,12 @@ PROJECT=bitmask.pro TARGET_GOLIB=lib/libgoshim.a SOURCE_GOLIB=gui/backend.go +RELEASE=qtbuild/release + +if [ "$TARGET" == "" ] +then + TARGET=riseup-vpn +fi if [ "$XBUILD" == "$WIN64" ] then @@ -40,7 +46,7 @@ function buildGoLib { if [ "$XBUILD" == "$WIN64" ] then echo "[+] Building Go library with mxe" - echo ">> using cc:" $CC + echo "[+] Using cc:" $CC CC=$CC CGO_ENABLED=1 GOOS=windows GOARCH=amd64 go build -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB fi } @@ -59,3 +65,8 @@ buildGoLib buildQmake make -C qtbuild clean make -C qtbuild -j4 all + +# i would expect that passing QMAKE_TARGET would produce the right output, but nope. +mv qtbuild/release/bitmask $RELEASE/$TARGET +strip $RELEASE/$TARGET +echo "[+] Binary is in" $RELEASE/$TARGET |