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

1478 commits

Author SHA1 Message Date
Juhani Numminen
2412d58fcd Skip all python2 tests by default
python2 is deprecated
2021-02-07 16:43:17 +02:00
Juhani Numminen
6a55a0b262 Move tests so that standard library unittest discovery finds them 2021-02-07 16:24:45 +02:00
Juhani Numminen
dbe57dda67 fix osx travis error during create-dmg step
workaround for https://github.com/create-dmg/create-dmg/issues/72

Error message on travis:

Running AppleScript to make Finder stuff pretty: /usr/bin/osascript "/var/folders/z3/_825pg0s3jvf0hb_q8kzmg5h0000gn/T/createdmg.tmp.XXXXXXXXXX.jubvb1lu" "Install PySolFC"
/var/folders/z3/_825pg0s3jvf0hb_q8kzmg5h0000gn/T/createdmg.tmp.XXXXXXXXXX.jubvb1lu:394:406: execution error: Finder got an error: AppleEvent timed out. (-1712)
Failed running AppleScript
2021-01-22 15:47:29 +02:00
Juhani Numminen
0d0b39e4bc travis: config rewrite to have osx working again
Do not attempt to run python2 tests on osx.

Homebrew updating was taking a long time, causing timeouts.

Reduced the number of homebrew formulas to cut down install time.
Some of the removed ones are already provided in the osx image.

osx_image updated because only the newer ones work without
travis's homebrew addon flag 'update: true'
https://changelog.travis-ci.com/xcode-11-3-1-xcode-11-2-1-xcode-11-1-and-xcode11-images-updated-142286

Config updated with the help of live validator:
https://config.travis-ci.com/explore

Added sudo flag "-H" to "sudo pip*" as pip suggests.

Trying to make use of cached of $HOME/perl_modules.
2021-01-22 14:34:07 +02:00
Juhani Numminen
c60a8cb577 tidyall run-tests.pl with a newer version of tidyall 2021-01-22 14:08:34 +02:00
Joe R
f91817ee51 Added additional multi-deck variations of Golf and Forty Thieves. 2020-12-13 21:36:16 -05:00
Joe R
3b53d94305 Added Hit or Miss game. 2020-12-03 17:39:58 -05:00
Guillaumegaillard
5876134d11 Make auto_scale spread non-talon stacks on canvas
make card size, scale and canvas changes independent
check scale x after change cardset
2020-11-23 16:26:22 +02:00
cardset
93793c01db Again cardset-viewer
- changed the imports
- added shebang
- changed a lot of variable names because of pylint: doesn't conform to snake_case naming style
2020-11-12 10:05:14 +02:00
cardset
afe0e080c0 Update cardset_viewer.py
Nächster Versuch
2020-11-12 10:05:14 +02:00
cardset
d6e197f8c8 Update cardset_viewer.py
Rewritten
2020-11-12 10:05:14 +02:00
Juhani Numminen
69b0cc86ff Avoid errors when options.cfg has no data
In that case res==False which was not accounted for, resulting in
AttributeError: 'bool' object has no attribute 'items'.

Closes #193.
2020-11-06 18:10:44 +02:00
Shlomi Fish
bc1023dc14 add a get-up-and-running script
See: https://sourceforge.net/p/pysolfc/discussion/503709/thread/b37cd50f/
2020-11-02 14:23:28 +02:00
Shlomi Fish
94927cbbc0 add a get-up-and-running script
See: https://sourceforge.net/p/pysolfc/discussion/503709/thread/b37cd50f/
2020-11-02 14:21:24 +02:00
Juhani Numminen
b265b28502 Enhance icon sets (.ico and .icns)
* Extract size 16x16 and 32x32 PNG's from .icns
* Put a sharper version of 128x128 in .icns
* Pack multiple icon sizes into .ico
2020-10-20 17:11:18 +03:00
Juhani Numminen
372fcba9de Window icon: Sort by largest, otherwise macOS Dock presents ugly low-res icon 2020-10-20 16:54:25 +03:00
Shlomi Fish
7da41a93be Allow to swap the mouse keys using the ini file.
See: https://sourceforge.net/p/pysolfc/discussion/503708/thread/5d77434ff8/

" PySolFC / Discussion / Open Discussion: Any way to remap mouse buttons? "

We may not have covered all the affected calls to bind().
2020-10-19 18:18:13 +03:00
Shlomi Fish
934db8da3b cleanup the last commit
Merge an identical if/else and indent comments
2020-10-19 15:00:24 +03:00
cardset
c6811cca29 Info/Settings Sliders Moved
Moved Offset Sliders to the same place as Scale Sliders. I think that makes more sense in operation and overview. It also avoids that wrong values could be saved
2020-10-19 09:14:43 +02:00
Juhani Numminen
91f785c574 Fix list of packages to install with apt-get
libperl-dev is not necessary, while the old python-glade2, python-gnome2 and python-gtk2
libraries are no longer installable in Ubuntu 20.04 LTS or Debian 10.

Update for this section requested in sf.net ticket #39; https://sourceforge.net/p/pysolfc/bugs/39/
2020-10-15 15:56:27 +03:00
Juhani Numminen
bb2769a63a Change comment which had non-runnable command in it
This was brought up on a mailing list
https://groups.google.com/d/msg/foss-card-games/uJLry-w498E/HmwiTxUkDQAJ
2020-10-15 15:32:35 +03:00
Juhani Numminen
1c79d5437e Refactor initCardsets
Make variable names descriptive.

