mirror of
https://github.com/LBRYFoundation/LBRY-Vault.git
synced 2025-08-30 08:51:32 +00:00
move android stuff to contrib/android
This commit is contained in:
parent
ba5ccf464c
commit
485422b072
9 changed files with 43 additions and 44 deletions
|
@ -65,12 +65,12 @@ jobs:
|
||||||
install:
|
install:
|
||||||
- pip install requests && ./contrib/pull_locale
|
- pip install requests && ./contrib/pull_locale
|
||||||
- ./contrib/make_packages
|
- ./contrib/make_packages
|
||||||
- sudo docker build --no-cache -t electrum-android-builder-img electrum/gui/kivy/tools
|
- sudo docker build --no-cache -t electrum-android-builder-img contrib/android
|
||||||
script:
|
script:
|
||||||
- sudo chown -R 1000:1000 .
|
- sudo chown -R 1000:1000 .
|
||||||
# Output something every minute or Travis kills the job
|
# Output something every minute or Travis kills the job
|
||||||
- while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done &
|
- while sleep 60; do echo "=====[ $SECONDS seconds still running ]====="; done &
|
||||||
- sudo docker run -it -u 1000:1000 --rm --name electrum-android-builder-cont --env CI=true -v $PWD:/home/user/wspace/electrum --workdir /home/user/wspace/electrum electrum-android-builder-img ./contrib/make_apk
|
- sudo docker run -it -u 1000:1000 --rm --name electrum-android-builder-cont --env CI=true -v $PWD:/home/user/wspace/electrum --workdir /home/user/wspace/electrum electrum-android-builder-img ./contrib/android/make_apk
|
||||||
# kill background sleep loop
|
# kill background sleep loop
|
||||||
- kill %1
|
- kill %1
|
||||||
- ls -la bin
|
- ls -la bin
|
||||||
|
|
33
contrib/android/Makefile
Normal file
33
contrib/android/Makefile
Normal file
|
@ -0,0 +1,33 @@
|
||||||
|
PYTHON = python3
|
||||||
|
|
||||||
|
# needs kivy installed or in PYTHONPATH
|
||||||
|
|
||||||
|
.PHONY: theming apk clean
|
||||||
|
|
||||||
|
theming:
|
||||||
|
#bash -c 'for i in network lightning; do convert -background none theming/light/$i.{svg,png}; done'
|
||||||
|
$(PYTHON) -m kivy.atlas ../../electrum/gui/kivy/theming/light 1024 ../../electrum/gui/kivy/theming/light/*.png
|
||||||
|
prepare:
|
||||||
|
# running pre build setup
|
||||||
|
@cp buildozer.spec ../../buildozer.spec
|
||||||
|
# copy electrum to main.py
|
||||||
|
@cp ../../run_electrum ../../main.py
|
||||||
|
@-if [ ! -d "../../.buildozer" ];then \
|
||||||
|
cd ../..; buildozer android debug;\
|
||||||
|
cp -f blacklist.txt .buildozer/android/platform/python-for-android/src/blacklist.txt;\
|
||||||
|
rm -rf ./.buildozer/android/platform/python-for-android/dist;\
|
||||||
|
fi
|
||||||
|
apk:
|
||||||
|
@make prepare
|
||||||
|
@-cd ../..; buildozer android debug deploy run
|
||||||
|
@make clean
|
||||||
|
release:
|
||||||
|
@make prepare
|
||||||
|
@-cd ../..; buildozer android release
|
||||||
|
@make clean
|
||||||
|
clean:
|
||||||
|
# Cleaning up
|
||||||
|
# rename main.py to electrum
|
||||||
|
@-rm ../../main.py
|
||||||
|
# remove buildozer.spec
|
||||||
|
@-rm ../../buildozer.spec
|
|
@ -24,7 +24,7 @@ folder.
|
||||||
2. Build image
|
2. Build image
|
||||||
|
|
||||||
```
|
```
|
||||||
$ sudo docker build -t electrum-android-builder-img electrum/gui/kivy/tools
|
$ sudo docker build -t electrum-android-builder-img contrib/android
|
||||||
```
|
```
|
||||||
|
|
||||||
3. Build locale files
|
3. Build locale files
|
||||||
|
@ -50,7 +50,7 @@ folder.
|
||||||
-v ~/.keystore:/home/user/.keystore \
|
-v ~/.keystore:/home/user/.keystore \
|
||||||
--workdir /home/user/wspace/electrum \
|
--workdir /home/user/wspace/electrum \
|
||||||
electrum-android-builder-img \
|
electrum-android-builder-img \
|
||||||
./contrib/make_apk
|
./contrib/android/make_apk
|
||||||
```
|
```
|
||||||
This mounts the project dir inside the container,
|
This mounts the project dir inside the container,
|
||||||
and so the modifications will affect it, e.g. `.buildozer` folder
|
and so the modifications will affect it, e.g. `.buildozer` folder
|
|
@ -22,7 +22,6 @@ source.exclude_exts = spec
|
||||||
source.exclude_dirs = bin, build, dist, contrib,
|
source.exclude_dirs = bin, build, dist, contrib,
|
||||||
electrum/tests,
|
electrum/tests,
|
||||||
electrum/gui/qt,
|
electrum/gui/qt,
|
||||||
electrum/gui/kivy/tools,
|
|
||||||
electrum/gui/kivy/theming/light
|
electrum/gui/kivy/theming/light
|
||||||
# (list) List of exclusions using pattern matching
|
# (list) List of exclusions using pattern matching
|
||||||
source.exclude_patterns = Makefile,setup*
|
source.exclude_patterns = Makefile,setup*
|
||||||
|
@ -123,7 +122,7 @@ android.add_activities = org.electrum.qr.SimpleScannerActivity
|
||||||
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
|
#android.ouya.icon.filename = %(source.dir)s/data/ouya_icon.png
|
||||||
|
|
||||||
# (str) XML file to include as an intent filters in <activity> tag
|
# (str) XML file to include as an intent filters in <activity> tag
|
||||||
android.manifest.intent_filters = electrum/gui/kivy/tools/bitcoin_intent.xml
|
android.manifest.intent_filters = contrib/android/bitcoin_intent.xml
|
||||||
|
|
||||||
# (str) launchMode to set for the main activity
|
# (str) launchMode to set for the main activity
|
||||||
android.manifest.launch_mode = singleTask
|
android.manifest.launch_mode = singleTask
|
|
@ -2,8 +2,8 @@
|
||||||
|
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
CONTRIB="$(dirname "$(readlink -e "$0")")"
|
CONTRIB_ANDROID="$(dirname "$(readlink -e "$0")")"
|
||||||
ROOT_FOLDER="$CONTRIB"/..
|
ROOT_FOLDER="$CONTRIB_ANDROID"/../..
|
||||||
PACKAGES="$ROOT_FOLDER"/packages/
|
PACKAGES="$ROOT_FOLDER"/packages/
|
||||||
LOCALE="$ROOT_FOLDER"/electrum/locale/
|
LOCALE="$ROOT_FOLDER"/electrum/locale/
|
||||||
|
|
||||||
|
@ -17,7 +17,7 @@ if [ ! -d "$PACKAGES" ]; then
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd ./electrum/gui/kivy/
|
pushd ./contrib/android
|
||||||
|
|
||||||
make theming
|
make theming
|
||||||
|
|
||||||
|
@ -34,13 +34,13 @@ if [[ -n "$1" && "$1" == "release" ]] ; then
|
||||||
export APP_ANDROID_ARCH=arm64-v8a
|
export APP_ANDROID_ARCH=arm64-v8a
|
||||||
make release
|
make release
|
||||||
else
|
else
|
||||||
export P4A_DEBUG_KEYSTORE="$CONTRIB"/android_debug.keystore
|
export P4A_DEBUG_KEYSTORE="$CONTRIB_ANDROID"/android_debug.keystore
|
||||||
export P4A_DEBUG_KEYSTORE_PASSWD=unsafepassword
|
export P4A_DEBUG_KEYSTORE_PASSWD=unsafepassword
|
||||||
export P4A_DEBUG_KEYALIAS_PASSWD=unsafepassword
|
export P4A_DEBUG_KEYALIAS_PASSWD=unsafepassword
|
||||||
export P4A_DEBUG_KEYALIAS=electrum
|
export P4A_DEBUG_KEYALIAS=electrum
|
||||||
# create keystore if needed
|
# create keystore if needed
|
||||||
if [ ! -f "$P4A_DEBUG_KEYSTORE" ]; then
|
if [ ! -f "$P4A_DEBUG_KEYSTORE" ]; then
|
||||||
keytool -genkey -v -keystore "$CONTRIB"/android_debug.keystore \
|
keytool -genkey -v -keystore "$CONTRIB_ANDROID"/android_debug.keystore \
|
||||||
-alias "$P4A_DEBUG_KEYALIAS" -keyalg RSA -keysize 2048 -validity 10000 \
|
-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" \
|
-dname "CN=mqttserver.ibm.com, OU=ID, O=IBM, L=Hursley, S=Hants, C=GB" \
|
||||||
-storepass "$P4A_DEBUG_KEYSTORE_PASSWD" \
|
-storepass "$P4A_DEBUG_KEYSTORE_PASSWD" \
|
|
@ -1,33 +0,0 @@
|
||||||
PYTHON = python3
|
|
||||||
|
|
||||||
# needs kivy installed or in PYTHONPATH
|
|
||||||
|
|
||||||
.PHONY: theming apk clean
|
|
||||||
|
|
||||||
theming:
|
|
||||||
#bash -c 'for i in network lightning; do convert -background none theming/light/$i.{svg,png}; done'
|
|
||||||
$(PYTHON) -m kivy.atlas theming/light 1024 theming/light/*.png
|
|
||||||
prepare:
|
|
||||||
# running pre build setup
|
|
||||||
@cp tools/buildozer.spec ../../../buildozer.spec
|
|
||||||
# copy electrum to main.py
|
|
||||||
@cp ../../../run_electrum ../../../main.py
|
|
||||||
@-if [ ! -d "../../../.buildozer" ];then \
|
|
||||||
cd ../../..; buildozer android debug;\
|
|
||||||
cp -f electrum/gui/kivy/tools/blacklist.txt .buildozer/android/platform/python-for-android/src/blacklist.txt;\
|
|
||||||
rm -rf ./.buildozer/android/platform/python-for-android/dist;\
|
|
||||||
fi
|
|
||||||
apk:
|
|
||||||
@make prepare
|
|
||||||
@-cd ../../..; buildozer android debug deploy run
|
|
||||||
@make clean
|
|
||||||
release:
|
|
||||||
@make prepare
|
|
||||||
@-cd ../../..; buildozer android release
|
|
||||||
@make clean
|
|
||||||
clean:
|
|
||||||
# Cleaning up
|
|
||||||
# rename main.py to electrum
|
|
||||||
@-rm ../../../main.py
|
|
||||||
# remove buildozer.spec
|
|
||||||
@-rm ../../../buildozer.spec
|
|
Loading…
Add table
Reference in a new issue