You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
59 lines
1.6 KiB
59 lines
1.6 KiB
8 years ago
|
#!/bin/bash
|
||
7 years ago
|
|
||
6 years ago
|
set -e
|
||
|
|
||
5 years ago
|
CONTRIB_ANDROID="$(dirname "$(readlink -e "$0")")"
|
||
|
ROOT_FOLDER="$CONTRIB_ANDROID"/../..
|
||
6 years ago
|
PACKAGES="$ROOT_FOLDER"/packages/
|
||
|
LOCALE="$ROOT_FOLDER"/electrum/locale/
|
||
|
|
||
|
if [ ! -d "$LOCALE" ]; then
|
||
6 years ago
|
echo "Run pull_locale first!"
|
||
6 years ago
|
exit 1
|
||
|
fi
|
||
|
|
||
|
if [ ! -d "$PACKAGES" ]; then
|
||
|
echo "Run make_packages first!"
|
||
|
exit 1
|
||
|
fi
|
||
|
|
||
5 years ago
|
pushd ./contrib/android
|
||
7 years ago
|
|
||
6 years ago
|
make theming
|
||
|
|
||
7 years ago
|
if [[ -n "$1" && "$1" == "release" ]] ; then
|
||
|
echo -n Keystore Password:
|
||
|
read -s password
|
||
|
export P4A_RELEASE_KEYSTORE=~/.keystore
|
||
|
export P4A_RELEASE_KEYSTORE_PASSWD=$password
|
||
|
export P4A_RELEASE_KEYALIAS_PASSWD=$password
|
||
|
export P4A_RELEASE_KEYALIAS=electrum
|
||
5 years ago
|
# build two apks
|
||
|
export APP_ANDROID_ARCH=armeabi-v7a
|
||
|
make release
|
||
|
export APP_ANDROID_ARCH=arm64-v8a
|
||
7 years ago
|
make release
|
||
|
else
|
||
5 years ago
|
export P4A_DEBUG_KEYSTORE="$CONTRIB_ANDROID"/android_debug.keystore
|
||
6 years ago
|
export P4A_DEBUG_KEYSTORE_PASSWD=unsafepassword
|
||
|
export P4A_DEBUG_KEYALIAS_PASSWD=unsafepassword
|
||
|
export P4A_DEBUG_KEYALIAS=electrum
|
||
5 years ago
|
# create keystore if needed
|
||
6 years ago
|
if [ ! -f "$P4A_DEBUG_KEYSTORE" ]; then
|
||
5 years ago
|
keytool -genkey -v -keystore "$CONTRIB_ANDROID"/android_debug.keystore \
|
||
6 years ago
|
-alias "$P4A_DEBUG_KEYALIAS" -keyalg RSA -keysize 2048 -validity 10000 \
|
||
|
-dname "CN=mqttserver.ibm.com, OU=ID, O=IBM, L=Hursley, S=Hants, C=GB" \
|
||
|
-storepass "$P4A_DEBUG_KEYSTORE_PASSWD" \
|
||
|
-keypass "$P4A_DEBUG_KEYALIAS_PASSWD"
|
||
|
fi
|
||
5 years ago
|
# build two apks (only one on Travis CI)
|
||
5 years ago
|
export APP_ANDROID_ARCH=armeabi-v7a
|
||
|
make apk
|
||
5 years ago
|
if [ ! $CI ]; then
|
||
|
export APP_ANDROID_ARCH=arm64-v8a
|
||
|
make apk
|
||
|
fi
|
||
7 years ago
|
fi
|
||
|
|
||
|
popd
|