2022-07-07 16:16:10 -04:00
|
|
|
all: prepare debug
|
|
|
|
|
|
|
|
prepare: activate cleanrns getrns
|
|
|
|
|
|
|
|
clean:
|
2022-10-20 15:32:40 -04:00
|
|
|
@echo Cleaning...
|
2022-07-07 16:16:10 -04:00
|
|
|
-(rm ./__pycache__ -r)
|
|
|
|
-(rm ./app_storage -r)
|
|
|
|
-(rm ./bin -r)
|
2022-07-07 16:34:01 -04:00
|
|
|
|
|
|
|
cleanlibs:
|
|
|
|
buildozer android clean
|
2022-07-07 16:16:10 -04:00
|
|
|
|
2022-07-07 16:34:01 -04:00
|
|
|
cleanall: clean cleanlibs
|
|
|
|
|
2022-07-07 16:16:10 -04:00
|
|
|
activate:
|
|
|
|
(. venv/bin/activate)
|
|
|
|
|
2022-09-17 10:00:55 -04:00
|
|
|
pacthfiles: patchsdl injectxml
|
|
|
|
|
|
|
|
patchsdl:
|
2022-10-20 15:32:40 -04:00
|
|
|
# Pach USB HID behaviour
|
|
|
|
cp patches/HIDDeviceUSB.java .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/jni/SDL/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
|
|
|
|
cp patches/HIDDeviceUSB.java .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/src/main/java/org/libsdl/app/HIDDeviceUSB.java
|
|
|
|
cp patches/HIDDeviceUSB.java .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/jni/SDL/android-project/app/src/main/java/org/libsdl/app/HIDDeviceUSB.java
|
2022-09-17 10:00:55 -04:00
|
|
|
|
2022-10-20 15:32:40 -04:00
|
|
|
# Pach service loader
|
2022-09-20 11:28:39 -04:00
|
|
|
cp patches/PythonService.java .buildozer/android/platform/python-for-android/pythonforandroid/bootstraps/common/build/src/main/java/org/kivy/android/PythonService.java
|
2022-10-20 15:32:40 -04:00
|
|
|
cp patches/PythonService.java .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/build/bootstrap_builds/sdl2/src/main/java/org/kivy/android/PythonService.java
|
|
|
|
cp patches/PythonService.java .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/src/main/java/org/kivy/android/PythonService.java
|
2022-09-20 11:28:39 -04:00
|
|
|
|
2022-09-17 10:00:55 -04:00
|
|
|
injectxml:
|
2022-10-20 15:32:40 -04:00
|
|
|
# Inject XML on arm64-v8a
|
|
|
|
mkdir -p .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/src/main/res/xml
|
|
|
|
mkdir -p .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/templates
|
|
|
|
cp patches/device_filter.xml .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/src/main/res/xml/
|
|
|
|
cp patches/AndroidManifest.tmpl.xml .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/templates/
|
|
|
|
|
2022-07-07 16:16:10 -04:00
|
|
|
debug:
|
|
|
|
buildozer android debug
|
|
|
|
|
2022-09-17 10:00:55 -04:00
|
|
|
prebake:
|
2022-10-20 15:32:40 -04:00
|
|
|
ifneq (,$(wildcard .buildozer/android/platform/build-arm64-v8a_armeabi-v7a/dists/sideband/src/main/res/xml/device_filter.xml))
|
2022-09-17 11:11:49 -04:00
|
|
|
@echo Device filter XML exists, skipping prebake
|
|
|
|
else
|
2022-10-20 15:32:40 -04:00
|
|
|
@(echo Prebaking build before patching files...)
|
|
|
|
@(sleep 2)
|
2022-09-17 10:00:55 -04:00
|
|
|
-(buildozer android release)
|
|
|
|
@(echo Prebake finished, applying patches and rebuilding...)
|
2022-10-20 15:32:40 -04:00
|
|
|
@(sleep 2)
|
2022-09-17 11:11:49 -04:00
|
|
|
endif
|
2022-09-17 10:00:55 -04:00
|
|
|
|
2022-07-07 16:16:10 -04:00
|
|
|
release:
|
|
|
|
buildozer android release
|
|
|
|
|
2022-10-03 06:54:35 -04:00
|
|
|
postbuild:
|
|
|
|
$(MAKE) cleanrns
|
2022-07-07 16:16:10 -04:00
|
|
|
|
2022-09-17 10:00:55 -04:00
|
|
|
apk: prepare prebake pacthfiles release postbuild
|
2022-07-07 16:16:10 -04:00
|
|
|
|
2022-09-17 10:00:55 -04:00
|
|
|
devapk: prepare prebake pacthfiles debug postbuild
|
2022-07-07 16:16:10 -04:00
|
|
|
|
2022-07-08 07:53:04 -04:00
|
|
|
version:
|
|
|
|
@(echo $$(python ./gv.py))
|
|
|
|
|
2022-07-07 16:16:10 -04:00
|
|
|
install:
|
2022-10-20 15:32:40 -04:00
|
|
|
# adb install bin/sideband-$$(python ./gv.py)-arm64-v8a-release.apk
|
|
|
|
adb install bin/sideband-$$(python ./gv.py)-arm64-v8a_armeabi-v7a-release.apk
|
2022-07-07 16:16:10 -04:00
|
|
|
|
|
|
|
console:
|
2022-10-03 06:54:35 -04:00
|
|
|
(adb logcat | grep "python\|sidebandservice")
|
2022-07-07 16:16:10 -04:00
|
|
|
|
|
|
|
getrns:
|
2022-10-20 15:32:40 -04:00
|
|
|
(cp -rv ../../Reticulum/RNS ./;rm ./RNS/Utilities/RNS)
|
|
|
|
-(rm ./RNS/__pycache__ -r)
|
2022-07-07 16:16:10 -04:00
|
|
|
|
|
|
|
cleanrns:
|
|
|
|
-(rm ./RNS -r)
|