Android build fixes #2263
|
@ -22,7 +22,7 @@ RUN apt-get -y update -qq \
|
||||||
RUN apt-get -y install -qq --no-install-recommends openjdk-17-jdk \
|
RUN apt-get -y install -qq --no-install-recommends openjdk-17-jdk \
|
||||||
&& apt-get -y autoremove
|
&& apt-get -y autoremove
|
||||||
|
|
||||||
RUN pip install pip install buildozer cython virtualenv
|
RUN pip install buildozer cython virtualenv
|
||||||
|
|
||||||
|
|
||||||
ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk"
|
ENV ANDROID_NDK_HOME="${ANDROID_HOME}/android-ndk"
|
||||||
|
|
|
@ -1,6 +1,18 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
export LC_ALL=en_US.UTF-8
|
export LC_ALL=en_US.UTF-8
|
||||||
export LANG=en_US.UTF-8
|
export LANG=en_US.UTF-8
|
||||||
|
|
||||||
|
# buildozer OOM workaround
|
||||||
|
mkdir -p ~/.gradle
|
||||||
|
echo "org.gradle.jvmargs=-Xmx2g -XX:MaxMetaspaceSize=512m -XX:+HeapDumpOnOutOfMemoryError -Dfile.encoding=UTF-8" \
|
||||||
|
> ~/.gradle/gradle.properties
|
||||||
|
|
||||||
|
# workaround for symlink
|
||||||
|
rm -rf src/pybitmessage
|
||||||
|
mkdir -p src/pybitmessage
|
||||||
|
cp src/*.py src/pybitmessage
|
||||||
|
cp -r src/bitmessagekivy src/backend src/mockbm src/pybitmessage
|
||||||
|
|
||||||
pushd packages/android
|
pushd packages/android
|
||||||
|
|
||||||
BUILDMODE=debug
|
BUILDMODE=debug
|
||||||
|
|
|
@ -13,7 +13,7 @@ package.domain = at.bitmessage
|
||||||
source.dir = ../../src
|
source.dir = ../../src
|
||||||
|
|
||||||
# (list) Source files to include (let empty to include all the files)
|
# (list) Source files to include (let empty to include all the files)
|
||||||
source.include_exts = py,png,jpg,kv,atlas,tflite,sql
|
source.include_exts = py,png,jpg,kv,atlas,tflite,sql,json
|
||||||
|
|
||||||
# (list) List of inclusions using pattern matching
|
# (list) List of inclusions using pattern matching
|
||||||
#source.include_patterns = assets/*,images/*.png
|
#source.include_patterns = assets/*,images/*.png
|
||||||
|
@ -36,7 +36,7 @@ version = 0.1.1
|
||||||
|
|
||||||
# (list) Application requirements
|
# (list) Application requirements
|
||||||
# comma separated e.g. requirements = sqlite3,kivy
|
# comma separated e.g. requirements = sqlite3,kivy
|
||||||
requirements = python3,kivy
|
requirements = python3,kivy,sqlite3,kivymd==1.0.2,Pillow,opencv,kivy-garden.qrcode,qrcode,typing_extensions,libpng
|
||||||
|
|
||||||
# (str) Custom source folders for requirements
|
# (str) Custom source folders for requirements
|
||||||
# Sets custom source for any requirements with recipes
|
# Sets custom source for any requirements with recipes
|
||||||
|
|
13
src/main-android-live.py
Normal file
13
src/main-android-live.py
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
"""This module is for thread start."""
|
||||||
|
import state
|
||||||
|
import sys
|
||||||
|
from bitmessagemain import main
|
||||||
|
from termcolor import colored
|
||||||
|
print(colored('kivy is not supported at the moment for this version..', 'red'))
|
||||||
|
sys.exit()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == '__main__':
|
||||||
|
state.kivy = True
|
||||||
|
print("Kivy Loading......")
|
||||||
|
main()
|
36
src/main.py
36
src/main.py
|
@ -1,13 +1,31 @@
|
||||||
"""This module is for thread start."""
|
# pylint: disable=unused-import, wrong-import-position, ungrouped-imports
|
||||||
|
# flake8: noqa:E401, E402
|
||||||
|
|
||||||
|
"""Mock kivy app with mock threads."""
|
||||||
|
|
||||||
|
import os
|
||||||
|
from kivy.config import Config
|
||||||
|
from mockbm import multiqueue
|
||||||
import state
|
import state
|
||||||
import sys
|
|
||||||
from bitmessagemain import main
|
from mockbm.class_addressGenerator import FakeAddressGenerator # noqa:E402
|
||||||
from termcolor import colored
|
from bitmessagekivy.mpybit import NavigateApp # noqa:E402
|
||||||
print(colored('kivy is not supported at the moment for this version..', 'red'))
|
from mockbm import network # noqa:E402
|
||||||
sys.exit()
|
|
||||||
|
stats = network.stats
|
||||||
|
objectracker = network.objectracker
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
def main():
|
||||||
state.kivy = True
|
"""main method for starting threads"""
|
||||||
print("Kivy Loading......")
|
addressGeneratorThread = FakeAddressGenerator()
|
||||||
|
addressGeneratorThread.daemon = True
|
||||||
|
addressGeneratorThread.start()
|
||||||
|
state.kivyapp = NavigateApp()
|
||||||
|
state.kivyapp.run()
|
||||||
|
addressGeneratorThread.stopThread()
|
||||||
|
|
||||||
|
|
||||||
|
if __name__ == "__main__":
|
||||||
|
os.environ['INSTALL_TESTS'] = "True"
|
||||||
main()
|
main()
|
||||||
|
|
|
@ -805,6 +805,10 @@ def loadOpenSSL():
|
||||||
'libcrypto.dylib', '/usr/local/opt/openssl/lib/libcrypto.dylib'])
|
'libcrypto.dylib', '/usr/local/opt/openssl/lib/libcrypto.dylib'])
|
||||||
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
elif 'win32' in sys.platform or 'win64' in sys.platform:
|
||||||
libdir.append('libeay32.dll')
|
libdir.append('libeay32.dll')
|
||||||
|
# kivy
|
||||||
|
elif 'ANDROID_ARGUMENT' in environ:
|
||||||
|
libdir.append('libcrypto1.1.so')
|
||||||
|
libdir.append('libssl1.1.so')
|
||||||
else:
|
else:
|
||||||
libdir.append('libcrypto.so')
|
libdir.append('libcrypto.so')
|
||||||
libdir.append('libssl.so')
|
libdir.append('libssl.so')
|
||||||
|
|
Reference in New Issue
Block a user