• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..03-May-2022-

PySolFC.egg-info/H03-May-2022-1614

android/H11-Dec-2021-458270

data/H03-May-2022-15,03212,922

docs/H03-May-2022-651533

html-src/H03-May-2022-7,5466,426

locale/H11-Dec-2021-

po/H11-Dec-2021-94,86170,109

pysollib/H11-Dec-2021-103,30870,932

scripts/H11-Dec-2021-974728

tests/H11-Dec-2021-754504

.tidyallrcH A D13-Jun-2021197 97

AUTHORS.mdH A D13-Jun-20211.3 KiB4334

COPYINGH A D13-Jun-202134.3 KiB675553

MANIFEST.inH A D08-Jul-20212.3 KiB9389

MakefileH A D08-Jul-20212 KiB7355

NEWS.asciidocH A D11-Dec-20218.1 KiB159158

PKG-INFOH A D11-Dec-2021631 1614

README.androidH A D13-Jun-20213.5 KiB10574

README.kivyH A D13-Jun-20211.5 KiB4934

README.mdH A D08-Jul-20217.5 KiB246172

pysolfcH A D13-Jun-20211.5 KiB425

setup.cfgH A D11-Dec-2021176 1511

setup.pyH A D03-May-20222.9 KiB10684

setup_osx.pyH A D14-Aug-20212.6 KiB8768

README.android

1
2Prerequisites (needs root):
3
4  (For updated information on these subjects please consult the scripts in
5  android/debian).
6
7  On a 'freshly installed' Ubuntu 16.04 (32bit), the following
8  additional packages had to be installed:
9
10  - python-setuptools
11  - javasdk          (ubuntu: default jdk)
12  - cython           (ubuntu: cython)
13  - pip              (ubuntu: python-pip)
14  - pexpect          (ubuntu: python-pexpect)
15  - zlib headers     (ubuntu: zlib1g-dev)
16  - virtualenv       (python-virtualenv)
17  - zip,unzip
18
19  On a freshly installed debian stretch/xfce:
20
21  -> consult script files in directory android/debian.
22
23  On a 'simple' gentoo installation the following packages had to be
24  installed in addition:
25
26  - dev-python/pip
27  - dev-python/virtualenv
28  - dev-python/cython
29  - dev-media-libs/libsdl2
30  - dev-media-libs/sdl2-image
31  - dev-media-libs/sdl2-mixer
32  - dev-media-libs/sdl2-ttf
33  - dev-media-libs/gstreamer
34  - dev-vcs/git
35  - dev-java/ant
36
37  and python modules:
38
39  - python3 -m pip install requests --user.
40  - python3 -m pip install clint --user.
41
42  NOTES:
43  1) This information is supplied to give you a hint, when running into
44     problems.
45  2) All builds need an working (fairly fast) internet connection and
46     6 GB of free disk space.
47
48
49Build with 'python-for-android' (as user):
50
51  Use the cloned repo or an unpacked distribution tarball.
52
53  go to the android directory, then
54
55  $ ./mkp4a.init                              # prepare sdk and p4a installation
56  $ ./mkkeystore                              # if you want to build a release version.
57
58  $ ./mkp4a.debug                             # build debug apk
59  $ ./mkp4a.release  <passwd1>  [<passwd2>]   # build release apk
60
61  The build system will download all required additional
62  packages (such as the android sdk and more). Do the first build will
63  take a while. All in all you will need up to 6 GB of free disk space.
64
65  If you have Android Studio installed, you may call mkp4a.init
66  with optional parameter <sdk-dir> and ev. in addition as
67  second parameter <ndk-dir> (if not default) to prevent them
68  from downloading a new. (Note that currently android ndk version
69  should be less 14, otherwise the build will fail).
70
71  Resulted apks will appear in directory android.
72
73Cardsets:
74
75The Apk includes a minimal set of cards for playing.
76
77Additional cardsets can be installed in ${HOME}/.PySolFC/cardsets/.
78On an android device this is equivalent to /sdcard/.PySolFC/cardsets/.
79Cardsets must use the bmp image format. Use scripts/cardconv
80(on a linux system) to convert them, before copying to the device.
81
82Important Notice on python3/kivy 1.11.x (pysol verson 2.6.4 ff):
83In kivy, using python3, the support for bmp images depends on OpenGL.
84On fairly up to date Android OpenGL ES 3.x is available. ES (Embedded
85System) release is a subset of the full OpenGL. Due to this, bmp image
86support will be broken on android, but not on up to date workstations.
87
88As gif images are still slow and error prone, the best we can do is to
89use png images instead of bmp (as noted above).
90
91Possible known build issues:
92
932) for android ndk: needs a Version <=13 (because needs ant support).
94
953) python-for-android, on downloading recipes:
96
97  ('CA CERTIFICATE VALIDATION FAILED' when downloading python.2.7 or
98   some 'recipes')
99
100  Solution:
101    Try the download address with firefox. if it works, view the
102    site certificate and download (export) it from the browser.
103    Copy the resulting *.crt to /usr/local/ca-certificates and
104    run update-ca-certificates.
105

