1
0
Fork 0
mirror of https://github.com/shlomif/PySolFC.git synced 2025-04-05 00:02:29 -04:00
PySolFC/android/mkp4a.init
lb@lb520 91ef11b7ac Implementation of createBottom in kivy.
A first set of Python 3 adaptations.
Added a choice of cardsets to android build.
Added new scripts to tarball (MAKEFILE.in)
2018-03-14 19:33:02 +01:00

66 lines
1.4 KiB
Bash
Executable file

#!/bin/bash
echo '### prepare sdk'
./initsdk.py $1 $2 $3
echo '### install p4a'
#p4aversion='0.5.3p'
# Downloded file "https://github.com/kivy/python-for-android/archive/0.5.3.zip"
# Note: Minor fixes had to be added to version 0.5.3 in order to
# cooperate with fdroid.
#python3 -m pip install -q --user "./p4a/${p4aversion}.zip"
p4aversion='0.5.3'
if [ ! -f ./${p4aversion}.zip ]
then
wget "https://github.com/kivy/python-for-android/archive/${p4aversion}.zip"
fi
if [ -f ./${p4aversion}.zip ]
then
python3 -m pip install -q --user "./${p4aversion}.zip"
else
echo "### download of ${p4aversion}.zip failed"
fi
echo '### load prepared recipes if available'
if [ -d ./packages ]
then
echo '### copying recipes'
mkdir -p ${HOME}/.local/share/python-for-android
cp -a packages ${HOME}/.local/share/python-for-android/
fi
echo '### prepare source'
mkdir -p tmp
rm -rf tmp/src
# Easiest variant. But rsync may not be installed.
# rsync -a .. tmp/src --exclude android/tmp
# so:
mkdir -p ${HOME}/.local/tmp/src
cp -a .. ${HOME}/.local/tmp/src
mv ${HOME}/.local/tmp/src tmp/src
rm -rf tmp/src/android
rm -rf tmp/src/src
cp -a main.py tmp/src/main.py
mkdir -p tmp/src/data/images/cards/bottoms/trumps-only
echo "" > tmp/src/data/images/cards/bottoms/trumps-only/.keep
if [ ! -d ./PySolFC-Cardsets-2.0 ]
then
./mkcards
fi
if [ -d ./PySolFC-Cardsets-2.0 ]
then
echo '### copying cardsets'
cp -a ./PySolFC-Cardsets-2.0/* ./tmp/src/data
fi
echo '### end init'