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

Compare commits

..

No commits in common. "master" and "pysolfc-3.0.0" have entirely different histories.

1375 changed files with 1365 additions and 5226 deletions

View file

@ -1,16 +1,16 @@
---
image: Visual Studio 2022
image: Visual Studio 2019
environment:
matrix:
- PYTHON: "C:\\Python313"
- PYTHON: "C:\\Python311"
# 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 attrs configobj flake8 flake8-import-order
pycotap pygame pyinstaller pysol-cards setuptools six
- python3 -mpip install Pillow==9.5 attrs configobj flake8 flake8-import-order
pycotap pygame pyinstaller pysol-cards random2 setuptools six
ttkthemes
- perl -v
- copy C:\msys64\mingw64\bin\mingw32-make.exe C:\msys64\mingw64\bin\make.exe
@ -32,8 +32,8 @@ 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-3.0.0.tar.xz/download -FileName cardsets.tar.xz
@ -51,7 +51,7 @@ test_script:
# For reproducible builds:
# See: https://reproducible-builds.org/ .
- SET FC_SOLVE_VER=5.20.0
- 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
- 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
- 7z x fc-solve.zip
- move fcs-pysol dist\pysol\freecell-solver
- 7z a -r pysol_win_dist.7z dist\pysol\

View file

@ -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 setuptools six
attrs configobj pycotap pysol-cards random2 setuptools six
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Lint with flake8
run: |

View file

@ -7,7 +7,7 @@ on:
jobs:
build:
runs-on: macos-14
runs-on: macos-12
steps:
- uses: actions/checkout@v2
@ -23,7 +23,7 @@ jobs:
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --no-binary=Pillow \
Pillow attrs configobj py2app pycotap pygame pysol-cards setuptools six ttkthemes
Pillow attrs configobj py2app pycotap pygame pysol-cards random2 setuptools six ttkthemes
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
brew install create-dmg
- name: Get cardsets
@ -49,12 +49,12 @@ jobs:
--skip-jenkins
PySolFC.dmg dist
- name: Upload zipped app
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: pysolfc-app
path: PySolFC-app.zip
- name: Upload dmg
uses: actions/upload-artifact@v4
uses: actions/upload-artifact@v2
with:
name: pysolfc-dmg
path: PySolFC.dmg

1
.gitignore vendored
View file

@ -10,6 +10,7 @@
/html
/html-src/html/*
/images
/locale/*
/po/de.po
/po/fr.po
/po/it.po

View file

@ -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 setuptools six'
- export PY_MODS='attrs configobj pycotap pysol-cards random2 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

View file

@ -11,8 +11,8 @@ 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).
* [lufebe16](https://github.com/lufebe16)
* Added the Kivy toolkit and all the Android app related code and build procedures.
* https://github.com/lufebe16
* Added the Kivy toolkit
* [Roderik Ploszek](https://github.com/Programator2)
* Fixes and enhancements
* [Joe R.](https://github.com/joeraz)

View file

@ -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 Python 3.7 and above.
- The code should be compatible with both Python 2.7.x and Python 3.4.x-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 3.x and you can try inheriting from an existing
written in Python 2.7/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:

View file

@ -1,18 +1,5 @@
[[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

View file

@ -31,7 +31,7 @@ can be implemented.
## Requirements.
- Python (3.7 or later)
- Python (2.7 or 3.x)
- 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-3.0.tar.bz2 # Needs to be downloaded from sourceforge
tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Needs to be downloaded from sourceforge
mkdir -p ~/.PySolFC
rmdir ~/.PySolFC/cardsets
ln -s "`pwd`/PySolFC-Cardsets-3.0" ~/.PySolFC/cardsets
ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
python pysol.py
```
@ -118,18 +118,21 @@ 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 prerequisite: pysol-cards
#### 1 - Install build prerequisites: six, random2 and 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 python3-pysol-cards
sudo apt-get install python-six
sudo apt-get install python-random2
```
For Pillow compilation, libjpeg headers and libraries need to be available:

View file

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

View file

@ -15,10 +15,10 @@ Prepare
Move to directory buildozer.
First create and enter a virtualenv and load the
First create and enter a virtualenv and load all
required python modules using pip install.
$> virtualenv --system-site-packages ENV
$> virtualenv ENV
$> . ENV/bin/activate
$> pip install -r pipreq.txt

View file

@ -7,14 +7,6 @@ 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'

View file

@ -38,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,configobj,attrs
requirements = python3,kivy,pysol-cards,random2,configobj,attrs
# (str) Custom source folders for requirements
# Sets custom source for any requirements with recipes
@ -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 = 34
android.api = 32
# (int) Minimum API your APK / AAB will support.
#android.minapi = 21
@ -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 = v2024.01.21
p4a.commit = v2023.09.16
# (str) python-for-android git clone directory (if empty, it will be automatically cloned from github)
#p4a.source_dir =
@ -441,7 +441,3 @@ 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

View file

@ -1,17 +1,6 @@
#!/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=..
echo '### prepare source'
@ -38,14 +27,11 @@ 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,contrib,tests,fastlane:" -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_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

View file

@ -1,8 +0,0 @@
#!/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-victoria-falls-5x5
cardset-vienna-2k
cardset-z-minimal
cardset-z_minimal

View file

@ -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 3.0
git fetch --depth 1 origin 9b63a583dc3e770fa9bf8f2378c37a064aa4969c
git checkout -q FETCH_HEAD
popd

View file

@ -1,12 +1,16 @@
attrs==23.2.0
build==1.2.1
appdirs==1.4.4
attrs==22.2.0
-e git+https://github.com/kivy/buildozer.git@3ebc09e885457db4747e67a1250c2aea1ca7a046#egg=buildozer
certifi==2024.2.2
colorama==0.4.6
configobj==5.0.8
Kivy==2.3.0
pip==24.0
pysol_cards==0.16.0
setuptools==69.1.1
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
toml==0.10.2
wheel==0.42.0
wheel==0.38.4

View file

@ -11,10 +11,10 @@
"type": "SINGLE",
"filters": [],
"attributes": [],
"versionCode": 102130200,
"versionName": "3.2.0",
"versionCode": 102130000,
"versionName": "3.0.0",
"outputFile": "pysolfc-release.apk"
}
],
"elementType": "File"
}
}

View file

@ -3,20 +3,6 @@ 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
-------------------

View file

@ -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 six)
reqs=(pillow pygame random2 six)
make dist

Binary file not shown.

Before

Width:  |  Height:  |  Size: 663 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 592 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 829 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 989 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 574 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 567 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 807 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 633 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 724 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 295 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 412 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 270 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 398 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 620 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 619 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 155 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 312 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 215 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 597 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 256 B

Binary file not shown.

Before

Width:  |  Height:  |  Size: 280 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 217 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 205 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 226 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 227 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 224 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 202 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 222 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 228 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 214 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 207 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 223 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 211 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 216 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 210 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 208 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 221 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 220 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 219 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 203 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 213 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 212 B

Some files were not shown because too many files have changed in this diff Show more