Commit a6fca114 authored by Oskar Skog's avatar Oskar Skog

0.5.9: mkdist didn't include Windows stuff; bug 14 & 27

parent c9943fe8
2019-07-07 Oskar Skog <https://oskog97.com/#contact>
0.5.9:
* mkdist: I forgot to include windows-beta and INSTALL.Windows.txt in
0.5.6.
* Makefile.static: Uninstall symlinks for other Python versions.
* anonymine.py: issues/27
2019-06-30 Oskar Skog <https://oskog97.com/#contact>
0.5.8:
* configure: Prioritize Python 2 over Python 3. (Python 2 is faster.)
......
......@@ -15,7 +15,7 @@
NAME := anonymine
NAME_C := Anonymine
DESCRIPTION = Minesweeper without guessing
VERSION := 0.5.8
VERSION := 0.5.9
# Four more variables are required: sysconfdir, vargamesdir, EXECUTABLES and
# MODULES
......@@ -289,6 +289,10 @@ _uninstall: FORCE
xdg-desktop-menu uninstall --novendor --mode system \
"$(FD_DESKTOP_DEST)" || true; \
fi
@-pypy3 symlinks uninstall
@-pypy2 symlinks uninstall
@-python3 symlinks uninstall
@-python2 symlinks uninstall
@$(NORMAL_UNINSTALL)
@-rm -r "$(CFG_DIR)"
@-rm "$(ENGINE_DEST)" "$(SOLVER_DEST)" "$(FIELDS_DEST)" "$(MAIN_DEST)"
......
......@@ -100,7 +100,8 @@ Tested platforms
longer as there is no `os.fork`.
0.5.6 does not have an automatic installer, read the instructions
in INSTALL.Windows.txt.
in INSTALL.Windows.txt. The versions on my website didn't include
some of the files until 0.5.9.
There is also a version that runs on Cygwin avaiable on
<https://gitlab.com/oskog97/anonymine-windows>. It's faster but
......
......@@ -77,6 +77,8 @@ Copyright (c) Oskar Skog, 2016-2019
Released under the Simplified BSD license (2 clause).
\n"""
# TODO: Don't forget to delete this
bug27 = 'auto' # 'auto', 'on' or 'off'
class curses_game():
'''Class for interface object for `engine.play_game(interface)`.
......@@ -231,34 +233,36 @@ class curses_game():
textics properties.
'''
# BUG: This is referenced from various lines in the class.
# More or less platform specific.
# Detected on:
# OS: Debian 8 (Linux 3.16) (x86-64)
# curses.version: 2.2
# Library: ncurses5.9
# Description:
# After forking, it appears, when the field is being initialized, the
# curses mode stops working.
# Solution:
# Define a program mode and temporarily reset to shell mode while
# initializing the field.
# The cursor can still not be hidden, so it will be moved to an
# unimportant place.
# The screen requires one complete redrawal of the screen, so that
# will also be done.
# NOTICE:
# FOR THE LOVE OF KEN, DO NOT REMOVE WORKAROUND!!
# NOTICE:
# DO NOT REMOVE.
# This is referenced from the source.
# Update 2016-07-17:
# The windows only needs to be redrawn on initialization, not on every
# click.
# Trying to leave and re-enter curses mode was no good.
# Update 2016-12-10 (pre 0.4.2):
# No need to temporarily reset to shell mode every time a cell is
# revealed. The issue was that game_status changed. Fixed in 0.3.11
# https://gitlab.com/oskog97/anonymine/issues/14
# Detected on:
# OS: Debian 8 (Linux 3.16) (x86-64)
# curses.version: 2.2
# Library: ncurses5.9
# Description:
# After forking, it appears, when the field is being initialized, the
# curses mode stops working.
# Solution:
# Define a program mode and temporarily reset to shell mode while
# initializing the field.
# The cursor can still not be hidden, so it will be moved to an
# unimportant place.
# The screen requires one complete redrawal of the screen, so that
# will also be done.
# NOTICE:
# DO NOT REMOVE.
# This is referenced from the source.
# Update 2016-07-17:
# The windows only needs to be redrawn on initialization, not on every
# click.
# Trying to leave and re-enter curses mode was no good.
# Update 2016-12-10 (pre 0.4.2):
# No need to temporarily reset to shell mode every time a cell is
# revealed. The issue was that game_status changed. Fixed in 0.3.11
# Update 2019-03-09 (0.5.6):
# The workaround breaks the game on Windows. Detect platform and disable.
# Update 2019-07-07 (0.5.9):
# Debian is no longer affected by this issue. Created new issue #27 in
# Gitlab.
def __init__(self, cfgfile, gametype):
'''Create interface object and enter curses mode.
......@@ -269,7 +273,13 @@ class curses_game():
WARNING: This does not leave curses mode on exceptions!
'''
self.curses_voodoo = not sys.platform.startswith('win')
# TODO: Don't forget about bug #27
if bug27 == 'auto':
self.curses_voodoo = not sys.platform.startswith('win')
elif bug27 == 'on':
self.curses_voodoo = True
elif bug27 == 'off':
self.curses_voodoo = False
# Constants
self.travel_diffs = {
......@@ -1260,12 +1270,30 @@ without guessing and supports three different game types:
]
)
)
# TODO: Don't forget to delete this
bug27_opt = parser.add_mutually_exclusive_group()
bug27_opt.add_argument(
'--bug27-on', action='store_const', dest='bug27', const='on',
help='Testing something, check out Gitlab for more info:'
)
bug27_opt.add_argument(
'--bug27-off', action='store_const', dest='bug27', const='off',
help='https://gitlab.com/oskog97/anonymine/issues/27'
)
#
# Parse the args and store the params.
args = parser.parse_args()
params = {}
user_input_required = True
error = False
# TODO: Don't forget to delete this
if args.bug27:
global bug27
bug27 = args.bug27
# Size, mines and gametype.
if args.size:
user_input_required = False
......
......@@ -12,14 +12,15 @@ pkgname=$3
pkgdir=$builddir$pkgname
NAME="anonymine"
subdirs="desktop"
subdirs="desktop windows-beta"
files="${NAME}.py ${NAME}_engine.py ${NAME}_fields.py ${NAME}_solver.py \
configure.py Makefile.static install-cfg enginecfg.fallback cursescfg \
test.py testcfg desktop/Info.plist.py desktop/icon.icns.py \
ChangeLog FAQ INSTALL NEWS README LICENSE desktop/FILES \
desktop/README RELEASE-NOTES INSTALL.Haiku \
desktop/README RELEASE-NOTES INSTALL.Haiku INSTALL.Windows.txt \
configure check.sh desktop/desktop.sh desktop/${NAME}-*.png \
desktop/${NAME}*.xcf mkenginecfg mkdist mk-symlinks"
desktop/${NAME}*.xcf mkenginecfg mkdist mk-symlinks \
windows-beta/cursescfg windows-beta/enginecfg"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment