diff options
author | kali kaneko (leap communications) <kali@leap.se> | 2021-05-01 14:45:13 +0200 |
---|---|---|
committer | kali kaneko (leap communications) <kali@leap.se> | 2021-05-04 14:59:17 +0200 |
commit | fe34e6b7447059f25c6c6cbc00d70e597c0e2d37 (patch) | |
tree | fb86c9a453a3d17e1fe111564fa8f48a6b3465a1 /gui/build.sh | |
parent | 161a9cf7f4acf14090224b85997f8651e45a144b (diff) |
[pkg] build snap from scratch
this is mainly a workaround for #497
Diffstat (limited to 'gui/build.sh')
-rwxr-xr-x | gui/build.sh | 28 |
1 files changed, 19 insertions, 9 deletions
diff --git a/gui/build.sh b/gui/build.sh index 0a6e681..56e3d66 100755 --- a/gui/build.sh +++ b/gui/build.sh @@ -6,6 +6,7 @@ set -e # -------------------- XBUILD=${XBUILD-no} +LRELEASE=${LRELEASE-lrelease} VENDOR_PATH=${VENDOR_PATH-providers/riseup} OSX_TARGET=10.11 @@ -18,6 +19,7 @@ SOURCE_GOLIB=gui/backend.go QTBUILD=build/qt RELEASE=$QTBUILD/release +DEBUGP=$QTBUILD/debug PLATFORM=$(uname -s) LDFLAGS="" @@ -75,29 +77,37 @@ function buildQmake { echo "[+] Now building Qml app with Qt qmake" echo "[+] Using qmake in:" $QMAKE mkdir -p $QTBUILD - $QMAKE -o "$QTBUILD/Makefile" CONFIG-=debug CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT + $QMAKE -o "$QTBUILD/Makefile" CONFIG+=release VENDOR_PATH=${VENDOR_PATH} $PROJECT + #CONFIG=+force_debug_info CONFIG+=debug CONFIG+=debug_and_release } function renameOutput { # i would expect that passing QMAKE_TARGET would produce the right output, but nope. if [ "$PLATFORM" == "Linux" ] then - mv $RELEASE/bitmask $RELEASE/$TARGET - strip $RELEASE/$TARGET - echo "[+] Binary is in" $RELEASE/$TARGET + if [ "$DEBUG" == "1" ] + then + echo "[+] Selecting DEBUG build" + mv $DEBUGP/bitmask $RELEASE/$TARGET + else + echo "[+] Selecting RELEASE build" + mv $RELEASE/bitmask $RELEASE/$TARGET + strip $RELEASE/$TARGET + fi + echo "[+] Binary is in" $RELEASE/$TARGET elif [ "$PLATFORM" == "Darwin" ] then - rm -rf $RELEASE/$TARGET.app - mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/ - echo "[+] App is in" $RELEASE/$TARGET + rm -rf $RELEASE/$TARGET.app + mv $RELEASE/bitmask.app/ $RELEASE/$TARGET.app/ + echo "[+] App is in" $RELEASE/$TARGET else # for MINGWIN or CYGWIN - mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe + mv $RELEASE/bitmask.exe $RELEASE/$TARGET.exe fi } function buildDefault { echo "[+] Building BitmaskVPN" - lrelease bitmask.pro + $LRELEASE bitmask.pro if [ "$BUILD_GOLIB" == "yes" ] then buildGoLib |