1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00

Changes to apk build procedures used with fdroid build.

- mkp4a.init: 1 optional parameter
- mkp4a.unsigned: 2 paramters (sdk and ndk paths)
- mkp4a.preload: new helper script
This commit is contained in:
lb@lb7520 2019-08-20 10:04:55 +02:00 committed by Shlomi Fish
parent 0c686267b3
commit e9ee79bb46
4 changed files with 50 additions and 8 deletions

View file

@ -45,14 +45,11 @@ Prerequisites (needs root):
Build with 'python-for-android' (as user):
Use the repo or an unpacked distribution tarball.
$ python setup.py install
$ make dist (if using the repo)
Use the cloned repo or an unpacked distribution tarball.
go to the android directory, then
$ ./mkp4a.init [<sdkdir>] [<ndkdir>] # prepare sdk and p4a installation
$ ./mkp4a.init # prepare sdk and p4a installation
$ ./mkkeystore # if you want to build a release version.
$ ./mkp4a.debug # build debug apk

View file

@ -3,17 +3,25 @@ set -eux
. mkp4a.common
# NOTE: $1 will be set with fdroid builds only.
echo '### prepare sdk'
./initsdk
if [[ $# == 0 ]]
then
./initsdk
fi
echo '### install p4a'
python3 -m pip install -q --user python-for-android
if [[ $# == 0 ]]
then
python3 -m pip install -q --user python-for-android
fi
echo '### prepare source'
(cd .. && make rules)
(cd .. && make rules && make all_games_html && make mo)
mkdir -p ${tmpdir}
rm -rf ${tmpdir}

27
android/mkp4a.preload Executable file
View file

@ -0,0 +1,27 @@
#!/bin/bash
# package preload helper for fdroid build.
set -eux
if [[ $# < 3 ]]
then
exit 1
fi
packagebase=${HOME}'/.local/share/python-for-android/packages'
packagedir=${packagebase}/$1
packageurl=$2
packagename=$3
packagemark='.mark-'${packagename}
if [[ $# == 4 ]]
then
packagemark='.mark'$4
fi
mkdir -p ${packagedir}
cd ${packagedir}
wget -nv ${packageurl}/${packagename}
touch ${packagemark}

View file

@ -3,8 +3,18 @@ set -eux
. mkp4a.common
# NOTE: $1 and $2 (sdk and ndk) used with fdroid build only.
if [[ $# == 2 ]]
then
sdkdir=$1
ndkdir=$2
fi
python3 -m pythonforandroid.toolchain apk \
${p4a_options} \
--sdk-dir ${sdkdir} \
--ndk-dir ${ndkdir} \
--release
# python3 -m pythonforandroid.toolchain apk