# Common constants for various scripts in this directory.

version=$(PYTHONPATH=.. python3 -c \
  'from pysollib.settings import VERSION; print(VERSION)')

tmpdir=${HOME}/.cache/tmp-for-p4a/pysolfc/src

cardsets_dir='PySolFC-Cardsets--Minimal-2.0.2'
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-${ndkver}"
pkgdir="${HOME}/.local/share/python-for-android/packages"

# gradle may need this.
export TERM="xterm"

p4a_options="\
  --sdk-dir ${sdkdir} \
  --ndk-dir ${ndkdir} \
  --dist-name pysolfc \
  --name PySolFC \
  --package org.lufebe16.pysolfc \
  --version ${version} \
  --bootstrap sdl2 \
  --requirements python3,attrs,configobj,kivy,pysol-cards,random2,six \
  --private ${tmpdir} \
  --orientation sensor \
  --icon ${tmpdir}/data/images/icons/48x48/pysol.png \
  --presplash ${tmpdir}/data/images/logo-with-margin-1024.png \
  --copy-libs \
  --add-jar ${tmpdir}/support-v4-24.1.1.aar \
  --color always"
