Skip to content

Commit

Permalink
Kivy/android:
Browse files Browse the repository at this point in the history
- version 3.0.0 metadata updates
- fixed card flip duration
  • Loading branch information
lufebe16 committed Apr 4, 2024
1 parent 0162c92 commit 34292e2
Show file tree
Hide file tree
Showing 11 changed files with 48 additions and 24 deletions.
2 changes: 1 addition & 1 deletion buildozer/aversion
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ else
fi

# current android version mumber.
version="2.26.0"
version="3.0.0"
sversion=$(echo $version | sed -E "s:(.*)\..*:\1:")
tuple=$(echo $version | sed -E "s:(.*)\.(.*)\.(.*):(\1, \2, \3):")

Expand Down
4 changes: 2 additions & 2 deletions buildozer/build-instructions.txt
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ Prepare

Move to directory buildozer.

First create and enter a virtualenv and load all
First create and enter a virtualenv and load the
required python modules using pip install.

$> virtualenv ENV
$> virtualenv --system-site-packages ENV
$> . ENV/bin/activate
$> pip install -r pipreq.txt

Expand Down
4 changes: 2 additions & 2 deletions buildozer/buildozer.spec
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ android.permissions = WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE
#android.features = android.hardware.usb.host

# (int) Target Android API, should be as high as possible.
android.api = 32
android.api = 33

# (int) Minimum API your APK / AAB will support.
#android.minapi = 21
Expand Down Expand Up @@ -315,7 +315,7 @@ android.debug_artifact = apk
#p4a.branch = master

# (str) python-for-android specific commit to use, defaults to HEAD, must be within p4a.branch
p4a.commit = v2023.09.16
p4a.commit = v2024.01.21

# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =
Expand Down
16 changes: 15 additions & 1 deletion buildozer/fdroid.init
Original file line number Diff line number Diff line change
@@ -1,6 +1,17 @@
#!/bin/bash
set -eux

if [[ -z ${AAPI+x} ]]
then
exit 1
fi

virtualenv FINIT
source FINIT/bin/activate

pip3 install attrs
pip3 install pysol_cards

tmpdir=..

echo '### prepare source'
Expand All @@ -27,11 +38,14 @@ echo '### eval version'
echo '### prepare buildozer'

sed -r "s:#? ?source\.dir =.*:source.dir = ..:" -i buildozer.spec
sed -r "s:#? ?source\.exclude_dirs =.*:source.exclude_dirs = Screenshots,android,buildozer,tests,fastlane:" -i buildozer.spec
sed -r "s:#? ?source\.exclude_dirs =.*:source.exclude_dirs = Screenshots,android,buildozer,contrib,tests,fastlane:" -i buildozer.spec
sed -r "s:#? ?source\.exclude_patterns =.*:source.exclude_patterns = README.*,AUTHORS.md,CONTRIBUTING.md,COPYING,MANIFEST.in,Makefile,NEWS.asciidoc,appdata.xml,pysol.py,run-tests.pl,setup.cfg,setup.py,setup_osx.py,local.properties,p4a_env_vars.txt:" -i buildozer.spec
sed -r "s:#? ?android\.skip_update =.*:android.skip_update = True:" -i buildozer.spec
sed -r "s:#? ?android\.accept_sdk_license =.*:android.accept_sdk_license = False:" -i buildozer.spec
sed -r "s:#? ?log_level =.*:log_level = 2:" -i buildozer.spec


echo '### end init'

deactivate
rm -rf FINIT
8 changes: 8 additions & 0 deletions buildozer/helpers/setbuildvars
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#!/bin/sh

VP4A='v2024.01.21'
VBUILDOZER='3ebc09e885457db4747e67a1250c2aea1ca7a046'
VCPYTHON='v3.11.5'
VCYTHON='3.0.10'
AAPI=$(cat buildozer.spec | grep -e "^android[.]api" | sed -E "s/^.*([0-9].).*/\1/")
export AAPI
2 changes: 1 addition & 1 deletion buildozer/minimal.txt
Original file line number Diff line number Diff line change
Expand Up @@ -32,4 +32,4 @@ cardset-tuxedo
cardset-uni-mahjongg
cardset-victoria-falls-5x5
cardset-vienna-2k
cardset-z_minimal
cardset-z-minimal
2 changes: 1 addition & 1 deletion buildozer/mkcards
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ if [ 1 ]; then
pushd repo
git init
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git
git fetch --depth 1 origin 9b63a583dc3e770fa9bf8f2378c37a064aa4969c
git fetch --depth 1 origin 3.0
git checkout -q FETCH_HEAD
popd

Expand Down
20 changes: 8 additions & 12 deletions buildozer/pipreq.txt
Original file line number Diff line number Diff line change
@@ -1,16 +1,12 @@
appdirs==1.4.4
attrs==22.2.0
attrs==23.2.0
build==1.2.1
-e git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer
certifi==2024.2.2
colorama==0.4.6
configobj==5.0.8
Cython==0.29.33
Jinja2==3.1.2
Kivy==2.2.1
pep517==0.13.0
pep8==1.7.1
permutation==0.4.0
pip==23.0.1
pysol-cards==0.14.3
setuptools==67.0.0
Kivy==2.3.0
pip==24.0
pysol_cards==0.16.0
setuptools==69.1.1
toml==0.10.2
wheel==0.38.4
wheel==0.42.0
3 changes: 2 additions & 1 deletion fastlane/metadata/android/en-US/changelogs/102130000.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@ Android specific:
- Background images from the save-aspect folder now are preserving correct aspect ratio (bug fix).
- Mahjongg tile overlapping (3d simulation) is now implemented.
- Animation of card moves reworked. This fixes some stacking order corruptions reported earlier.
- Animation of card flip bound to animation settings.
- Display of html-text (game rules, licence etc): Black windows fixed.
- Upstream libraries updated to kivy v2.2.1 and python v3.10
Main version:
- many new games.
- consult NEWS.asscidoc or html-src/news.html on the github repo for more change informations.
- consult NEWS.asscidoc or html-src/news.html on the github repo and https://pysolfc.sourceforge.io for more informations.
2 changes: 1 addition & 1 deletion fastlane/metadata/android/en-US/full_description.txt
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,6 @@ Memory and others and is published on
<a href="https://pysolfc.sourceforge.io/">https://pysolfc.sourceforge.io</a>.
If you are looking for a desktop version, take a look.

The Android app is based on this work and provides a selection of the desktop
The Android app is based on this work and provides a subset of the desktop
functions. It is created and published from selected snapshots out of
the sources.
9 changes: 7 additions & 2 deletions pysollib/kivy/card.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,18 +90,23 @@ def __init__(self, id, deck, suit, rank, game, x=0, y=0):
self.item = MfxCanvasImage(
game.canvas, self.x, self.y, image=aimage, anchor="nw")

self.app = game.app
# print ('card: face = %s xy=%s/%s' % (self._face_image.source, x, y))
# print ('card: back = %s xy=%s/%s' % (self._back_image.source, x, y))
# y = self.yy

def _setImage(self, image):
if self.twoImage:
from kivy.animation import Animation
base = float(self.app.opt.animations)
dura = base*base/30.0
if base > 0: dura += 0.2 # noqa
z = 0
t = 'in_quad'
t = 'out_quad'
if image == self._face_image:
z = 1
anim = Animation(opacity=z, t=t, d=0.35)
t = 'in_quad'
anim = Animation(opacity=z, t=t, d=dura)
anim.start(self._face_image)
else:
self._active_image.clear_widgets()
Expand Down

0 comments on commit 34292e2

Please sign in to comment.