Compare commits
361 commits
pysolfc-2.
...
master
Author | SHA1 | Date | |
---|---|---|---|
|
bdd3093a2b | ||
|
c4a62baf79 | ||
|
b1370fce08 | ||
|
7b85049f7c | ||
|
afc74a86f5 | ||
|
50e003e256 | ||
|
78de569074 | ||
|
a79c81109b | ||
|
c14be7b73e | ||
|
69c1440b2b | ||
|
72386af5e6 | ||
|
a57f1eae38 | ||
|
6f0c6e00e1 | ||
|
512d3ea466 | ||
|
e7e9f0ff87 | ||
|
9773eee2d6 | ||
|
015e860557 | ||
|
04b7eacfcb | ||
|
52e2ffc58f | ||
|
81150b4681 | ||
|
f799093e35 | ||
|
12118d12ed | ||
|
fd4a4e1378 | ||
|
63a63fdfd3 | ||
|
ff9cc5e98c | ||
|
cadf8b2084 | ||
|
f4dec3ed16 | ||
|
5c8d5c26b4 | ||
|
cb0dd1ec2f | ||
|
dc5ab96c80 | ||
|
54a978b4e2 | ||
|
5b9f64a7eb | ||
|
21c2780e8e | ||
|
ed2da8cd46 | ||
|
054c0f0368 | ||
|
487d1c52f3 | ||
|
6852bb40ff | ||
|
6006e0f4c0 | ||
|
68138c7284 | ||
|
96a06108af | ||
|
ac03fa741d | ||
|
7cac54b714 | ||
|
b189c4b3b0 | ||
|
4566cb2fc5 | ||
|
40929f913e | ||
|
ef69c03a38 | ||
|
0cdd06ddad | ||
|
a6827ee7e2 | ||
|
5d1ed621e3 | ||
|
4c031b9686 | ||
|
2c69371265 | ||
|
7940e62285 | ||
|
9cd7a2c5fe | ||
|
5005ef6796 | ||
|
cafdafe047 | ||
|
911f83d249 | ||
|
abb9605dd4 | ||
|
180d3d57df | ||
|
5d9b462304 | ||
|
d18c857a76 | ||
|
d5d426fe91 | ||
|
2e6cb6ad35 | ||
|
c9c315818d | ||
|
4471a8a623 | ||
|
289df06b95 | ||
|
f844c0eae2 | ||
|
a5e0c96450 | ||
|
d36c19b158 | ||
|
61eb1f0361 | ||
|
86d92c2636 | ||
|
5392190c35 | ||
|
cb2252b74e | ||
|
d7d9bb3ea6 | ||
|
8cbac328a9 | ||
|
b6454ce541 | ||
|
0135e386c2 | ||
|
70909f6469 | ||
|
673cb847bc | ||
|
91b1ba9be9 | ||
|
2bfc6bdd3d | ||
|
552585f143 | ||
|
880fb11979 | ||
|
934d82b5f4 | ||
|
87a33b72b1 | ||
|
b7569e79c2 | ||
|
ba202f67c1 | ||
|
d0ca03a49a | ||
|
f448248741 | ||
|
eb3bb5dad8 | ||
|
49e48bada4 | ||
|
dcfac1032d | ||
|
ad39c3aa22 | ||
|
98c9202e34 | ||
|
1fad63af73 | ||
|
f360600fcd | ||
|
b3cdb7e4b8 | ||
|
dab3eea6cb | ||
|
8c58941d23 | ||
|
3778ab2c1f | ||
|
56489cb7bc | ||
|
910f927727 | ||
|
cc32c0373e | ||
|
b77989cbdb | ||
|
41c17c74f3 | ||
|
df8d05e0c5 | ||
|
66995aedaf | ||
|
fbc0817a1e | ||
|
dfd3b063dd | ||
|
83289d5432 | ||
|
4478212d20 | ||
|
dd16750d5f | ||
|
68d6b64fa2 | ||
|
679c9a74c1 | ||
|
4a3d6e7383 | ||
|
148f189a74 | ||
|
1149d4fd4f | ||
|
57adebfcdc | ||
|
83baa54164 | ||
|
d7c145ac18 | ||
|
b74dcde44a | ||
|
bd2edf2f19 | ||
|
792fbca78a | ||
|
a0ea7a3870 | ||
|
166025313b | ||
|
18f8e3e32b | ||
|
fd230df4f2 | ||
|
d15ff23d49 | ||
|
23f41d9553 | ||
|
77f1125156 | ||
|
b26821048c | ||
|
3a356670bb | ||
|
885b2925ab | ||
|
b92debbbfd | ||
|
13c611949d | ||
|
447dc4afea | ||
|
69394fa3b9 | ||
|
180f3fa225 | ||
|
85d455d4f7 | ||
|
6a32b1f2fa | ||
|
ea0ce6f6f3 | ||
|
a42b76d263 | ||
|
3cbcc8d214 | ||
|
0cace3a07b | ||
|
9274e47de6 | ||
|
b3c8390fac | ||
|
b62630ab5f | ||
|
58e2eb89c9 | ||
|
764fb5207e | ||
|
ceee32e212 | ||
|
b951d86579 | ||
|
a189d42328 | ||
|
abd95b8887 | ||
|
90ffaeb2d1 | ||
|
7ef3b1d359 | ||
|
b64ef10374 | ||
|
66d2eaba5f | ||
|
efdb843179 | ||
|
a14eef2b60 | ||
|
69b98c9982 | ||
|
34292e2743 | ||
|
0162c92740 | ||
|
c6ad8148b0 | ||
|
eeea22da7f | ||
|
a7f3741eb3 | ||
|
aa48e35166 | ||
|
f28e69b0b0 | ||
|
e8bc34f6e6 | ||
|
4231e96668 | ||
|
9f78391e0d | ||
|
71e06d4f98 | ||
|
a392ef4054 | ||
|
8a8b00baab | ||
|
be31314271 | ||
|
468feeb4e1 | ||
|
d9d02d47ca | ||
|
526abc03ba | ||
|
c1421fc92f | ||
|
6375d53902 | ||
|
96a071fca0 | ||
|
de50c45145 | ||
|
96700c59e1 | ||
|
713f498068 | ||
|
d3a4548f69 | ||
|
a6df89489a | ||
|
572103b2c4 | ||
|
b31ea75798 | ||
|
77fd05e65a | ||
|
2dfca42824 | ||
|
6c79c25195 | ||
|
1339a22ba4 | ||
|
fc259817aa | ||
|
1753f63034 | ||
|
28808ecc70 | ||
|
32d735defc | ||
|
351abaf907 | ||
|
3e70bdf149 | ||
|
864e1a6fee | ||
|
44cf52f0a3 | ||
|
6f7c243664 | ||
|
fe5013bdea | ||
|
be12039d0f | ||
|
3547c5ad0a | ||
|
4eebd5d33c | ||
|
9559173797 | ||
|
cba1fd815f | ||
|
b42a43fb0f | ||
|
65b013e7c8 | ||
|
9e90157d3e | ||
|
af2f730816 | ||
|
a94d0235b8 | ||
|
4f2f17b166 | ||
|
c36e2c68df | ||
|
6d1b81d57b | ||
|
5b6496432c | ||
|
2a1651cbc0 | ||
|
c50cfdd566 | ||
|
fa63e28f0b | ||
|
20533ac05e | ||
|
ea7fe7c2e8 | ||
|
dc985d5882 | ||
|
c11f57ce11 | ||
|
d7ec6a559a | ||
|
b4998aa341 | ||
|
5ba38d0688 | ||
|
5c4304ba44 | ||
|
d3067f2397 | ||
|
7dd72522c4 | ||
|
caa85016b1 | ||
|
97e90f147c | ||
|
87fe16413e | ||
|
a35f0ad2f5 | ||
|
725ee0dcaa | ||
|
f6b5672cf6 | ||
|
e1b74be079 | ||
|
f466df1644 | ||
|
d0a2b97a9e | ||
|
23657469c4 | ||
|
301d461875 | ||
|
c835bc09aa | ||
|
0ec7bc1cf8 | ||
|
49d4445c6b | ||
|
20e0de112f | ||
|
499439bc13 | ||
|
5852bad127 | ||
|
2017b4f23b | ||
|
2c48745781 | ||
|
a961bca6ff | ||
|
f190b3d30e | ||
|
dda8348806 | ||
|
7bc56fc101 | ||
|
c5b22563a8 | ||
|
611bd37024 | ||
|
917e7a1311 | ||
|
b49f82ad02 | ||
|
9816c15d94 | ||
|
c9194ea419 | ||
|
1df1f6a80c | ||
|
c2bc849fc1 | ||
|
2f87a554be | ||
|
a36cb9ce12 | ||
|
fa0d0cf144 | ||
|
0afc62478e | ||
|
10af041972 | ||
|
9db799f330 | ||
|
3e5631dbb4 | ||
|
50e7d65e31 | ||
|
224d21a2d2 | ||
|
10c6b5c61d | ||
|
a99bacbb83 | ||
|
288bd920af | ||
|
ce0e6ff856 | ||
|
2520934d35 | ||
|
492acd6961 | ||
|
069c8e8a7b | ||
|
b05c922d3b | ||
|
634937b076 | ||
|
78ca717778 | ||
|
c3ffbff146 | ||
|
9609f5e133 | ||
|
9fb0e33cb6 | ||
|
7d1a70564e | ||
|
2811ac4ba8 | ||
|
b91e69964e | ||
|
d613fd8b4b | ||
|
aaed778cd6 | ||
|
6edb6f7222 | ||
|
477fc8202c | ||
|
9a4df67df3 | ||
|
953c3fc9cb | ||
|
9d3bae687d | ||
|
c8ea09c319 | ||
|
3483bd16a8 | ||
|
19639b5727 | ||
|
254f445388 | ||
|
5c51f927eb | ||
|
48f8a70989 | ||
|
c4a18d3557 | ||
|
e01d0fe7a7 | ||
|
92f1870b23 | ||
|
7e43859ad6 | ||
|
c867b2b6d5 | ||
|
b966794a9a | ||
|
7741fa7dcc | ||
|
05fc7a8baa | ||
|
901a04bbb4 | ||
|
0b0f8f6e72 | ||
|
14184fea95 | ||
|
6896284776 | ||
|
5161a82b66 | ||
|
be1929a33e | ||
|
622c8a455c | ||
|
e858b38de1 | ||
|
c027e6ca0e | ||
|
96699c8fa2 | ||
|
529e8c006f | ||
|
a28aaeeb4f | ||
|
0112e831ff | ||
|
55d5111fb4 | ||
|
7dd94e551c | ||
|
969536551e | ||
|
c85cdf608b | ||
|
b455e386f1 | ||
|
ae9aa78cde | ||
|
158c3137fd | ||
|
187bae25cb | ||
|
3649bbb661 | ||
|
e7a1979477 | ||
|
27e11a6a4f | ||
|
40bd9f0093 | ||
|
e5f675d132 | ||
|
c4e87a1294 | ||
|
f947fe084f | ||
|
49fa530d65 | ||
|
efcfba4922 | ||
|
8a1940b3d3 | ||
|
df95421d91 | ||
|
b30334410b | ||
|
f10379af00 | ||
|
8c6310c0b1 | ||
|
bafede48f8 | ||
|
fc84e712b3 | ||
|
96351ef518 | ||
|
3e132dcb94 | ||
|
4674831507 | ||
|
3ef949d461 | ||
|
f9024e563a | ||
|
d6b6eb6b98 | ||
|
d00762b352 | ||
|
d93ad0dbfe | ||
|
29f737c633 | ||
|
7499599ba3 | ||
|
54178a10e5 | ||
|
1e9151eedb | ||
|
867029e24b | ||
|
be47aee6be | ||
|
a01090df65 | ||
|
8fc0f28b2f | ||
|
a8c34cd380 | ||
|
f0fb0500dd | ||
|
fb25046868 | ||
|
13a29b34ea |
|
@ -1,16 +1,16 @@
|
|||
---
|
||||
image: Visual Studio 2019
|
||||
image: Visual Studio 2022
|
||||
environment:
|
||||
matrix:
|
||||
- PYTHON: "C:\\Python311"
|
||||
- PYTHON: "C:\\Python313"
|
||||
# Shamelessly taken from https://github.com/plicease/Dist-Zilla-PluginBundle-Author-Plicease/blob/master/.appveyor.yml
|
||||
# Thanks!
|
||||
install:
|
||||
# - choco install strawberryperl
|
||||
- copy %PYTHON%\python.exe %PYTHON%\python3.exe
|
||||
- SET PATH=%PYTHON%;%PYTHON%\Scripts;C:\strawberry\c\bin;C:\strawberry\perl\site\bin;C:\strawberry\perl\bin;%PATH%
|
||||
- python3 -mpip install Pillow==9.5 attrs configobj flake8 flake8-import-order
|
||||
pycotap pygame pyinstaller pysol-cards random2 setuptools six
|
||||
- python3 -mpip install Pillow attrs configobj flake8 flake8-import-order
|
||||
pycotap pygame pyinstaller pysol-cards setuptools six
|
||||
ttkthemes
|
||||
- perl -v
|
||||
- copy C:\msys64\mingw64\bin\mingw32-make.exe C:\msys64\mingw64\bin\make.exe
|
||||
|
@ -32,13 +32,13 @@ test_script:
|
|||
- gmake pretest
|
||||
- perl run-tests.pl
|
||||
- gmake rules
|
||||
- gmake pot
|
||||
- gmake mo
|
||||
#- gmake pot
|
||||
#- gmake mo
|
||||
- pyinstaller pysol.py --windowed --icon=data\pysol.ico
|
||||
- python3 setup.py install_data -d dist\pysol
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-2.2.0.tar.xz/download -FileName cardsets.tar.xz
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-3.0.0.tar.xz/download -FileName cardsets.tar.xz
|
||||
- 7z x cardsets.tar.xz -so | 7z x -si -ttar
|
||||
- mv PySolFC-Cardsets--Minimal-2.2.0/cardset-* dist/pysol/data
|
||||
- mv PySolFC-Cardsets--Minimal-3.0.0/cardset-* dist/pysol/data
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/pysolfc/files/PySol-Music/PySol-Music-4.50/pysol-music-4.50.tar.xz/download -FileName music.tar.xz
|
||||
- 7z x music.tar.xz -so | 7z x -si -ttar
|
||||
- move pysol-music-4.50\data\music dist\pysol\data\music
|
||||
|
@ -51,7 +51,7 @@ test_script:
|
|||
# For reproducible builds:
|
||||
# See: https://reproducible-builds.org/ .
|
||||
- SET FC_SOLVE_VER=5.20.0
|
||||
- appveyor DownloadFile https://netix.dl.sourceforge.net/project/fc-solve/fc-solve/DO-NOT-USE--fc-solve-for-pysol/fc-solve-for-pysol--v%FC_SOLVE_VER%.zip -FileName fc-solve.zip
|
||||
- appveyor DownloadFile https://sourceforge.net/projects/fc-solve/files/fc-solve/DO-NOT-USE--fc-solve-for-pysol/fc-solve-for-pysol--v%FC_SOLVE_VER%.zip -FileName fc-solve.zip
|
||||
- 7z x fc-solve.zip
|
||||
- move fcs-pysol dist\pysol\freecell-solver
|
||||
- 7z a -r pysol_win_dist.7z dist\pysol\
|
||||
|
|
2
.github/workflows/ci.yml
vendored
|
@ -23,7 +23,7 @@ jobs:
|
|||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
python -m pip install flake8 flake8-import-order \
|
||||
attrs configobj pycotap pysol-cards random2 setuptools six
|
||||
attrs configobj pycotap pysol-cards setuptools six
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
- name: Lint with flake8
|
||||
run: |
|
||||
|
|
12
.github/workflows/macos-package.yml
vendored
|
@ -7,7 +7,7 @@ on:
|
|||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: macos-12
|
||||
runs-on: macos-14
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
|
@ -23,14 +23,14 @@ jobs:
|
|||
run: |
|
||||
python3 -m pip install --upgrade pip
|
||||
python3 -m pip install --no-binary=Pillow \
|
||||
Pillow attrs configobj py2app pycotap pygame pysol-cards random2 setuptools six ttkthemes
|
||||
Pillow attrs configobj py2app pycotap pygame pysol-cards setuptools six ttkthemes
|
||||
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
|
||||
brew install create-dmg
|
||||
- name: Get cardsets
|
||||
run: |
|
||||
wget -O cardsets-pack.tar.xz "https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-2.2.0.tar.xz/download"
|
||||
wget -O cardsets-pack.tar.xz "https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-3.0.0.tar.xz/download"
|
||||
tar -xJf cardsets-pack.tar.xz
|
||||
mv PySolFC-Cardsets--Minimal-2.2.0/cardset-* data
|
||||
mv PySolFC-Cardsets--Minimal-3.0.0/cardset-* data
|
||||
- name: Prepare game rules (process the HTML) and translations
|
||||
run: |
|
||||
make rules mo
|
||||
|
@ -49,12 +49,12 @@ jobs:
|
|||
--skip-jenkins
|
||||
PySolFC.dmg dist
|
||||
- name: Upload zipped app
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pysolfc-app
|
||||
path: PySolFC-app.zip
|
||||
- name: Upload dmg
|
||||
uses: actions/upload-artifact@v2
|
||||
uses: actions/upload-artifact@v4
|
||||
with:
|
||||
name: pysolfc-dmg
|
||||
path: PySolFC.dmg
|
||||
|
|
6
.gitignore
vendored
|
@ -10,7 +10,6 @@
|
|||
/html
|
||||
/html-src/html/*
|
||||
/images
|
||||
/locale/*
|
||||
/po/de.po
|
||||
/po/fr.po
|
||||
/po/it.po
|
||||
|
@ -23,11 +22,16 @@ PySolFC-Cardsets--Minimal-2.0.*
|
|||
PySolFC-Cardsets--Minimal-2.0/
|
||||
PySolFC-Cardsets-2.0.*
|
||||
PySolFC-Cardsets-2.0/
|
||||
PySolFC-Cardsets--Minimal-3.0.*
|
||||
PySolFC-Cardsets--Minimal-3.0/
|
||||
PySolFC-Cardsets-3.0.*
|
||||
PySolFC-Cardsets-3.0/
|
||||
android/*.apk
|
||||
android/*.zip
|
||||
android/bin/keystore
|
||||
buildozer/.buildozer*
|
||||
buildozer/PySolFC-Cardsets*
|
||||
buildozer/cardsets
|
||||
buildozer/bin
|
||||
buildozer/tmp
|
||||
buildozer/support*
|
||||
|
|
|
@ -30,8 +30,8 @@ deploy:
|
|||
before_install:
|
||||
- if test "$TRAVIS_OS_NAME" = "osx" ; then
|
||||
wget --content-disposition https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/minimal/PySolFC-Cardsets--Minimal-2.2.0.tar.xz/download &&
|
||||
tar xJf PySolFC-Cardsets--Minimal-2.2.0.tar.xz &&
|
||||
mv PySolFC-Cardsets--Minimal-2.2.0/cardset-* data ;
|
||||
tar xJf PySolFC-Cardsets--Minimal-3.0.0.tar.xz &&
|
||||
mv PySolFC-Cardsets--Minimal-3.0.0/cardset-* data ;
|
||||
fi
|
||||
- if test "$TRAVIS_OS_NAME" = "osx" ; then
|
||||
PYVER=3.9.1 &&
|
||||
|
@ -46,7 +46,7 @@ install:
|
|||
# Tests are failing for them sometimes
|
||||
- cpanm --notest Capture::Tiny IPC::System::Simple
|
||||
- cpanm Code::TidyAll::Plugin::Flake8 Perl::Tidy Test::Code::TidyAll Test::Differences Test::TrailingSpace
|
||||
- export PY_MODS='attrs configobj pycotap pysol-cards random2 setuptools six'
|
||||
- export PY_MODS='attrs configobj pycotap pysol-cards setuptools six'
|
||||
- if test "$TRAVIS_OS_NAME" = "osx" ; then export PY_MODS="--no-binary=Pillow Pillow $PY_MODS" ; fi
|
||||
- sudo -H pip3 install --upgrade wheel
|
||||
- sudo -H pip3 install --upgrade $PY_MODS flake8 flake8-import-order
|
||||
|
|
|
@ -11,12 +11,12 @@ Main Authors
|
|||
* macOS package maintainer
|
||||
* [Shlomi Fish](https://www.shlomifish.org/)
|
||||
* Continued PySolFC maintenance, port to python 3, test suite (Note: he places all his changes under the Expat licence).
|
||||
* https://github.com/lufebe16
|
||||
* Added the Kivy toolkit
|
||||
* [lufebe16](https://github.com/lufebe16)
|
||||
* Added the Kivy toolkit and all the Android app related code and build procedures.
|
||||
* [Roderik Ploszek](https://github.com/Programator2)
|
||||
* Fixes and enhancements
|
||||
* [Joe R.](https://github.com/joeraz)
|
||||
* Continued PySolFC maintenance and development.
|
||||
* Many new games and continued PySolFC maintenance and development.
|
||||
|
||||
Games contributors
|
||||
==================
|
||||
|
@ -36,6 +36,7 @@ Enhancements
|
|||
|
||||
* [ghostofiht](https://github.com/ghostofiht) - Contributed a new logo design.
|
||||
* [Trueno font](https://fontlibrary.org/en/font/trueno) under the [OFL](https://en.wikipedia.org/wiki/SIL_Open_Font_License) by [Julieta Ulanovsky](http://www.zkysky.com.ar/) - used in the logo.
|
||||
* [Remix Icon](https://remixicon.com/) - used for many icons throughout the app.
|
||||
|
||||
Translations
|
||||
============
|
||||
|
|
|
@ -7,7 +7,7 @@ for general guidelines for contributing to open source.
|
|||
|
||||
- The [GitHub Actions CI build](https://github.com/shlomif/PySolFC/actions) and [AppVeyor build](https://ci.appveyor.com/project/shlomif/pysolfc) (which also run the test suite) should pass on each commit.
|
||||
- Your contributions should be under [GPLv3+](https://en.wikipedia.org/wiki/GNU_General_Public_License#Version_3) or a [compatible free software licence](https://www.gnu.org/licenses/license-list.html#GPLCompatibleLicenses), but please don't put them under the [AGPL](https://en.wikipedia.org/wiki/Affero_General_Public_License), which adds additional restrictions.
|
||||
- The code should be compatible with both Python 2.7.x and Python 3.4.x-and-above.
|
||||
- The code should be compatible with Python 3.7 and above.
|
||||
|
||||
# How you can contribute
|
||||
|
||||
|
@ -32,7 +32,7 @@ custom variants. It lives in the Edit menu.
|
|||
|
||||
Otherwise, the games' sources live under
|
||||
[the pysollib/games/](pysollib/games/) directory in the repository, and are
|
||||
written in Python 2.7/3.x and you can try inheriting from an existing
|
||||
written in Python 3.x and you can try inheriting from an existing
|
||||
variant [class](https://en.wikipedia.org/wiki/Class_%28computer_programming%29).
|
||||
|
||||
In addition to adding the game's source code, be sure to add the game's metadata. At minimum, you should:
|
||||
|
@ -49,6 +49,8 @@ or Google Drive).
|
|||
|
||||
# The Release Process
|
||||
|
||||
Before publishing a release, please open an issue in GitHub, indicating your intent to do so, to confirm with any other developers if they have any objections, or any WIP features/tickets that should be included in the upcoming release. It's best to do this a week or two before you plan to actually publish the release. No responses on this for a couple weeks can be considered approval to proceed. Releases tagged without verifying with other developers may be removed.
|
||||
|
||||
In order to publish a new version, follow these steps:
|
||||
|
||||
1. Update `NEWS.asciidoc`. The release notes should also be added to `html-src/news.html`, along with `templates/index.html` in the website repo.
|
||||
|
@ -64,3 +66,15 @@ In order to publish a new version, follow these steps:
|
|||
11. Use [rexz9](https://github.com/shlomif/shlomif-computer-settings/blob/567b6ab3f4272ad66bf331536dc80bf58bfff3af/shlomif-settings/bash-aliases/user_aliases.bash#L57) on `dist/PySol*.tar.xz`.
|
||||
12. Go to https://sourceforge.net/projects/pysolfc/files/PySolFC/ and add a folder called PySolFC-2.6.5 (note the capitalisation).
|
||||
13. Add the tar.xz, the .exe and the .dmg there and mark them as defaults for the right OSes.
|
||||
|
||||
# Long-term, large-scale, tasks
|
||||
|
||||
Support SVG cardsets.
|
||||
|
||||
An optional [REPL](https://en.wikipedia.org/wiki/Read%E2%80%93eval%E2%80%93print_loop) (Read-eval-print loop)
|
||||
|
||||
Listen on a TCP / HTTP+REST port.
|
||||
|
||||
A web-based version.
|
||||
|
||||
Support a more secure saved-games format than the pickle-based-one.
|
||||
|
|
|
@ -12,7 +12,7 @@ include pysollib/winsystems/*.py
|
|||
include pysollib/tk/*.py pysollib/tile/*.py pysollib/pysolgtk/*.py
|
||||
include pysollib/game/*.py
|
||||
include pysollib/games/*.py pysollib/games/special/*.py
|
||||
include pysollib/games/ultra/*.py pysollib/games/mahjongg/*.py
|
||||
include pysollib/games/mahjongg/*.py
|
||||
include data/tcl/*.tcl
|
||||
include data/pysol.desktop
|
||||
include data/pysolfc.glade
|
||||
|
|
|
@ -1,5 +1,28 @@
|
|||
[[news]]
|
||||
=== News
|
||||
* _11 January, 2025:_ There is a new stable release
|
||||
https://sourceforge.net/projects/pysolfc/files/PySolFC/PySolFC-3.2.0/[PySolFC
|
||||
v3.2.0]. New in this release:
|
||||
** New fullscreen mode, accessible by pressing F11.
|
||||
** Easy option to clear advanced search options.
|
||||
** Lots of bugfixes and enhancements.
|
||||
* _19 October, 2024:_ There is a new stable release
|
||||
https://sourceforge.net/projects/pysolfc/files/PySolFC/PySolFC-3.1.0/[PySolFC
|
||||
v3.1.0]. New in this release:
|
||||
** Ten new games.
|
||||
** Cleanup of duplicate images to reduce package size.
|
||||
** Some extra cardset/table tile filter options.
|
||||
** Many enhancements, bugfixes, etc.
|
||||
* _31 March, 2024:_ There is a new stable release
|
||||
https://sourceforge.net/projects/pysolfc/files/PySolFC/PySolFC-3.0.0/[PySolFC
|
||||
v3.0.0] - the biggest release in over 15 years. Additionally, there is a new Cardsets release
|
||||
https://sourceforge.net/projects/pysolfc/files/PySolFC-Cardsets/PySolFC-Cardsets-3.0/[PySolFC-Cardsets v.3.0]. New in this release:
|
||||
** 120 new games.
|
||||
** Support for several new types of games/decks, including tile puzzles, Ishido-type tile matching games, joker deck games, and more.
|
||||
** New game and cardset categories.
|
||||
** Ability to change the style of virtually any of the graphics in PySol.
|
||||
** Some UI/Quality of Life improvements.
|
||||
** Bugfixes.
|
||||
* _10 July, 2023:_ There is a new beta release
|
||||
https://sourceforge.net/projects/pysolfc/files/PySolFC/PySolFC-2.21.0/[PySolFC
|
||||
v2.21.0]. New in this release:
|
||||
|
|
|
@ -1,17 +1,28 @@
|
|||
|
||||
Prerequisites (needs root):
|
||||
History:
|
||||
--------
|
||||
|
||||
IMPORTANT:
|
||||
Scripts and instruction in directory 'android' are OUTDATED and
|
||||
not maintained any more. Instead refer to directory 'buildozer'.
|
||||
The Android project was created in 2016 as a separate project (on Bitbucket)
|
||||
forked from a long inactive Sourceforge repository by lufebe16. The first
|
||||
version (as 0.8) was released with fdroid in March 2017.
|
||||
|
||||
You need a linux workstation (either native or virtual). No graphic
|
||||
desktop is needed, cmdline only is sufficient.
|
||||
In 2016, shlomif started working diligently on the official project.
|
||||
Following his request to combine these two projects, the Android version
|
||||
was merged into his repo (now on github) in February 2018. The
|
||||
first joint version (as 2.2.0) was released in April 2018.
|
||||
|
||||
|
||||
Build Prerequisites (needs root):
|
||||
---------------------------------
|
||||
|
||||
You need a linux workstation (either native or virtual). It needs
|
||||
x86 hardware (either intel or amd). No graphic desktop is needed,
|
||||
cmdline only is sufficient.
|
||||
|
||||
On freshly installed systems you will need to add about the
|
||||
following packages:
|
||||
|
||||
On a 'freshly installed' Ubuntu or Debain , the following
|
||||
On a 'freshly installed' Ubuntu or Debian, the following
|
||||
additional packages had to be installed:
|
||||
|
||||
- python-setuptools
|
||||
|
@ -37,7 +48,7 @@ Prerequisites (needs root):
|
|||
- dev-vcs/git
|
||||
- dev-java/ant
|
||||
|
||||
For further instructions consult buildozer/build-instruction.txt.
|
||||
For detailed instructions consult buildozer/build-instruction.txt.
|
||||
|
||||
NOTES:
|
||||
1) This information is supplied to give you a hint, when running into
|
||||
|
@ -46,40 +57,27 @@ Prerequisites (needs root):
|
|||
6 GB of free disk space.
|
||||
|
||||
Cardsets:
|
||||
---------
|
||||
|
||||
The Apk includes a minimal set of cards for playing.
|
||||
|
||||
On Android 9 and lower you can also add additional cardsets:
|
||||
Additional user supplied data:
|
||||
------------------------------
|
||||
|
||||
Additional cardsets can be installed in ${HOME}/.PySolFC/cardsets/.
|
||||
On an android device this is equivalent to /sdcard/.PySolFC/cardsets/.
|
||||
Cardsets must use the 'png' image format. Use scripts/cardconv
|
||||
(on a linux system) to convert them, before copying them to the device.
|
||||
NOTE:
|
||||
To be able to add additional resources to your app, you need to
|
||||
enable storage access in the android settings for the app. Go to
|
||||
Settings/Apps/PySolFC/Permissions.
|
||||
|
||||
IMPORTANT: This can only be supported for Android Version 9 and lower.
|
||||
Android as of Version 10 and later restricts access to so called
|
||||
'external-storage' drasitcally. There is currently no way around it
|
||||
with the given application.
|
||||
Resources are stored in ~/.PySolFC/. On an android device this is
|
||||
equivalent to /sdcard/.PySolFC/.
|
||||
|
||||
LB230301.
|
||||
Additional cardsets can be installed in ~/.PySolFC/cardsets/.
|
||||
Important: Cardsets must use the 'png' image format. Use
|
||||
scripts/cardconv (on a gnu/linux system) to convert, before copying
|
||||
them to the device.
|
||||
|
||||
(After new changes as of 27.3.23 - not contained in the last f-droid
|
||||
version):
|
||||
|
||||
Allow external storage access for Android 10 and later.
|
||||
|
||||
- on Android 10 it ist still possible to write to the extenal storage. A
|
||||
user has to manually allow at least access to media files in the
|
||||
settings for the app.
|
||||
- For later Versions the MANAGE_EXTERNAL_STORAGE permission was added
|
||||
to the Android Manifest. If the Android 12 user wants to store
|
||||
and read Files from /sdcard/.PySolFC directory he/she can enable
|
||||
'Allow management of all Files' in the settings.
|
||||
NOTE:
|
||||
This is actually against the policies of Google and such an app
|
||||
would fairliy get published on Play Store - but its the simplest
|
||||
way to get this working again. Only users that need this (e.g. because
|
||||
they want to install additional Cardsets) need to do that. The app will
|
||||
never query you for that. You may do it on your own.
|
||||
|
||||
LB230327.
|
||||
Byond cardsets you may also wish to add your own backgrounds. You can
|
||||
add them to ~/.PySolFC/data/tiles (patterns) and to
|
||||
~/.PySolFC/data/tiles/save-aspect/ (images). 'png' and 'jpg' image
|
||||
formats are supported.
|
||||
|
|
30
README.kivy
|
@ -2,7 +2,7 @@
|
|||
Introduction
|
||||
------------
|
||||
|
||||
This is a version of the PySol FC open source project
|
||||
This is a version of the PySolFC open source project
|
||||
(http://pysolfc.sourceforge.net)
|
||||
|
||||
Early investigations of the code showed, that it would not be
|
||||
|
@ -25,24 +25,18 @@ Images
|
|||
The original images supplied by the collection are of type
|
||||
gif. In kivy, that image type loads very slowly. Moreover, many
|
||||
cards cannot be loaded, because of decoding errors.
|
||||
To prevent these problems, the kivy version was
|
||||
modified to not read any gif images.
|
||||
To prevent these problems, the kivy version was modified to not read
|
||||
any gif images.
|
||||
|
||||
Some cardsets have been translated to PNG, a format
|
||||
that is processed by both the tk and the kivy versions.
|
||||
For all GIF images in the directories data/images and data/tiles,
|
||||
corresponding images in the PNG format have been added.
|
||||
|
||||
Some others, for which transparency information is not
|
||||
processed correctly even from the PBF images, have been translated
|
||||
to the BMP image format (while keeping their GIF variant for
|
||||
the tk version). BMP format is only processed by the
|
||||
kivy version.
|
||||
To convert the cardsets to png format, a shell script, 'cardconv' , has been
|
||||
added to the scripts directory. It requires Bash and ImageMagick
|
||||
to be installed.
|
||||
|
||||
Additional cardsets are available from the SourceForge
|
||||
project. To use them with kivy, they need to be converted to
|
||||
the BMP format. A shell script, 'cardconv' , has been added
|
||||
to the scripts directory (it requires Bash and ImageMagick).
|
||||
Additional cardsets are available from the SourceForge project. To use
|
||||
them with kivy, make sure they to also convert them to the png format if
|
||||
needed.
|
||||
|
||||
For all GIF images in the directories data/images and data/tiles ,
|
||||
corresponding images in the PNG format have been added too.
|
||||
|
||||
LB170321.
|
||||
LB230126.
|
||||
|
|
21
README.md
|
@ -31,7 +31,7 @@ can be implemented.
|
|||
|
||||
## Requirements.
|
||||
|
||||
- Python (2.7 or 3.x)
|
||||
- Python (3.7 or later)
|
||||
- Tkinter (Tcl/Tk 8.4 or later)
|
||||
|
||||
- For sound support (optional)
|
||||
|
@ -97,10 +97,10 @@ cd PySolFC
|
|||
gmake test
|
||||
gmake rules
|
||||
ln -s data/images images
|
||||
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Needs to be downloaded from sourceforge
|
||||
tar -xvf PySolFC-Cardsets-3.0.tar.bz2 # Needs to be downloaded from sourceforge
|
||||
mkdir -p ~/.PySolFC
|
||||
rmdir ~/.PySolFC/cardsets
|
||||
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
|
||||
ln -s "`pwd`/PySolFC-Cardsets-3.0" ~/.PySolFC/cardsets
|
||||
python pysol.py
|
||||
```
|
||||
|
||||
|
@ -118,21 +118,18 @@ per the instructions above.
|
|||
At the moment, this only works on POSIX (Linux, FreeBSD and similar) systems.
|
||||
Windows and Mac users - you'll need to chip in with a script for your system.
|
||||
|
||||
#### 1 - Install build prerequisites: six, random2 and pysol-cards
|
||||
#### 1 - Install build prerequisite: pysol-cards
|
||||
|
||||
This is kind of stupid and maybe it can be fixed in the future, but for now:
|
||||
|
||||
```
|
||||
pip install six
|
||||
pip install random2
|
||||
pip install pysol-cards
|
||||
```
|
||||
|
||||
You may want to use your OS distribution package system instead, for example:
|
||||
|
||||
```
|
||||
sudo apt-get install python-six
|
||||
sudo apt-get install python-random2
|
||||
sudo apt-get install python3-pysol-cards
|
||||
```
|
||||
|
||||
For Pillow compilation, libjpeg headers and libraries need to be available:
|
||||
|
@ -173,7 +170,7 @@ mkdir -p "$PKGTREE"
|
|||
|
||||
### Alternate toolkit.
|
||||
|
||||
- Kivy (10.0 or later)
|
||||
- Kivy
|
||||
- Features:
|
||||
- Sound support integrated.
|
||||
- Android apk build support.
|
||||
|
@ -189,7 +186,11 @@ On the basis of Kivy an Android App is also available. You may build
|
|||
your own using appropriate build instructions in README.android and
|
||||
in Directory buildozer.
|
||||
|
||||
Some versions will also be published on F-droid (https://f-droid.org)
|
||||
Some versions will also be published on F-droid.
|
||||
|
||||
[<img src="https://fdroid.gitlab.io/artwork/badge/get-it-on.png"
|
||||
alt="Get it on F-Droid"
|
||||
height="80">](https://f-droid.org/packages/org.lufebe16.pysolfc/)
|
||||
|
||||
|
||||
### Configuring Freecell Solver
|
||||
|
|
Before Width: | Height: | Size: 1,001 KiB After Width: | Height: | Size: 972 KiB |
Before Width: | Height: | Size: 1.2 MiB After Width: | Height: | Size: 1.1 MiB |
Before Width: | Height: | Size: 660 KiB After Width: | Height: | Size: 642 KiB |
|
@ -1,7 +0,0 @@
|
|||
|
||||
|
||||
This android build setup ist out-dated.
|
||||
Please use the new setup presented in directory
|
||||
buildozer.
|
||||
|
||||
LB221118.
|
|
@ -1,16 +0,0 @@
|
|||
Actions to take upon a freshly installed Debian stretch/xfce (virtualbox).
|
||||
|
||||
Do something like:
|
||||
|
||||
user$ su
|
||||
- enter root password.
|
||||
|
||||
root$ ./apt-install.sh
|
||||
- .... some output.
|
||||
|
||||
root$ exit
|
||||
|
||||
Now all required packages are installed to proceed with the
|
||||
android build.
|
||||
|
||||
LB170709.
|
|
@ -1,34 +0,0 @@
|
|||
#!/bin/sh
|
||||
set -e
|
||||
|
||||
# install as root
|
||||
|
||||
apt-get install -y \
|
||||
git \
|
||||
openjdk-8-jdk \
|
||||
cython3 \
|
||||
python3-pip \
|
||||
python3-yaml \
|
||||
virtualenv \
|
||||
pkg-config \
|
||||
automake autoconf libtool \
|
||||
zlib1g-dev \
|
||||
libsdl2-dev libsdl2-image-dev libsdl2-mixer-dev libsdl2-ttf-dev \
|
||||
libtinfo5 \
|
||||
lld
|
||||
|
||||
update-alternatives --set java /usr/lib/jvm/java-8-openjdk-amd64/jre/bin/java
|
||||
|
||||
apt-get install -y --no-install-recommends \
|
||||
imagemagick \
|
||||
python3-tk \
|
||||
ccache \
|
||||
libltdl-dev
|
||||
|
||||
# set python3 as default.
|
||||
# make python alternatives selectable.
|
||||
# (debian stretch, adapt for different versions)
|
||||
|
||||
update-alternatives --install /usr/bin/python python /usr/bin/python2.7 1
|
||||
update-alternatives --install /usr/bin/python python /usr/bin/python3.5 2
|
||||
|
|
@ -1,31 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
# This script mimics the instructions laid out in the p4a documentation:
|
||||
# https://python-for-android.readthedocs.io/en/latest/quickstart/
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
urlbase=https://dl.google.com/android/repository/
|
||||
|
||||
if [[ -d $ndkdir ]]; then
|
||||
echo "Skipping NDK installation: NDK directory already exists."
|
||||
else
|
||||
mkdir -p $ndkdir
|
||||
ndk_zip=android-ndk-${ndkver}-linux-x86_64.zip
|
||||
[ -a $ndk_zip ] || wget $urlbase/$ndk_zip
|
||||
unzip -d $(dirname $ndkdir) $ndk_zip
|
||||
fi
|
||||
|
||||
if [[ -d $sdkdir ]]; then
|
||||
echo "Skipping SDK installation: SDK directory already exists."
|
||||
else
|
||||
mkdir -p $sdkdir
|
||||
tools_zip=sdk-tools-linux-4333796.zip
|
||||
[ -a $tools_zip ] || wget $urlbase/$tools_zip
|
||||
unzip -d $sdkdir $tools_zip
|
||||
|
||||
$sdkdir/tools/bin/sdkmanager 'platforms;android-27'
|
||||
$sdkdir/tools/bin/sdkmanager 'build-tools;29.0.1'
|
||||
fi
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
# Download android support library from maven
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
liburl="https://maven.google.com/com/android/support/support-v4/24.1.1"
|
||||
libname="support-v4-24.1.1.aar"
|
||||
|
||||
. mkp4a.preload supportlib ${liburl} ${libname}
|
|
@ -1,37 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# PySol -- a Python Solitaire game
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING.
|
||||
# If not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# Starter for kivy/android using buildozer: Needs an explizitly
|
||||
# named main.py as startpoint.
|
||||
|
||||
import sys
|
||||
if '--kivy' not in sys.argv:
|
||||
sys.argv.append('--kivy')
|
||||
|
||||
runmain = True
|
||||
if runmain:
|
||||
from pysollib.init import init
|
||||
init()
|
||||
|
||||
if runmain:
|
||||
from pysollib.main import main
|
||||
sys.exit(main(sys.argv))
|
|
@ -1,27 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
echo '### prepare cardsets'
|
||||
|
||||
if [ ! -f ${cardsets_file} ]; then
|
||||
echo '### downloading cardsets'
|
||||
wget https://netix.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/minimal/${cardsets_file}
|
||||
fi
|
||||
|
||||
if [ ! -d ${cardsets_dir} ]; then
|
||||
echo '### extracting cardsets'
|
||||
tar -xf ${cardsets_file}
|
||||
fi
|
||||
|
||||
echo '### processing cardsets'
|
||||
(
|
||||
cd ${cardsets_dir}
|
||||
../../scripts/cardconv gif png
|
||||
for i in cardset-*-png; do
|
||||
rm -rf `basename $i -png`
|
||||
done
|
||||
)
|
||||
|
||||
echo '### end cardsets'
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
# memo:
|
||||
# keytool -genkey -v -keystore my-release-keystore -alias alias_name -keyalg RSA -keysize 2048 -validity 12000
|
||||
|
||||
mkdir -p bin
|
||||
|
||||
if [ -f ./bin/keystore ]; then
|
||||
echo "keystore is already defined"
|
||||
else
|
||||
keytool -genkey -v -keystore ./bin/keystore -alias python -keyalg RSA -keysize 2048 -validity 12000
|
||||
fi
|
|
@ -1,8 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
rm -rf tmp
|
||||
python3 -m pythonforandroid.toolchain clean_dists
|
||||
python3 -m pythonforandroid.toolchain clean_builds
|
||||
rm -f *.apk
|
||||
rm -rf PySolFC-Cardsets--Minimal-2.2.0
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
rm -rf tmp
|
||||
rm -f *.apk
|
||||
rm -f *.bz2
|
||||
rm -f *.zip
|
||||
rm -rf PySolFC-Cardsets-2.0
|
||||
rm -rf ~/.local/share/python-for-android/packages
|
||||
rm -rf ~/.local/share/python-for-android/build
|
||||
rm -rf ~/.local/share/python-for-android/dists
|
||||
python3 -m pip uninstall python-for-android -y
|
||||
exit 0
|
|
@ -1,36 +0,0 @@
|
|||
# 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.2.0'
|
||||
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"
|
|
@ -1,11 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
new_options=${p4a_options}
|
||||
new_options=${new_options/PySolFC/PySolFCdbg}
|
||||
new_options=${new_options/org.lufebe16.pysolfc/org.lufebe16.pysolfc.dbg}
|
||||
|
||||
python3 -m pythonforandroid.toolchain apk \
|
||||
${new_options}
|
|
@ -1,71 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
# NOTE: $1 will be set with fdroid builds only.
|
||||
|
||||
echo '### prepare sdk'
|
||||
|
||||
if [[ $# == 0 ]]
|
||||
then
|
||||
./initsupport
|
||||
./initsdk
|
||||
fi
|
||||
|
||||
echo '### install p4a'
|
||||
|
||||
if [[ $# == 0 ]]
|
||||
then
|
||||
if not python3 -m pip install -q --user "python-for-android==${p4aver}"
|
||||
then
|
||||
echo "obviously inside a virtualenv, so omit --user"
|
||||
if python3 -m pip install -q "python-for-android==${p4aver}"
|
||||
then
|
||||
echo "done"
|
||||
fi
|
||||
else
|
||||
echo "done"
|
||||
fi
|
||||
fi
|
||||
|
||||
echo '### prepare source'
|
||||
|
||||
(cd .. && make rules && make all_games_html && make mo)
|
||||
|
||||
mkdir -p ${tmpdir}
|
||||
rm -rf ${tmpdir}
|
||||
cp -a .. ${tmpdir}
|
||||
rm -rf ${tmpdir}/android
|
||||
rm -rf ${tmpdir}/src
|
||||
|
||||
# remove useless load from the app
|
||||
rm -rf ${tmpdir}/.git
|
||||
rm -rf ${tmpdir}/.gitignore
|
||||
rm -rf ${tmpdir}/Screenshots
|
||||
rm -rf ${tmpdir}/build
|
||||
rm -rf ${tmpdir}/contrib
|
||||
rm -rf ${tmpdir}/dist
|
||||
rm -rf ${tmpdir}/runtests.pl
|
||||
rm -rf ${tmpdir}/tests
|
||||
rm -rf ${tmpdir}/Brewfile
|
||||
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 ${pkgdir}/supportlib/support-v4-24.1.1.aar ${tmpdir}
|
||||
cp -a main.py ${tmpdir}
|
||||
mkdir -p ${tmpdir}/data/images/cards/bottoms/trumps-only
|
||||
echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep
|
||||
|
||||
echo '### prepare cardsets'
|
||||
|
||||
./mkcards
|
||||
|
||||
cp -a ${cardsets_dir}/* ${tmpdir}/data
|
||||
|
||||
echo '### end init'
|
|
@ -1,30 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# package preload helper for fdroid build.
|
||||
|
||||
set -eux
|
||||
|
||||
if [[ $# < 3 ]]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
packagebase=${HOME}'/.local/share/python-for-android/packages'
|
||||
|
||||
packagedir=${packagebase}/$1
|
||||
packageurl=$2
|
||||
packagename=$3
|
||||
packagemark='.mark-'${packagename}
|
||||
|
||||
if [[ $# == 4 ]]
|
||||
then
|
||||
packagemark='.mark'$4
|
||||
fi
|
||||
|
||||
mkdir -p ${packagedir}
|
||||
cd ${packagedir}
|
||||
if [ ! -f ${packagemark} ]
|
||||
then
|
||||
wget -nv ${packageurl}/${packagename}
|
||||
touch ${packagemark}
|
||||
fi
|
|
@ -1,43 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
pass1=""
|
||||
pass2=""
|
||||
keyalias="python"
|
||||
keystore="${PWD}/bin/keystore"
|
||||
if [ $1 ]; then
|
||||
pass1=$1
|
||||
pass2=$1
|
||||
else
|
||||
echo "usage: ./mkp4a.release <keystore-password> [<keyalias-password>] [<keyalias>] [<keystore-path>]"
|
||||
echo " (use ./mkkeystore to create one in default location)"
|
||||
exit
|
||||
fi
|
||||
if [ $2 ]; then
|
||||
pass2=$2
|
||||
fi
|
||||
if [ $3 ]; then
|
||||
keyalias=$3
|
||||
fi
|
||||
if [ $4 ]; then
|
||||
keystore=$4
|
||||
fi
|
||||
|
||||
export P4A_RELEASE_KEYSTORE="$keystore"
|
||||
export P4A_RELEASE_KEYSTORE_PASSWD="$pass1"
|
||||
export P4A_RELEASE_KEYALIAS_PASSWD="$pass2"
|
||||
export P4A_RELEASE_KEYALIAS="$keyalias"
|
||||
|
||||
python3 -m pythonforandroid.toolchain apk \
|
||||
${p4a_options} \
|
||||
--release \
|
||||
--sign
|
||||
|
||||
# keystore options (instead environment vars):
|
||||
#
|
||||
# keystore: --keystore <file>
|
||||
# key alias --signkey <keyalias>
|
||||
# keystore passwd --keystorepw <pass1>
|
||||
# key passwd --signkeypw <pass2>
|
|
@ -1,29 +0,0 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
. mkp4a.common
|
||||
|
||||
# NOTE: $1 and $2 (sdk and ndk) used with fdroid build only.
|
||||
|
||||
if [[ $# == 2 ]]
|
||||
then
|
||||
sdkdir=$1
|
||||
ndkdir=$2
|
||||
fi
|
||||
|
||||
python3 -m pythonforandroid.toolchain apk \
|
||||
${p4a_options} \
|
||||
--sdk-dir ${sdkdir} \
|
||||
--ndk-dir ${ndkdir} \
|
||||
--release
|
||||
|
||||
# python3 -m pythonforandroid.toolchain apk
|
||||
# ...
|
||||
# --release #1
|
||||
# --sign #2
|
||||
# ...
|
||||
#
|
||||
# ad 1,2:
|
||||
# ohne: -> debug version
|
||||
# 1: -> release unsigned
|
||||
# 1 und 2: -> release version.
|
|
@ -1,33 +0,0 @@
|
|||
#!/usr/bin/env python3
|
||||
# ---------------------------------------------------------------------------
|
||||
#
|
||||
# PySol -- a Python Solitaire game
|
||||
#
|
||||
# This program is free software; you can redistribute it and/or modify
|
||||
# it under the terms of the GNU General Public License as published by
|
||||
# the Free Software Foundation; either version 2 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program; see the file COPYING.
|
||||
# If not, write to the Free Software Foundation, Inc.,
|
||||
# 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
|
||||
#
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# import pychecker.checker
|
||||
|
||||
# Starter for kivy/android using buildozer: Needs an explizitly
|
||||
# named main.py as startpoint.
|
||||
|
||||
if True:
|
||||
import sys
|
||||
sys.path.insert(0, '..')
|
||||
if True:
|
||||
from pysollib.settings import VERSION
|
||||
print(VERSION)
|
|
@ -9,7 +9,7 @@
|
|||
<name>PySolFC</name>
|
||||
<summary>Solitaire game compilation</summary>
|
||||
<description>
|
||||
<p>A collection of more than 1000 Solitaire games, using various deck types
|
||||
<p>A collection of more than 1200 Solitaire games, using various deck types
|
||||
including international standard, hex-a-deck, mahjongg, and hanafuda.</p>
|
||||
</description>
|
||||
<launchable type="desktop-id">pysol.desktop</launchable>
|
||||
|
|
19
buildozer/aversion
Executable file
|
@ -0,0 +1,19 @@
|
|||
#!/bin/bash
|
||||
|
||||
appdir=""
|
||||
if [ "$1" ]
|
||||
then
|
||||
appdir=$1
|
||||
else
|
||||
exit 1
|
||||
fi
|
||||
|
||||
# current android version mumber.
|
||||
version="3.2.0"
|
||||
sversion=$(echo $version | sed -E "s:(.*)\..*:\1:")
|
||||
tuple=$(echo $version | sed -E "s:(.*)\.(.*)\.(.*):(\1, \2, \3):")
|
||||
|
||||
# patch different version info accordingly.
|
||||
sed -E "s:VERSION_TUPLE =.*:VERSION_TUPLE = $tuple:" -i $appdir/pysollib/settings.py
|
||||
sed -E "s:(.*\(')dev(',.*):\1fc-$sversion\2:" -i $appdir/pysollib/gamedb.py
|
||||
echo "VERSION = $version"
|
|
@ -13,10 +13,12 @@ and through pip.
|
|||
Prepare
|
||||
-------
|
||||
|
||||
First create and enter a virtualenv and load all
|
||||
Move to directory buildozer.
|
||||
|
||||
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
|
||||
|
||||
|
|
|
@ -2,8 +2,6 @@
|
|||
set -eux
|
||||
|
||||
tmpdir=./tmp
|
||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||
cardsets_file=${cardsets_dir}.tar.xz
|
||||
|
||||
# NOTE: $1 will be set with fdroid builds only.
|
||||
|
||||
|
@ -30,11 +28,12 @@ echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep
|
|||
echo '### prepare cardsets'
|
||||
|
||||
./mkcards
|
||||
./resize4k ${tmpdir}/data/tiles
|
||||
|
||||
cp -a ${cardsets_dir}/* ${tmpdir}/data
|
||||
cp -a cardsets/* ${tmpdir}/data
|
||||
|
||||
echo '### eval version'
|
||||
|
||||
./version.py > ${tmpdir}/version.txt
|
||||
./aversion ${tmpdir} > ${tmpdir}/version.txt
|
||||
|
||||
echo '### end init'
|
||||
|
|
|
@ -7,6 +7,14 @@ export GRADLE_OPTS="-Xms1724m -Xmx5048m -Dorg.gradle.jvmargs='-Xms1724m -Xmx5048
|
|||
|
||||
echo '### run buildozer'
|
||||
|
||||
|
||||
if [ "$1" == "test" ]
|
||||
then
|
||||
echo '### ... release.test'
|
||||
buildozer --profile test android release
|
||||
exit 0
|
||||
fi
|
||||
|
||||
if [ "$1" ]
|
||||
then
|
||||
echo '### ... release'
|
||||
|
|
|
@ -20,6 +20,7 @@ source.dir = ./tmp
|
|||
|
||||
# (list) Source files to exclude (let empty to not exclude anything)
|
||||
#source.exclude_exts = spec
|
||||
source.exclude_exts = spec,gif
|
||||
|
||||
# (list) List of directory to exclude (let empty to not exclude anything)
|
||||
#source.exclude_dirs = tests, bin, venv
|
||||
|
@ -37,7 +38,7 @@ version.filename = %(source.dir)s/version.txt
|
|||
|
||||
# (list) Application requirements
|
||||
# comma separated e.g. requirements = sqlite3,kivy
|
||||
requirements = python3,kivy,pysol-cards,random2,configobj,attrs
|
||||
requirements = python3,kivy,pysol-cards,configobj,attrs
|
||||
|
||||
# (str) Custom source folders for requirements
|
||||
# Sets custom source for any requirements with recipes
|
||||
|
@ -75,14 +76,14 @@ osx.kivy_version = 1.9.1
|
|||
#
|
||||
|
||||
# (bool) Indicate if the application should be fullscreen or not
|
||||
fullscreen = 1
|
||||
fullscreen = 0
|
||||
|
||||
# (string) Presplash background color (for android toolchain)
|
||||
# Supported formats are: #RRGGBB #AARRGGBB or one of the following names:
|
||||
# red, blue, green, black, white, gray, cyan, magenta, yellow, lightgray,
|
||||
# darkgray, grey, lightgrey, darkgrey, aqua, fuchsia, lime, maroon, navy,
|
||||
# olive, purple, silver, teal.
|
||||
#android.presplash_color = #FFFFFF
|
||||
android.presplash_color = #101010
|
||||
|
||||
# (string) Presplash animation using Lottie format.
|
||||
# see https://lottiefiles.com/ for examples and https://airbnb.design/lottie/
|
||||
|
@ -102,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 = 34
|
||||
|
||||
# (int) Minimum API your APK / AAB will support.
|
||||
#android.minapi = 21
|
||||
|
@ -314,8 +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 = HEAD
|
||||
p4a.commit = v2023.02.10
|
||||
p4a.commit = v2024.01.21
|
||||
|
||||
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
|
||||
#p4a.source_dir =
|
||||
|
@ -441,3 +441,7 @@ warn_on_root = 1
|
|||
# Then, invoke the command line with the "demo" profile:
|
||||
#
|
||||
#buildozer --profile demo android debug
|
||||
|
||||
[app@test]
|
||||
title = PySolFC.test
|
||||
package.name = pysolfc.test
|
||||
|
|
|
@ -1,9 +1,18 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
|
||||
if [[ -z ${AAPI+x} ]]
|
||||
then
|
||||
exit 1
|
||||
fi
|
||||
|
||||
python3 -m venv FINIT
|
||||
source FINIT/bin/activate
|
||||
|
||||
pip3 install attrs
|
||||
pip3 install pysol_cards
|
||||
|
||||
tmpdir=..
|
||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||
cardsets_file=${cardsets_dir}.tar.xz
|
||||
|
||||
echo '### prepare source'
|
||||
|
||||
|
@ -16,21 +25,27 @@ echo "" > ${tmpdir}/data/images/cards/bottoms/trumps-only/.keep
|
|||
echo '### prepare cardsets'
|
||||
|
||||
./mkcards
|
||||
cp -a cardsets/* ${tmpdir}/data
|
||||
|
||||
cp -a ${cardsets_dir}/* ${tmpdir}/data
|
||||
echo '### resize 4k images'
|
||||
|
||||
./resize4k ${tmpdir}/data/tiles
|
||||
|
||||
echo '### eval version'
|
||||
|
||||
./version.py > ${tmpdir}/version.txt
|
||||
./aversion ${tmpdir} > ${tmpdir}/version.txt
|
||||
|
||||
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:" -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
|
||||
|
||||
sed -r "s:#? ?warn_on_root =.*:warn_on_root = 0:" -i buildozer.spec
|
||||
|
||||
echo '### end init'
|
||||
|
||||
deactivate
|
||||
rm -rf FINIT
|
||||
|
|
8
buildozer/helpers/setbuildvars
Executable 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
|
|
@ -23,6 +23,7 @@
|
|||
# Starter for kivy/android using buildozer: Needs an explizitly
|
||||
# named main.py as startpoint.
|
||||
|
||||
import os
|
||||
import sys
|
||||
if '--kivy' not in sys.argv:
|
||||
sys.argv.append('--kivy')
|
||||
|
@ -34,4 +35,6 @@ init()
|
|||
|
||||
if runmain:
|
||||
from pysollib.main import main
|
||||
|
||||
os.environ['KIVY_NO_CONSOLELOG'] = "No"
|
||||
sys.exit(main(sys.argv))
|
||||
|
|
35
buildozer/minimal.txt
Normal file
|
@ -0,0 +1,35 @@
|
|||
cardset-2000
|
||||
cardset-blaren-7x7
|
||||
cardset-crystal-mahjongg
|
||||
cardset-dashavatara-ganjifa
|
||||
cardset-dashavatara-ganjifa-xl
|
||||
cardset-dojouji-3x3
|
||||
cardset-dondorf
|
||||
cardset-eternal-dragon-10x10
|
||||
cardset-gnome-mahjongg-1
|
||||
cardset-gpl
|
||||
cardset-hanafuda-200-years
|
||||
cardset-hexadeck
|
||||
cardset-hofamterspiel-9x9
|
||||
cardset-hokusai-6x6
|
||||
cardset-knave-of-hearts-4x4
|
||||
cardset-louie-mantia-hanafuda
|
||||
cardset-matching
|
||||
cardset-matching-xl
|
||||
cardset-matrix
|
||||
cardset-mid-winter-eve-8x8
|
||||
cardset-mini-ishido
|
||||
cardset-mughal-ganjifa
|
||||
cardset-mughal-ganjifa-xl
|
||||
cardset-neo
|
||||
cardset-neo-hex
|
||||
cardset-neo-tarock
|
||||
cardset-next-matrix
|
||||
cardset-oxymoron
|
||||
cardset-simple-ishido
|
||||
cardset-standard
|
||||
cardset-tuxedo
|
||||
cardset-uni-mahjongg
|
||||
cardset-victoria-falls-5x5
|
||||
cardset-vienna-2k
|
||||
cardset-z-minimal
|
|
@ -1,28 +1,52 @@
|
|||
#!/bin/bash
|
||||
set -eux
|
||||
#set -eux
|
||||
|
||||
cardsets_dir=PySolFC-Cardsets--Minimal-2.2.0
|
||||
cardsets_file=${cardsets_dir}.tar.xz
|
||||
rm -rf cardsets
|
||||
|
||||
echo '### prepare cardsets'
|
||||
if [ 1 ]; then
|
||||
cardsets_dir=PySolFC-Cardsets
|
||||
|
||||
if [ ! -f ${cardsets_file} ]; then
|
||||
echo '### downloading cardsets'
|
||||
wget https://netix.dl.sourceforge.net/project/pysolfc/PySolFC-Cardsets/minimal/${cardsets_file}
|
||||
if [ ! -d ${cardsets_dir} ]; then
|
||||
echo '### downloading cardset repo'
|
||||
|
||||
mkdir ${cardsets_dir}
|
||||
pushd ${cardsets_dir}
|
||||
|
||||
mkdir repo
|
||||
pushd repo
|
||||
git init
|
||||
git remote add -t master origin https://github.com/shlomif/PySolFC-Cardsets.git
|
||||
git fetch --depth 1 origin 3.0
|
||||
git checkout -q FETCH_HEAD
|
||||
popd
|
||||
|
||||
echo '### choose a minimal set'
|
||||
|
||||
for d in $(cat ../minimal.txt)
|
||||
do
|
||||
mv repo/${d} .
|
||||
done
|
||||
rm repo -rf
|
||||
|
||||
echo '### processing cardsets'
|
||||
|
||||
../../scripts/cardconv gif png
|
||||
for i in cardset-*-png; do
|
||||
rm -rf `basename $i -png`
|
||||
done
|
||||
popd
|
||||
fi
|
||||
# cp -a ${cardsets_dir} ${cardsets_dir}-orig
|
||||
|
||||
ln -s ${cardsets_dir} cardsets
|
||||
fi
|
||||
|
||||
if [ ! -d ${cardsets_dir} ]; then
|
||||
echo '### extracting cardsets'
|
||||
tar -xf ${cardsets_file}
|
||||
fi
|
||||
pushd cardsets
|
||||
echo '### resize big cardsets'
|
||||
|
||||
echo '### processing cardsets'
|
||||
(
|
||||
cd ${cardsets_dir}
|
||||
../../scripts/cardconv gif png
|
||||
for i in cardset-*-png; do
|
||||
rm -rf `basename $i -png`
|
||||
done
|
||||
)
|
||||
for i in cardset-*; do
|
||||
../resizecards $i
|
||||
done
|
||||
popd
|
||||
|
||||
echo '### end cardsets'
|
||||
|
|
|
@ -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.1.0
|
||||
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
|
||||
|
|
|
@ -11,8 +11,8 @@
|
|||
"type": "SINGLE",
|
||||
"filters": [],
|
||||
"attributes": [],
|
||||
"versionCode": 102122001,
|
||||
"versionName": "2.20.1",
|
||||
"versionCode": 102130200,
|
||||
"versionName": "3.2.0",
|
||||
"outputFile": "pysolfc-release.apk"
|
||||
}
|
||||
],
|
||||
|
|
37
buildozer/resize4k
Executable file
|
@ -0,0 +1,37 @@
|
|||
#!/usr/bin/bash
|
||||
|
||||
location='.'
|
||||
if [ $1 ]
|
||||
then
|
||||
location=$1
|
||||
fi
|
||||
|
||||
pushd $location
|
||||
|
||||
dir='save-aspect-4k'
|
||||
if [ -d $dir ]
|
||||
then
|
||||
pushd 'save-aspect-4k'
|
||||
for f in *.jpg
|
||||
do
|
||||
echo $f
|
||||
convert $f -resize 1920x1920 -quality 65 temp_$f
|
||||
mv -f temp_$f $f
|
||||
done
|
||||
popd
|
||||
fi
|
||||
|
||||
dir='stretch-4k'
|
||||
if [ -d $dir ]
|
||||
then
|
||||
pushd 'stretch-4k'
|
||||
for f in *.jpg
|
||||
do
|
||||
echo $f
|
||||
convert $f -resize 1920x1920 -quality 65 temp_$f
|
||||
mv -f temp_$f $f
|
||||
done
|
||||
popd
|
||||
fi
|
||||
|
||||
popd
|
119
buildozer/resizecards
Executable file
|
@ -0,0 +1,119 @@
|
|||
#!/usr/bin/env python3
|
||||
# -*- mode: python; coding: utf-8; -*-
|
||||
|
||||
import sys
|
||||
import os
|
||||
import math
|
||||
|
||||
carddir = ""
|
||||
filename = ""
|
||||
maxw = 100
|
||||
maxh = 150
|
||||
|
||||
# arguments:
|
||||
# 1: cardset directory
|
||||
# 2: maximum card width
|
||||
# 3: maximum card height
|
||||
|
||||
if len(sys.argv) < 2:
|
||||
exit (1)
|
||||
if len(sys.argv) > 1:
|
||||
carddir = sys.argv[1]
|
||||
filename = sys.argv[1]+"/config.txt"
|
||||
if len(sys.argv) > 2:
|
||||
maxw = int(sys.argv[2])
|
||||
if len(sys.argv) > 3:
|
||||
maxh = int(sys.argv[3])
|
||||
|
||||
#print (filename)
|
||||
#print (carddir)
|
||||
#print (maxw,"x",maxh)
|
||||
|
||||
# 1: read the config file line by line and extract x,y, xoffset, yoffset.
|
||||
|
||||
lines_list = None
|
||||
with open(filename, "rt") as f:
|
||||
lines_list = f.readlines()
|
||||
lines_list = [line.strip() for line in lines_list]
|
||||
if not lines_list[0].startswith("PySol"):
|
||||
exit (1)
|
||||
|
||||
#print (lines_list)
|
||||
|
||||
cardw, cardh, cardd = (int(x) for x in lines_list[2].split())
|
||||
xoffs, yoffs, sxoffs, syoffs = (int(x) for x in lines_list[3].split())
|
||||
|
||||
#print (cardw,cardh)
|
||||
#print (xoffs,yoffs)
|
||||
|
||||
# 2: calculate scale factor.
|
||||
|
||||
scale = maxw / cardw
|
||||
scaleh = maxh / cardh
|
||||
if scaleh < scale:
|
||||
scale = scaleh
|
||||
|
||||
#print (scale)
|
||||
|
||||
if scale >= 1.0:
|
||||
exit (0)
|
||||
|
||||
# 3: convert all images to (width)x(height) with imagemagick if needed.
|
||||
|
||||
def img_size(f):
|
||||
stream = os.popen('identify '+f)
|
||||
info = stream.read().split()
|
||||
dims = info[2].split('x')
|
||||
w = int(dims[0])
|
||||
h = int(dims[1])
|
||||
return (w,h)
|
||||
|
||||
cardw = int(math.floor(cardw*scale))
|
||||
cardh = int(math.floor(cardh*scale))
|
||||
xoffs = int(math.ceil(xoffs*scale))
|
||||
yoffs = int(math.ceil(yoffs*scale))
|
||||
#print (cardw,cardh)
|
||||
#print (xoffs,yoffs)
|
||||
|
||||
first = True
|
||||
effw = cardw
|
||||
effh = cardh
|
||||
for fn in os.listdir(path=carddir):
|
||||
file = carddir+'/'+fn
|
||||
fileo = carddir+'/conv-'+fn
|
||||
|
||||
if fn.endswith('.png') and not fn.startswith('shadow'):
|
||||
cmd = "convert "+file+" -resize "+str(cardw)+"x"+str(cardh)+" "+fileo
|
||||
cmd2 = "mv -f "+fileo+" "+file
|
||||
#print (cmd)
|
||||
os.system(cmd)
|
||||
os.system(cmd2)
|
||||
if first:
|
||||
effw,effh = img_size(file)
|
||||
#print ('eff-size:',effw,effh)
|
||||
first = False
|
||||
|
||||
if fn.endswith('.png') and fn.startswith('shadow'):
|
||||
w,h = img_size(file)
|
||||
if w>h:
|
||||
w = int(w*scale)
|
||||
else:
|
||||
h = int(h*scale)
|
||||
cmd = "convert "+file+" -resize '"+str(w)+"x"+str(h)+"!' "+fileo
|
||||
cmd2 = "mv -f "+fileo+" "+file
|
||||
#print (cmd)
|
||||
os.system(cmd)
|
||||
os.system(cmd2)
|
||||
|
||||
# 4: rewrite the config file.
|
||||
|
||||
print ('rescaled by',scale,':',carddir)
|
||||
cardw = effw
|
||||
cardh = effh
|
||||
lines_list[2] = str(cardw)+" "+str(cardh)+" "+str(cardd)
|
||||
lines_list[3] = str(xoffs)+" "+str(yoffs)+" "+str(sxoffs)+" "+str(syoffs)
|
||||
#print (lines_list)
|
||||
|
||||
with open(carddir+"/config.txt", "w") as f:
|
||||
for l in lines_list:
|
||||
f.write(l+"\n")
|
|
@ -1,13 +0,0 @@
|
|||
import re
|
||||
|
||||
f = open("pubspec.json")
|
||||
print(f)
|
||||
txt = f.read().replace('\n', '')
|
||||
print(txt)
|
||||
print()
|
||||
|
||||
mg = re.search(r'versionCode[:"\s]+(\d+)', txt)
|
||||
print(mg.group(1))
|
||||
|
||||
ng = re.search(r'versionName[:"\s]+([\d.]+)', txt)
|
||||
print(ng.group(1))
|
|
@ -3,12 +3,26 @@ Cardset Customization Tutorial
|
|||
:Author: Eric Rausch
|
||||
:Email: <neelix570@gmail.com>
|
||||
|
||||
Setting up a Cardset
|
||||
--------------------
|
||||
The easiest way to create a cardset would be to copy an existing cardset folder of the same type in your cardsets directory. All cardsets need a number of files to work.
|
||||
|
||||
* An image for each card - these images should be the same format and the same size, as defined in the config.txt file (described below). These files should be named something like 01s.png for the ace of spades. The first two (or more) digits represent the rank, and the letter after represents the suit. The suits are labeled hcds in French decks or decks that use French suits (i.e. Hex A or Tarock decks), and the suits are alphabetical for other decks. The suit letter z is used for jokers or trumps.
|
||||
* A shade file - shade.png, for example.
|
||||
* At least one back image, as defined in the config.txt file below.
|
||||
* A config.txt file, the format described below.
|
||||
* A copyright file, containing copyright info.
|
||||
|
||||
The following optional files may also be added, but are only used under certain circumstances.
|
||||
|
||||
* Bottom images. A number of images for the bottoms of stacks. These are not used unless your PySol install does not support generating stack bottoms, or you enable them manually (currently only possible through editing the options.cfg file). Which bottoms are used depend on the cardset type. Each bottom has a version with a suffix of -n, indicating the negative bottom that gets used if the appropriate option is enabled.
|
||||
* Shadow images. These will only be used if your PySol install does not support auto-generated shadows.
|
||||
|
||||
config.txt template
|
||||
-------------------
|
||||
|
||||
....
|
||||
PySolFC solitaire cardset;$A;$FMT;$B;$C;$D,$E;$F
|
||||
PySolFC solitaire cardset;$A;$FMT;$B;$C;$D,$E;$F;$G;$H
|
||||
<internal_name>;<cardset_name>
|
||||
X Y D
|
||||
XOFF YOFF SXOFF SYOFF
|
||||
|
@ -21,7 +35,7 @@ Line 1
|
|||
|
||||
*$A:* The cardset version number that belongs to the number of fields divided through ";" on the first line (e.g. `.gif;1;78;8,1016` -> `$A=4`)
|
||||
|
||||
( *WARNING:* For Mahjongg, $A must always be 6 and the $F field must be included in the line; however, you can put `0` in `$F` if you wish, in that case. )
|
||||
( *WARNING:* For Mahjongg, $A must always be 6 or 7 and the $F field must be included in the line; however, you can put `0` in `$F` if you wish, in that case. )
|
||||
|
||||
( *NOTE:* $D and $E are comma separated and count for one field )
|
||||
|
||||
|
@ -42,6 +56,8 @@ Cardsets Types:
|
|||
* Dashavatara Ganjifa = 8
|
||||
* Trumps Only = 9
|
||||
* Matching = 10
|
||||
* Puzzle = 11
|
||||
* Ishido = 12
|
||||
|
||||
*$C:* The number of cards in the cardset, generally 42, 48, 52, 68, 78, 96 or 120
|
||||
|
||||
|
@ -50,6 +66,7 @@ Cardsets Types:
|
|||
Cardsets Styles:
|
||||
~~~~~~~~~~~~~~~~
|
||||
|
||||
* Abstract = 35
|
||||
* Adult = 1
|
||||
* Animals = 2
|
||||
* Anime = 3
|
||||
|
@ -59,14 +76,18 @@ Cardsets Styles:
|
|||
* Classic Look = 7
|
||||
* Collectors = 8
|
||||
* Computers = 9
|
||||
* Divination = 36
|
||||
* Engines = 10
|
||||
* Fantasy = 11
|
||||
* Four Color = 37
|
||||
* Ganjifa= 30
|
||||
* Hanafuda = 12
|
||||
* Hex A Deck = 29
|
||||
* Holiday = 13
|
||||
* Ishido = 34
|
||||
* Mahjongg = 28
|
||||
* Matching = 32
|
||||
* Monochrome = 38
|
||||
* Movies = 14
|
||||
* Matrix = 31
|
||||
* Music = 15
|
||||
|
@ -76,6 +97,7 @@ Cardsets Styles:
|
|||
* Places = 20
|
||||
* Plain = 21
|
||||
* Products = 22
|
||||
* Puzzle = 33
|
||||
* Round Cardsets = 18
|
||||
* Science Fiction = 23
|
||||
* Sports = 24
|
||||
|
@ -104,6 +126,7 @@ Cardsets Origins:
|
|||
* Italy = 1005
|
||||
* Japan = 1016
|
||||
* Netherlands = 1002
|
||||
* Portugal = 1022
|
||||
* Russia = 1007
|
||||
* Spain = 1008
|
||||
* Sweden = 1017
|
||||
|
@ -112,6 +135,9 @@ Cardsets Origins:
|
|||
|
||||
*$F:* The Year the cardset was created (in the range 1000 to 2299)
|
||||
|
||||
*$G:* The subtype of the cardset. Usually 0 - for French type cardsets, a value of 1 is used if there are jokers. For Puzzle type cardsets, it is the number of pieces per row/column.
|
||||
|
||||
*$H:* Whether the cardset is a 3D Mahjongg cardset - 1 if it is, 0 if it isn't. For cardsets with a version less than 7, version 6 cardsets treat this value as 1, and older version cardsets treat it as 0.
|
||||
|
||||
Line 2
|
||||
------
|
||||
|
@ -120,13 +146,13 @@ Line 2
|
|||
|
||||
( *TIP:* You could add a number prefix (e.g. 123-cardset-name) )
|
||||
|
||||
`<cardset_name>`: Your cardset name as it should appear in the cardset manager
|
||||
`<cardset_name>`: Your cardset name as it should appear in the cardset manager. Note that a cardset name of more than 30 characters will be truncated.
|
||||
|
||||
Line 3
|
||||
------
|
||||
|
||||
* *X:* The cards width (the card image width)
|
||||
* *Y:* The cards height (the card image height)
|
||||
* *X:* The cards' width (the card image width)
|
||||
* *Y:* The cards' height (the card image height)
|
||||
* *D:* The color depth (mostly 8)
|
||||
|
||||
Line 4
|
||||
|
|
|
@ -18,7 +18,6 @@ builtins.n_ = lambda x: x
|
|||
import pysollib.games # noqa: E402,F402,I100,I202
|
||||
import pysollib.games.mahjongg # noqa: E402,F402
|
||||
import pysollib.games.special # noqa: E402,F401,F402
|
||||
import pysollib.games.ultra # noqa: E402,F401,F402
|
||||
|
||||
try:
|
||||
os.mkdir('html')
|
||||
|
|
|
@ -6,7 +6,7 @@ PIP="${PKGTREE}/env/bin/pip"
|
|||
PYPROG="${PKGTREE}/env/bin/python"
|
||||
VERSION="$(env PYTHONPATH=`pwd` "$PYPROG" -c 'from pysollib.settings import VERSION ; print(VERSION)')"
|
||||
XZBALL="dist/PySolFC-${VERSION}.tar.xz"
|
||||
reqs=(pillow pygame random2 six)
|
||||
reqs=(pillow pygame six)
|
||||
|
||||
make dist
|
||||
|
||||
|
|
BIN
data/images/buttons/bluecurve/apply.png
Normal file
After Width: | Height: | Size: 663 B |
BIN
data/images/buttons/bluecurve/back.png
Normal file
After Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 592 B |
Before Width: | Height: | Size: 676 B After Width: | Height: | Size: 669 B |
BIN
data/images/buttons/bluecurve/clear.png
Normal file
After Width: | Height: | Size: 829 B |
BIN
data/images/buttons/bluecurve/color.png
Normal file
After Width: | Height: | Size: 903 B |
BIN
data/images/buttons/bluecurve/help.png
Normal file
After Width: | Height: | Size: 989 B |
Before Width: | Height: | Size: 226 B |
Before Width: | Height: | Size: 460 B After Width: | Height: | Size: 437 B |
BIN
data/images/buttons/bluecurve/next.png
Normal file
After Width: | Height: | Size: 574 B |
Before Width: | Height: | Size: 567 B |
Before Width: | Height: | Size: 634 B After Width: | Height: | Size: 630 B |
BIN
data/images/buttons/bluecurve/reset.png
Normal file
After Width: | Height: | Size: 807 B |
BIN
data/images/buttons/bluecurve/save.png
Normal file
After Width: | Height: | Size: 633 B |
BIN
data/images/buttons/bluecurve/statistics.png
Normal file
After Width: | Height: | Size: 724 B |
BIN
data/images/buttons/remix/apply.png
Normal file
After Width: | Height: | Size: 295 B |
BIN
data/images/buttons/remix/back.png
Normal file
After Width: | Height: | Size: 412 B |
BIN
data/images/buttons/remix/cancel.png
Normal file
After Width: | Height: | Size: 270 B |
BIN
data/images/buttons/remix/clear.png
Normal file
After Width: | Height: | Size: 398 B |
BIN
data/images/buttons/remix/color.png
Normal file
After Width: | Height: | Size: 620 B |
BIN
data/images/buttons/remix/help.png
Normal file
After Width: | Height: | Size: 619 B |
BIN
data/images/buttons/remix/new.png
Normal file
After Width: | Height: | Size: 155 B |
BIN
data/images/buttons/remix/next.png
Normal file
After Width: | Height: | Size: 312 B |
BIN
data/images/buttons/remix/ok.png
Normal file
After Width: | Height: | Size: 215 B |
BIN
data/images/buttons/remix/reset.png
Normal file
After Width: | Height: | Size: 597 B |
BIN
data/images/buttons/remix/save.png
Normal file
After Width: | Height: | Size: 256 B |
BIN
data/images/buttons/remix/statistics.png
Normal file
After Width: | Height: | Size: 280 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 1.6 KiB After Width: | Height: | Size: 965 B |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 2.7 KiB After Width: | Height: | Size: 1 KiB |
Before Width: | Height: | Size: 1,006 B After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 1,006 B After Width: | Height: | Size: 579 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 1.4 KiB After Width: | Height: | Size: 725 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 578 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 722 B |
Before Width: | Height: | Size: 1.3 KiB After Width: | Height: | Size: 722 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 588 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 588 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 674 B |
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 674 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 568 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 1 KiB After Width: | Height: | Size: 540 B |
Before Width: | Height: | Size: 1.5 KiB After Width: | Height: | Size: 807 B |