From 4fcf3d15e5b57c6c1dffd8e7c0cd5b84fda93138 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Parm=C3=A9nides=20GV?= Date: Thu, 24 Oct 2013 11:06:44 +0200 Subject: compile.sh compiles openvpn binaries if necessary. --- README.md | 44 ++++++++++++++++++++++++++++++++++++++++++++ compile-native-openvpn.sh | 14 ++++++++++++++ compile-with-ndk.sh | 16 ---------------- compile.sh | 8 ++++++++ 4 files changed, 66 insertions(+), 16 deletions(-) create mode 100644 README.md create mode 100755 compile-native-openvpn.sh delete mode 100755 compile-with-ndk.sh diff --git a/README.md b/README.md new file mode 100644 index 00000000..61f9346d --- /dev/null +++ b/README.md @@ -0,0 +1,44 @@ +# Bitmask Android App + +This repository contains the source code for the [Bitmask][https://bitmask.net/] Android app. + +Please see the [issues](https://github.com/leapcode/bitmask_android/issues) section to +report any bugs or feature requests and to see the list of known issues. + +## License + +* [See LICENSE file](https://github.com/leapcode/bitmask_android/blob/master/LICENSE.txt) + +## Building + +The build requires [Ant](https://ant.apache.org/) v1.6+, the [Android SDK](http://developer.android.com/sdk/index.html) and the [Android NDK](http://developer.android.com/tools/sdk/ndk/index.html) r8b +to be installed in your development environment. + +In addition you'll need ant/bin, android/tools, 'platforms-tools' and 'android-ndk-r8b' in your enviroment path. + +After satisfying those requirements, the build is pretty simple: + +* Run `./compile.sh` from the project directory to build the APK only + +You might find that your device doesn't let you install your build if you +already have the version from the Android Market installed. This is standard +Android security as it it won't let you directly replace an app that's been +signed with a different key. Manually uninstall Bitmask Android from your device and +you will then be able to install your own built version. +To uninstall it, do: adb uninstall se.leap.bitmaskclient + +See [here](https://github.com/leapcode/bitmask_android/blob/master/Building_from_eclipse.txt) for +instructions on building from [Eclipse](http://eclipse.org). + +## Acknowledgements + +This project uses code from [ics-openvpn project](https://code.google.com/p/ics-openvpn/). + +## Contributing + +Please fork this repository and contribute back using +[pull requests](https://github.com/leapcode/leap_android/pulls). + +Any contributions, large or small, major features, bug fixes, additional +language translations, unit/integration tests are welcomed and appreciated +but will be thoroughly reviewed and discussed. diff --git a/compile-native-openvpn.sh b/compile-native-openvpn.sh new file mode 100755 index 00000000..7b512631 --- /dev/null +++ b/compile-native-openvpn.sh @@ -0,0 +1,14 @@ +#!/bin/bash +function compile() { + svn co http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad + ./build-native.sh +} + +if command -v $(head -n 1 build-native.sh | column | cut -d ' ' -f 1); then + compile +elif command -v ndk-build; then + sed -i 's/.*ndk-build/ndk-build/g' build-native.sh + compile +else + echo "Install ndk, or modify build-native script to point to your ndk-build executable" +fi diff --git a/compile-with-ndk.sh b/compile-with-ndk.sh deleted file mode 100755 index f938afbf..00000000 --- a/compile-with-ndk.sh +++ /dev/null @@ -1,16 +0,0 @@ -#!/bin/bash -function compile() { - svn co http://google-breakpad.googlecode.com/svn/trunk/ google-breakpad - ./build-native.sh - android update project --path . --name "LEAP Android" --target android-16 - ant debug -} - -if command -v $(head -n 1 build-native.sh | column | cut -d ' ' -f 1); then - compile -elif command -v ndk-build; then - sed -i 's/.*ndk-build/ndk-build/g' build-native.sh - compile -else - echo "Install ndk, or modify build-native script to point to your ndk-build executable" -fi diff --git a/compile.sh b/compile.sh index 179440d0..1d9a4b60 100755 --- a/compile.sh +++ b/compile.sh @@ -1,3 +1,11 @@ #!/bin/bash +libopenvpn_so_files=`find libs -name libopenvpn.so | wc --lines` +libopvnutil_so_files=`find libs -name libopvpnutil.so | wc --lines` +minivpn_files=`find libs -name minivpn | wc --lines` +if [ $libopenvpn_so_files -lt 4 ] || [ $libopvnutil_so_files -lt 4 ] || [ $minivpn_files -lt 4 ]; +then + ./compile-native-openvpn.sh +fi + android update project --path . --name "Bitmask for Android" --target android-15 ant debug -- cgit v1.2.3