diff --git a/bitmask.pro b/bitmask.pro index fcedd75f9bfb6ea93213c96f419833094118d9ee..db675ab111af049bebbe8e079b33398c99d7c494 100644 --- a/bitmask.pro +++ b/bitmask.pro @@ -1,5 +1,4 @@ -# FIXME: this should be overwritten by build templates -TARGET=riseup-vpn +#TARGET = $$BINARY_NAME CONFIG += qt staticlib windows:CONFIG += console diff --git a/build.sh b/build.sh index 56b4c68f84e21aab50789038570e79f2d4554af3..1ded17ed33923f45d947b54e94dd86dae88f4b0d 100755 --- a/build.sh +++ b/build.sh @@ -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