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

Kivy/android:

- version 3.0.0 metadata updates
- fixed card flip duration
This commit is contained in:
lufebe16 2024-04-02 16:52:38 +02:00
parent 0162c92740
commit 34292e2743
11 changed files with 48 additions and 24 deletions

View file

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

View file

@ -15,10 +15,10 @@ Prepare
Move to directory buildozer. 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. required python modules using pip install.
$> virtualenv ENV $> virtualenv --system-site-packages ENV
$> . ENV/bin/activate $> . ENV/bin/activate
$> pip install -r pipreq.txt $> pip install -r pipreq.txt

View file

@ -103,7 +103,7 @@ android.permissions = WRITE_EXTERNAL_STORAGE, MANAGE_EXTERNAL_STORAGE
#android.features = android.hardware.usb.host #android.features = android.hardware.usb.host
# (int) Target Android API, should be as high as possible. # (int) Target Android API, should be as high as possible.
android.api = 32 android.api = 33
# (int) Minimum API your APK / AAB will support. # (int) Minimum API your APK / AAB will support.
#android.minapi = 21 #android.minapi = 21
@ -315,7 +315,7 @@ android.debug_artifact = apk
#p4a.branch = master #p4a.branch = master
# (str) python-for-android specific commit to use, defaults to HEAD, must be within p4a.branch # (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) # (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir = #p4a.source_dir =

View file

@ -1,6 +1,17 @@
#!/bin/bash #!/bin/bash
set -eux set -eux
if [[ -z ${AAPI+x} ]]
then
exit 1
fi
virtualenv FINIT
source FINIT/bin/activate
pip3 install attrs
pip3 install pysol_cards
tmpdir=.. tmpdir=..
echo '### prepare source' echo '### prepare source'
@ -27,7 +38,7 @@ echo '### eval version'
echo '### prepare buildozer' echo '### prepare buildozer'
sed -r "s:#? ?source\.dir =.*:source.dir = ..:" -i buildozer.spec 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:#? ?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\.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:#? ?android\.accept_sdk_license =.*:android.accept_sdk_license = False:" -i buildozer.spec
@ -35,3 +46,6 @@ sed -r "s:#? ?log_level =.*:log_level = 2:" -i buildozer.spec
echo '### end init' echo '### end init'
deactivate
rm -rf FINIT

8
buildozer/helpers/setbuildvars Executable file
View file

@ -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

View file

@ -32,4 +32,4 @@ cardset-tuxedo
cardset-uni-mahjongg cardset-uni-mahjongg
cardset-victoria-falls-5x5 cardset-victoria-falls-5x5
cardset-vienna-2k cardset-vienna-2k
cardset-z_minimal cardset-z-minimal

View file

@ -16,7 +16,7 @@ if [ 1 ]; then
pushd repo pushd repo
git init git init
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git 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 git checkout -q FETCH_HEAD
popd popd

View file

@ -1,16 +1,12 @@
appdirs==1.4.4 attrs==23.2.0
attrs==22.2.0 build==1.2.1
-e git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer -e git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer
certifi==2024.2.2
colorama==0.4.6 colorama==0.4.6
configobj==5.0.8 configobj==5.0.8
Cython==0.29.33 Kivy==2.3.0
Jinja2==3.1.2 pip==24.0
Kivy==2.2.1 pysol_cards==0.16.0
pep517==0.13.0 setuptools==69.1.1
pep8==1.7.1
permutation==0.4.0
pip==23.0.1
pysol-cards==0.14.3
setuptools==67.0.0
toml==0.10.2 toml==0.10.2
wheel==0.38.4 wheel==0.42.0

View file

@ -7,8 +7,9 @@ Android specific:
- Background images from the save-aspect folder now are preserving correct aspect ratio (bug fix). - Background images from the save-aspect folder now are preserving correct aspect ratio (bug fix).
- Mahjongg tile overlapping (3d simulation) is now implemented. - Mahjongg tile overlapping (3d simulation) is now implemented.
- Animation of card moves reworked. This fixes some stacking order corruptions reported earlier. - 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. - Display of html-text (game rules, licence etc): Black windows fixed.
- Upstream libraries updated to kivy v2.2.1 and python v3.10 - Upstream libraries updated to kivy v2.2.1 and python v3.10
Main version: Main version:
- many new games. - 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.

View file

@ -6,6 +6,6 @@ Memory and others and is published on
<a href="https://pysolfc.sourceforge.io/">https://pysolfc.sourceforge.io</a>. <a href="https://pysolfc.sourceforge.io/">https://pysolfc.sourceforge.io</a>.
If you are looking for a desktop version, take a look. 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 functions. It is created and published from selected snapshots out of
the sources. the sources.

View file

@ -90,6 +90,7 @@ class _OneImageCard(_HideableCard):
self.item = MfxCanvasImage( self.item = MfxCanvasImage(
game.canvas, self.x, self.y, image=aimage, anchor="nw") 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: face = %s xy=%s/%s' % (self._face_image.source, x, y))
# print ('card: back = %s xy=%s/%s' % (self._back_image.source, x, y)) # print ('card: back = %s xy=%s/%s' % (self._back_image.source, x, y))
# y = self.yy # y = self.yy
@ -97,11 +98,15 @@ class _OneImageCard(_HideableCard):
def _setImage(self, image): def _setImage(self, image):
if self.twoImage: if self.twoImage:
from kivy.animation import Animation 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 z = 0
t = 'in_quad' t = 'out_quad'
if image == self._face_image: if image == self._face_image:
z = 1 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) anim.start(self._face_image)
else: else:
self._active_image.clear_widgets() self._active_image.clear_widgets()