mirror of
https://github.com/shlomif/PySolFC.git
synced 2025-04-05 00:02:29 -04:00
Further corrections to python3 / android. Card images format has been changed to png. And a bugfix.
This commit is contained in:
parent
81da718007
commit
5b75c1b413
7 changed files with 37 additions and 15 deletions
|
@ -30,6 +30,7 @@ include tests/unit-generated/PLACEHOLDER
|
|||
include .tidyallrc
|
||||
include android/*.py
|
||||
include android/mk*
|
||||
include android/initsdk
|
||||
include android/debian/*
|
||||
#graft data/plugins
|
||||
##
|
||||
|
|
|
@ -45,6 +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)
|
||||
|
||||
go to the android directory, then
|
||||
|
||||
$ ./mkp4a.init [<sdkdir>] [<ndkdir>] # prepare sdk and p4a installation
|
||||
|
@ -52,7 +57,6 @@ Build with 'python-for-android' (as user):
|
|||
|
||||
$ ./mkp4a.debug # build debug apk
|
||||
$ ./mkp4a.release <passwd1> [<passwd2>] # build release apk
|
||||
$ ./mkp4a.unsigned # build an unsigned release apk
|
||||
|
||||
The build system will download all required additional
|
||||
packages (such as the android sdk and more). Do the first build will
|
||||
|
@ -68,11 +72,22 @@ Build with 'python-for-android' (as user):
|
|||
|
||||
Cardsets:
|
||||
|
||||
Cardsets should be installed in ${HOME}/.PySolFC/cardsets/. On an
|
||||
android device this is equivalent to /sdcard/.PySolFC/cardsets/.
|
||||
The Apk includes a minimal set of cards for playing.
|
||||
|
||||
Additional cardsets can be installed in ${HOME}/.PySolFC/cardsets/.
|
||||
On an android device this is equivalent to /sdcard/.PySolFC/cardsets/.
|
||||
Cardsets must use the bmp image format. Use scripts/cardconv
|
||||
(on a linux system) to convert them, before copying to the device.
|
||||
|
||||
Important Notice on python3/kivy 1.11.x (pysol verson 2.6.4 ff):
|
||||
In kivy, using python3, the support for bmp images depends on OpenGL.
|
||||
On fairly up to date Android OpenGL ES 3.x is available. ES (Embedded
|
||||
System) release is a subset of the full OpenGL. Due to this, bmp image
|
||||
support will be broken on android, but not on up to date workstations.
|
||||
|
||||
As gif images are still slow and error prone, the best we can do is to
|
||||
use png images instead of bmp (as noted above).
|
||||
|
||||
Possible known build issues:
|
||||
|
||||
2) for android ndk: needs a Version <=13 (because needs ant support).
|
||||
|
|
|
@ -18,9 +18,9 @@ fi
|
|||
echo '### processing cardsets'
|
||||
(
|
||||
cd ${cardsets_dir}
|
||||
../../scripts/cardconv
|
||||
for i in cardset-*-bmp; do
|
||||
rm -rf `basename $i -bmp`
|
||||
../../scripts/cardconv gif png
|
||||
for i in cardset-*-png; do
|
||||
rm -rf `basename $i -png`
|
||||
done
|
||||
)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ set -eux
|
|||
|
||||
new_options=${p4a_options}
|
||||
new_options=${new_options/PySolFC/PySolFCdbg}
|
||||
new_options=${new_options/org.lubefe16.pysolfc/org.lubefe16.pysolfc.dbg}
|
||||
new_options=${new_options/org.lufebe16.pysolfc/org.lufebe16.pysolfc.dbg}
|
||||
|
||||
python3 -m pythonforandroid.toolchain apk \
|
||||
${new_options}
|
||||
|
|
|
@ -35,6 +35,10 @@ rm -rf ${tmpdir}/.appveyor.yml
|
|||
rm -rf ${tmpdir}/.perltidyrc
|
||||
rm -rf ${tmpdir}/.travis.yml
|
||||
|
||||
rm -rf ${tmpdir}/setup.py
|
||||
rm -rf ${tmpdir}/setup_osx.py
|
||||
rm -rf ${tmpdir}/setup.cfg
|
||||
|
||||
cp -a main.py ${tmpdir}
|
||||
mkdir -p ${tmpdir}/data/images/cards/bottoms/trumps-only
|
||||
echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep
|
||||
|
|
|
@ -1541,6 +1541,12 @@ class LMainWindow(BoxLayout, LTkBase):
|
|||
self.workStack = LStack()
|
||||
self.app = None
|
||||
|
||||
'''
|
||||
from kivy.graphics import opengl_utils
|
||||
print('OPENGL support:')
|
||||
print(opengl_utils.gl_get_extensions())
|
||||
'''
|
||||
|
||||
# self.touches = []
|
||||
|
||||
# beispiel zu canvas (hintergrund)
|
||||
|
|
|
@ -35,17 +35,13 @@ class SelectCardsetDialogWithPreview(MfxDialog):
|
|||
_cardset_store = None
|
||||
|
||||
def __init__(self, parent, title, app, manager, key=None, **kw):
|
||||
kw = self.initKw(kw)
|
||||
MfxDialog.__init__(self, parent, title, **kw)
|
||||
#
|
||||
if key is None:
|
||||
key = manager.getSelected()
|
||||
key = 1
|
||||
self.status = -1
|
||||
self.key = key
|
||||
self.app = app
|
||||
self.manager = manager
|
||||
self.key = key
|
||||
self.preview_key = -1
|
||||
self.all_keys = []
|
||||
self.status = -1
|
||||
return
|
||||
|
||||
def getSelected(self):
|
||||
return None
|
||||
|
|
Loading…
Add table
Reference in a new issue