summaryrefslogtreecommitdiff
path: root/gui/build.sh
diff options
context:
space:
mode:
Diffstat (limited to 'gui/build.sh')
-rwxr-xr-xgui/build.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/gui/build.sh b/gui/build.sh
index 080b1fe..8b336fa 100755
--- a/gui/build.sh
+++ b/gui/build.sh
@@ -15,6 +15,7 @@ QTBUILD=build/qt
RELEASE=$QTBUILD/release
PLATFORM=$(uname -s)
+LDFLAGS=""
if [ "$TARGET" == "" ]
then
@@ -51,10 +52,14 @@ function buildGoLib {
CGO_CFLAGS="-g -O2 -mmacosx-version-min=$OSX_TARGET"
CGO_LDFLAGS="-g -O2 -mmacosx-version-min=$OSX_TARGET"
fi
+ if [ "$PLATFORM" == "MINGW64_NT-10.0" ]
+ then
+ LDFLAGS="-H=windowsgui"
+ fi
if [ "$XBUILD" == "no" ]
then
echo "[+] Building Go library with standard Go compiler"
- 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
+ CGO_ENABLED=1 GOOS=$GOOS CC=$CC CGO_CFLAGS=$CGO_CFLAGS CGO_LDFLAGS=$CGO_LDFLAGS go build -ldflags $LDFLAGS -buildmode=c-archive -o $TARGET_GOLIB $SOURCE_GOLIB
fi
if [ "$XBUILD" == "$WIN64" ]
then
@@ -85,6 +90,10 @@ function renameOutput {
mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/
echo "[+] App is in" $RELEASE/$TARGET
fi
+ if [ "$PLATFORM" == "MINGW64_NT-10.0" ]
+ then
+ mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe
+ fi
}
echo "[+] Building BitmaskVPN"