Don't check for duplicate or empty strings in result of getSearchDirs() because
that is not necessary. Document those properties in a comment in resource.py.

Wrap try...except more closely around expressions where we want to catch.
2020-10-15 12:30:36 +03:00
Juhani Numminen
24ccdf634b macOS: use "PySolFC Help" menuitem provided by tk
The details are explained in this tutorial
https://tkdocs.com/tutorial/menus.html

For this to work, init() must destroy the tkinter.Tk instance it creates
so that was uncommented.
2020-10-14 14:59:38 +03:00
Juhani Numminen
7255ad9e68 macOS: Update travis to python 3.9 2020-10-12 23:35:15 +03:00
Juhani Numminen
451700aefa macOS: Create PySolFC.dmg for convenient installation 2020-10-12 23:35:15 +03:00
Juhani Numminen
97e981d900 macOS: ensure the application window is shown
py2app's "argv_emulation" feature prevents the Tkinter window from being shown
when PySolFC.app is launched.

This did not affect launching pysol.py using Terminal on macOS.

Solution found here: https://stackoverflow.com/questions/12992316/tkinter-py2app-created-application-doesnt-show-window-on-initial-launch
2020-10-12 23:35:15 +03:00
Juhani Numminen
d3faa78e75 Prune pysollib.macosx; it no longer had any effect 2020-10-12 23:35:15 +03:00
Juhani Numminen
07aac001b7 Clarify where a COPYRIGHT file should exist 2020-10-11 16:47:16 +03:00
Juhani Numminen
278b3261d9 Optimize cardsetparser
Apply the EAFP principle:
Regex matching was just doing extra the work because int() will check that
its argument is suitable in any case.

EAFP as in https://stackoverflow.com/questions/11360858/what-is-the-eafp-principle-in-python
2020-10-11 16:27:43 +03:00
Juhani Numminen
755b1d51d3 Remove file that shouldn't be there 2020-10-11 14:38:27 +03:00
Shlomi Fish
cb0ddeeccd use https:// link instead of mailto:
The mailto: link is available there
2020-10-11 13:27:05 +03:00
Shlomi Fish
dda2f3b520 revise some confusing phrasing 2020-10-11 13:23:14 +03:00
Shlomi Fish
d145642a9b Rename variables to make them more descriptive.
We used "lines_list" instead of "line" in singular. "list" is
the ADT ( https://en.wikipedia.org/wiki/Abstract_data_type )
rather than its python class.
2020-10-11 13:02:01 +03:00
Juhani Numminen
12601364dc Invoke init_tile() only when tile is used 2020-10-10 21:23:35 +03:00
Juhani Numminen
0be465dea1 Add error message for a missing card back (#185) 2020-10-10 21:22:58 +03:00
Neelix57
0f15613a15 fix cardset tutorial 2020-10-10 21:22:07 +03:00
Neelix57
1b14baf856 modify cardset tutorial 2020-10-10 21:21:52 +03:00
Juhani Numminen
da5b85c064 contrib/install-pysolfc.sh: pip install pygame for sound output (#180) 2020-10-08 15:10:22 +03:00
Juhani Numminen
a8a262a68c AppVeyor fix: change py2exe to pyinstaller
py2exe seems abandoned and still requires python < 3.4
while attrs does not support such an old python version anymore.

* https://ci.appveyor.com/project/shlomif/pysolfc/builds/35127928

To accommodate pyinstaller's directory layout, dist was changed to
dist/pysol in scripts/create_iss.py.

scripts/build.bat had become unmaintained and outdated.
2020-10-08 15:04:36 +03:00
Shlomi Fish
95a0d7d007 refactor/modernize the calls to open()
use "with", flags
2020-10-06 18:43:15 +03:00
Juhani Numminen
bf9ce90a5b Refactor cardset config.txt parser to a new module 2020-10-06 14:35:28 +03:00
Shlomi Fish
dfff276fc1 Rework the cardset tutorial formatting and grammar.
I hereby disclaim any implicit or explicit ownership of my changes in this
changeset, and put them under a multiple licence consisting of your choice of
one of more of:

- The CC0 / Public Domain - https://creativecommons.org/choose/zero/ .

- The MIT / Expat license - https://en.wikipedia.org/wiki/MIT_License

- The default licence of your project

Crediting me will be nice, but not mandatory, and you can change the licence
of the project without needing my permission.
2020-10-05 10:14:24 +03:00
Neelix57
55088a81bb add cardset tutorial 2020-10-04 20:46:09 +02:00
Neelix57
f35d7fb9f4 improvements
pysol_po_improvement
2020-09-30 10:59:26 +03:00
Shlomi Fish
e1d62726c5 Fix tidyall tests.
See:

https://metacpan.org/release/Code-TidyAll .
2020-09-30 10:48:47 +03:00
Shlomi Fish
05d78d5490 travis fix #1: flake8 formatting 2020-09-26 18:52:15 +03:00
Neelix57
eff7beacee Add files via upload 2020-09-26 12:18:14 +03:00
Neelix57
4be8f02a4e Add files via upload 2020-09-26 12:18:14 +03:00
Neelix57
f1baad5347 gen-html.py translation 2020-09-26 12:18:14 +03:00
Shlomi Fish
9708704b87 Remove trailing whitespace.
See:

* http://www.shlomifish.org/lecture/C-and-CPP/bad-elements/#trailing-whitespace

* http://vim.wikia.com/wiki/Highlight_unwanted_spaces
2020-09-20 16:02:26 +03:00