From 1851932944c0ca4dacdaa1240bfbdcb7d2591759 Mon Sep 17 00:00:00 2001 From: "Felix C. Stegerman" Date: Sat, 8 Aug 2020 21:29:50 +0200 Subject: [PATCH] android: new numeric_version scheme; arm64 default --- android/Makefile | 17 ++++++++++++----- android/buildozer.spec | 7 +++---- 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/android/Makefile b/android/Makefile index 38cc693..ae5d378 100644 --- a/android/Makefile +++ b/android/Makefile @@ -7,9 +7,10 @@ ifndef APP_VERSION $(error git describe failed) endif -_arm64a := arm64-v8a -_arm64n := $(shell sed -n '/numeric_version/ s/.* 7/8/ p' buildozer.spec) -_arm64 := APP_ANDROID_ARCH=$(_arm64a) APP_ANDROID_NUMERIC_VERSION=$(_arm64n) +NUMERIC := $(shell python3 -c 'import sys,functools; print(10*functools.reduce(lambda x,y: x*100+int(y),([1]+sys.argv[1].replace("-",".").split(".")+[0])[:5],0))' $(APP_VERSION)) +ifndef NUMERIC + $(error numeric version command failed) +endif .PHONY: debug clean _dir @@ -26,16 +27,22 @@ _dir: .PHONY: release-armeabi-v7a release-arm64-v8a debug-armeabi-v7a: _dir + APP_ANDROID_ARCH=armeabi-v7a \ + APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 1 )) \ buildozer android debug debug-arm64-v8a: _dir - $(_arm64) buildozer android debug + APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 2 )) \ + buildozer android debug release-armeabi-v7a: _dir + APP_ANDROID_ARCH=armeabi-v7a \ + APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 1 )) \ buildozer android release release-arm64-v8a: _dir - $(_arm64) buildozer android release + APP_ANDROID_NUMERIC_VERSION=$$(( $(NUMERIC) + 2 )) \ + buildozer android release .PHONY: _setup_root _setup_user diff --git a/android/buildozer.spec b/android/buildozer.spec index 829db13..513a94b 100644 --- a/android/buildozer.spec +++ b/android/buildozer.spec @@ -18,11 +18,10 @@ android.ndk = 20b #android.ndk_path = #android.sdk_path = android.accept_sdk_license = True -android.arch = armeabi-v7a +android.arch = arm64-v8a # !!! DON'T FORGET TO UPDATE THIS !!! -# arch (7 = armeabi-v7a, 8 = arm64-v8a) + minapi + version (%02d%02d%02d) -# e.g. armeabi-v7a + minapi 27 + v0.1.1 = 721000101 -android.numeric_version = 721000200 +# 0.2.0 -------------------vvvvvv +android.numeric_version = 1000200002 p4a.branch = develop #p4a.source_dir = p4a.local_recipes = ./p4a-recipes