summaryrefslogtreecommitdiff
path: root/go/android_build_shapeshifter.sh
diff options
context:
space:
mode:
authorcyBerta <cyberta@riseup.net>2019-10-11 14:33:39 +0200
committercyBerta <cyberta@riseup.net>2019-10-11 14:33:39 +0200
commit84f9b697d1417c6308c3a4be9d1c2d01d26a88bf (patch)
tree6834a01733e7facfccf65b5d56577624dc839e7d /go/android_build_shapeshifter.sh
parent01cb332a9d89d79aafec479e267ae5bd644693f8 (diff)
move installation of gomobile to install_go.sh
Diffstat (limited to 'go/android_build_shapeshifter.sh')
-rwxr-xr-xgo/android_build_shapeshifter.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/go/android_build_shapeshifter.sh b/go/android_build_shapeshifter.sh
index 85204906..7a884689 100755
--- a/go/android_build_shapeshifter.sh
+++ b/go/android_build_shapeshifter.sh
@@ -61,6 +61,12 @@ else
exit 1;
fi
+ if [[ ! -f ./bin/gomobile && $BUILD_LIBRARY == true ]]; then
+ echo "gomobile not installed"
+ echo please run "install_go.sh first"
+ exit 1
+ fi
+
# Our targets are x86, x86_64, armeabi, armeabi-v7a, armv8;
# To remove targets, simply delete them from the bracket.
# NOTE: We are only currently shipping the armeabi-v7a binary
@@ -122,7 +128,10 @@ else
echo "Starting compilation for $suffix..."
if [[ BUILD_LIBRARY ]]; then
- ./android_build_shapeshifter_lib.sh || quit "Failed to cross-compile shapeshifter-dispatcher-library"
+ echo "cross compiling shapeshifter lib..."
+ ./bin/gomobile bind -target=android -o ./lib/shapeshifter.aar se.leap.bitmaskclient/shapeshifter/
+ cp lib/shapeshifter* ../shapeshifter/.
+ #./android_build_shapeshifter_lib.sh || quit "Failed to cross-compile shapeshifter-dispatcher-library"
else
./golang/go/bin/go build -buildmode=pie -ldflags '-w -s -extldflags=-pie' -o ./out/${suffix}/piedispatcher github.com/OperatorFoundation/shapeshifter-dispatcher/shapeshifter-dispatcher || quit "Failed to cross-compile shapeshifter-dispatcher"