README.kivy

1
2Introduction
3------------
4
5This is a version of the PySol FC open source project
6(http://pysolfc.sourceforge.net)
7
8Early investigations of the code showed, that it would not be
9a too big effort to add a new user interface (UI).
10
11The new UI using kivy has been designed to meet requirements
12of tablet and smartphone devices. Most of the functionality
13of the original version has been maintained
14
15The new UI is selected via a new command line option '--kivy'.
16The original user interfaces will continue to work. To run the
17kivy version call:
18
19$ python pysol.py --kivy
20
21
22Images
23------
24
25The original images supplied by the collection are of type
26gif. In kivy, that image type loads very slowly. Moreover, many
27cards cannot be loaded, because of decoding errors.
28To prevent these problems, the kivy version was
29modified to not read any gif images.
30
31Some cardsets have been translated to PNG, a format
32that is processed by both the tk and the kivy versions.
33
34Some others, for which transparency information is not
35processed correctly even from the PBF images, have been translated
36to the BMP image format (while keeping their GIF variant for
37the tk version). BMP format is only processed by the
38kivy version.
39
40Additional cardsets are available from the SourceForge
41project. To use them with kivy, they need to be converted to
42the BMP format. A shell script, 'cardconv' , has been added
43to the scripts directory (it requires Bash and ImageMagick).
44
45For all GIF images in the directories data/images and data/tiles ,
46corresponding images in the PNG format have been added too.
47
48LB170321.
49

README.md

1<p align="center"><img src="html-src/images/high_res/logo_horizontal.png" alt="PySol FC logo" height="180px"></p>
2
3# PySol Fan Club edition
4
5This is an open source and portable (Windows, Linux and Mac OS X) collection
6of Card Solitaire/Patience games written in Python. Its homepage is
7https://pysolfc.sourceforge.io/.
8
9The maintenance branch of PySol FC on GitHub by [Shlomi
10Fish](https://www.shlomifish.org/) and by some other
11people, has gained official status, ported the code to Python 3,
12and implemented some other enhancements.
13
14- [![CI tests at GitHub](https://github.com/shlomif/PySolFC/actions/workflows/ci.yml/badge.svg)](https://github.com/shlomif/PySolFC/actions/workflows/ci.yml)
15[![AppVeyor Build status](https://ci.appveyor.com/api/projects/status/04re7umgl3yuukmh?svg=true)](https://ci.appveyor.com/project/shlomif/pysolfc)
16
17## Call for Contributors
18
19[Shlomi Fish](https://github.com/shlomif), who adopted PySol FC, and maintained
20it for several years, has stepped down as its primary maintainer
21due to the fact he no longer plays PySol, or other computer card games too
22much and that it has been a time sink for him. (Also see
23[this Twitter discussion](https://twitter.com/bagder/status/1336793880709238786)
24). We are looking for other contributors and there are still
25[some large-scale features](https://github.com/shlomif/PySolFC/issues) that
26can be implemented.
27
28# Screenshots
29
30![Screenshot of PySol FC](https://i.imgur.com/jQkTGwf.jpg)
31
32## Requirements.
33
34- Python (2.7 or 3.x)
35- Tkinter (Tcl/Tk 8.4 or later)
36
37- For sound support (optional)
38  - PySol-Sound-Server fork: https://github.com/shlomif/pysol-sound-server (mp3, wav, tracker music)
39  - (or: ) PyGame: https://www.pygame.org/ (mp3, ogg, wav, midi, tracker music)
40
41- Other packages (optional):
42  - Pillow (Python Imaging Library): https://pillow.readthedocs.io/
43  - Freecell Solver: https://fc-solve.shlomifish.org/
44  - [Black Hole Solitaire Solver](https://www.shlomifish.org/open-source/projects/black-hole-solitaire-solver/)
45
46## Installation.
47
48We provide an [installer for Windows](https://sourceforge.net/projects/pysolfc/files/PySolFC/)
49(requires Windows XP SP3 or higher) as well as an
50[Android package on F-droid](https://f-droid.org/packages/org.lufebe16.pysolfc/).
51
52### Running from source without installation.
53
54You can run from the source directory:
55
56```
57python pysol.py
58```
59
60After following steps similar to these (on
61[Mageia Linux](http://www.mageia.org/) ):
62
63
64#### Step 1 - install the dependencies
65
66On Fedora you can do:
67
68```
69sudo dnf builddep PySolFC
70```
71
72On Mageia you can do:
73
74```
75sudo urpmi git make pygtk2 pygtk2.0-libglade gnome-python-canvas tkinter
76```
77
78On Debian / Ubuntu / etc. you can do:
79
80```
81sudo apt-get install cpanminus make perl python3-setuptools python3-tk
82```
83
84#### Step 2 - build PySol.
85
86You can try running:
87
88```
89python3 scripts/linux-install.py
90```
91
92```
93git clone https://github.com/shlomif/PySolFC.git
94cd PySolFC
95# Now make sure you have installed the dependencies.
96gmake test
97gmake rules
98ln -s data/images images
99tar -xvf PySolFC-Cardsets-2.0.tar.bz2 # Needs to be downloaded from sourceforge
100mkdir -p ~/.PySolFC
101rmdir ~/.PySolFC/cardsets
102ln -s "`pwd`/PySolFC-Cardsets-2.0" ~/.PySolFC/cardsets
103python pysol.py
104```
105
106<b>Note!</b> If you are using a Debian derivative (e.g: Debian, Ubuntu, or
107Linu Mint) and you are getting an error of "No cardsets were found !!! Main
108data directory is `[insert dir here]` Please check your PySol installation.",
109then you likely installed the cardsets package which has removed some files
110that are needed by pysol from source (without the debian modifications).
111
112Please uninstall that package and use the cardsets archive from sourceforge.net
113per the instructions above.
114
115### Installing from source and running in a python venv (virtual environment)
116
117At the moment, this only works on POSIX (Linux, FreeBSD and similar) systems.
118Windows and Mac users - you'll need to chip in with a script for your system.
119
120#### 1 - Install build prerequisites: six, random2 and pysol-cards
121
122This is kind of stupid and maybe it can be fixed in the future, but for now:
123
124```
125pip install six
126pip install random2
127pip install pysol-cards
128```
129
130You may want to use your OS distribution package system instead, for example:
131
132```
133sudo apt-get install python-six
134sudo apt-get install python-random2
135```
136
137For Pillow compilation, libjpeg headers and libraries need to be available:
138
139```
140sudo apt-get install libjpeg-dev
141```
142
143#### 2 - Clone the source from version control
144
145```
146git clone git://github.com/shlomif/PySolFC.git
147cd PySolFC
148```
149
150#### 3 - Create your virtual environment.
151
152```
153PKGTREE=/usr/local/packages/PySolFC # or whatever
154export PKGTREE
155mkdir -p "$PKGTREE"
156( cd "$PKGTREE" && python -m venv ./env )
157```
158
159#### 4 - Run the install script
160
161```
162./contrib/install-pysolfc.sh
163```
164
165#### 5 - Put cardsets into place as above.
166
167#### 6 - Enjoy playing
168
169```
170"$PKGTREE"/env/bin/pysol.py
171```
172
173## Alternate toolkit.
174
175- Kivy (10.0 or later)
176
177- Features:
178  - Sound support integrated.
179  - Android apk build support.
180
181- Running from source without installation:
182
183```
184python pysol.py --kivy
185```
186
187### Configuring Freecell Solver
188
189If you want to use the solver, you should configure freecell-solver
190( https://fc-solve.shlomifish.org/ ) by passing the following options
191to its CMake-based build-system:
192`-DMAX_NUM_FREECELLS=8 -DMAX_NUM_STACKS=20 -DMAX_NUM_INITIAL_CARDS_IN_A_STACK=60`.
193
194## Install Extras.
195
196- Music
197 - Copy some music files (in mp3 format for example) to ~/.PySolFC/music/
198
199 - Original PySol music can be downloaded from:
200     https://sourceforge.net/projects/pysolfc/files/PySol-Music/
201
202- Cardsets
203 - Copy cardsets to ~/.PySolFC/cardsets
204
205 - Additional cardsets can be downloaded from the PySolFC project page:
206     https://sourceforge.net/projects/pysolfc/files/
207
208## Related repositories and links
209
210- [PySol-Sound-Server fork](https://github.com/shlomif/pysol-sound-server)
211- [Sources for the PySolFC web site](https://github.com/shlomif/pysolfc-website)
212- [PySolFC Announcements Drafts](https://github.com/shlomif/pysolfc-announcements)
213- [PySolFC-Cardsets tarballs sources repo](https://github.com/shlomif/PySolFC-Cardsets)
214- [Extra mahjongg cardsets for PySolFC - originally for flowersol](https://github.com/shlomif/PySol-Extra-Mahjongg-Cardsets)
215- [The old "pysol-music" distribution](https://github.com/shlomif/pysol-music)
216
217Related:
218
219- [Freecell Solver](https://github.com/shlomif/fc-solve)
220- [Black Hole Solver](https://github.com/shlomif/black-hole-solitaire)
221
222Other open source solitaires:
223
224- [solitaire.gg](https://github.com/KyleU/solitaire.gg) - web-based and written in Scala
225- [Solitairey](https://github.com/shlomif/Solitairey/branches) - web-based written in JavaScript
226- [KPat](https://games.kde.org/game.php?game=kpat) - desktop-based for KDE.
227- [Aisleriot](https://wiki.gnome.org/Apps/Aisleriot) - desktop-based by the GNOME project with relatively limited functionality.
228
229Screencasts:
230
231- [Black Hole solving](https://github.com/shlomif/pysolfc-black-hole-solver--screencast)
232- [Freecell solving using the qualified-seed-improved preset](https://bitbucket.org/shlomif/pysolfc-qualified-seed-improved-screencast)
233
234## Chat
235
236To facilitate coordination about contributing to PySol, please join us for a
237real time Internet chat on
238the <a href="irc://irc.freenode.net/##pysol">##pysol</a> chat room on
239[Freenode](http://freenode.net/) (note the double
240octothorpe/hash-sign/pound-sign).  We may set up
241chat rooms on different services in the future.
242
243In addition, we set up a
244[Google Group for discussing open source card games](https://groups.google.com/forum/#!forum/foss-card-games)
245which will also be used for discussing PySol. Feel free to subscribe or post!
246