From ad79d2429fbc5950beb96acbc628f222fd42b2a1 Mon Sep 17 00:00:00 2001 From: lufebe16 Date: Thu, 27 Feb 2020 15:39:11 +0100 Subject: [PATCH] Apk build scripts - updated for use with p4a version 2019.10.6. - additions to build instructions. --- README.android | 3 +++ android/debian/apt-installs.sh | 14 ++++++++++++++ android/initsdk | 2 +- android/mkp4a.common | 5 ++++- android/mkp4a.init | 4 ++-- 5 files changed, 24 insertions(+), 4 deletions(-) diff --git a/README.android b/README.android index dcd13f76..dbb2a8fc 100644 --- a/README.android +++ b/README.android @@ -1,6 +1,9 @@ Prerequisites (needs root): + (For updated information on these subjects please consult the scripts in + android/debian). + On a 'freshly installed' Ubuntu 16.04 (32bit), the following additional packages had to be installed: diff --git a/android/debian/apt-installs.sh b/android/debian/apt-installs.sh index 6db7e2d2..f0c28fa0 100755 --- a/android/debian/apt-installs.sh +++ b/android/debian/apt-installs.sh @@ -18,3 +18,17 @@ apt-get install -y \ lld update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java + +apt-get install -y --no-install-recommends \ + imagemagick \ + python3-tk \ + ccache \ + libltdl-dev + +# set python3 as default. +# make python alternatives selectable. +# (debian stretch, adapt for different versions) + +update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1 +update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2 + diff --git a/android/initsdk b/android/initsdk index 3639c3b7..7a07625d 100755 --- a/android/initsdk +++ b/android/initsdk @@ -12,7 +12,7 @@ fi urlbase=https://dl.google.com/android/repository/ tools_zip=sdk-tools-linux-4333796.zip -ndk_zip=android-ndk-r17c-linux-x86_64.zip +ndk_zip=android-ndk-${ndkver}-linux-x86_64.zip mkdir -p $sdkdir $ndkdir diff --git a/android/mkp4a.common b/android/mkp4a.common index 55302832..ee90a0e0 100644 --- a/android/mkp4a.common +++ b/android/mkp4a.common @@ -8,8 +8,11 @@ tmpdir=${HOME}/.cache/tmp-for-p4a/pysolfc/src cardsets_dir='PySolFC-Cardsets--Minimal-2.0.1' cardsets_file="${cardsets_dir}.tar.xz" +p4aver="2019.10.6" +ndkver="r19c" + sdkdir="${HOME}/.cache/sdk-for-p4a/sdk" -ndkdir="${HOME}/.cache/sdk-for-p4a/android-ndk-r17c" +ndkdir="${HOME}/.cache/sdk-for-p4a/android-ndk-${ndkver}" pkgdir="${HOME}/.local/share/python-for-android/packages" # gradle may need this. diff --git a/android/mkp4a.init b/android/mkp4a.init index df9e7fed..1d1ef7ef 100755 --- a/android/mkp4a.init +++ b/android/mkp4a.init @@ -17,10 +17,10 @@ echo '### install p4a' if [[ $# == 0 ]] then - if not python3 -m pip install -q --user python-for-android + if not python3 -m pip install -q --user "python-for-android==${p4aver}" then echo "obviously inside a virtualenv, so omit --user" - if python3 -m pip install -q python-for-android + if python3 -m pip install -q "python-for-android==${p4aver}" then echo "done" fi