Started out removing some trailing spaces and ended up making various
substantive changes.
Don't include tty by default since the sample make command shows how
to enable it and there isn't any easy way to disable it other than
not requesting it to begin with. (Due to using defined/not-defined
rather than values in the 'if' directives, WANT_WIN_TTY=0 is the same
as WANT_WIN_TTY=1 rather than it's inverse.)
That resulted in all the interfaces starting commented out, so add
some make code to make sure that at least one is enabled. If none,
it silently enables tty.
The sequence
|CXX=compilerA
|LINK=$(CXX)
|#CXX=compilerB
wouldn't work if 'make' substitutes immediately (I can't recall
offhand whether it does) and the first CXX was commented out in
order to uncomment the second one. The default CXX value would be
used instead of the #CXX=foo one even if it was uncommented. Just
move LINK= after it.
Build logic has been tested. Final install and packaging for
distribution have not (but weren't touched so shouldn't be affected).
Testing some hints revisions resulted in some bafflement which
turned out to be caused by 'make spotless' in the dat subdirectory
not removing 'options'. It wasn't removing several other generated
files either. That used to work but got clobbered when the lua
special levels replaced levcomp and dgncomp.
Assuming you have the prerequisite packages, You can specify the
window ports to include on the make command line:
make WANT_WIN_QT=1 WANT_WIN_X11=1 WANT_WIN_CURSES=1 WANT_WIN_TTY=1 all
Prequisites for window ports beyond tty:
(some sample homebrew commands to obtain them shown but that is not the
only way):
xquartz for x11 support
brew install xquartz
Qt for Qt support
brew install Qt
Using hints/macosx10.10-qt,
| make QTDIR={path} WANT_WIN_X11=1 USE_XPM=1
now builds a combined tty+Qt+X11 binary. Linking the X11 code
works a lot better when the Makefile tells the linker where the
X11 libraries are....
This reconciles some of the differences between macosx10.10 and
macosx10.10-qt but there are still lots more (including lack of
WANT_WIN_CURSES in the latter). And now 10.10 has differences
with the half dozen or so other macosx10.* hints.
After installing qt511-qtbase and qt511-qtmultimedia from macports
on my OSX 10.11 system (there is a qt513 but it requires OSX 10.12),
I can build the Qt interface with hints/macosx10.10-qt by overriding
QTDIR. It doesn't actually need the extra CFLAGS, and without those
I wonder whether the multimedia package is needed either, but I've
left them in. I have changed them to not be passed to the C sources
though, just the C++ ones.
I haven't tried combining with X11 or adding curses.
macosx10.10-qt was derived from an out of date version of
macosx10.10. This tries to make combined X11+Qt behave sanely but
I have no way of testing it.
It appears to require homebrew, at least that's what the construct
$(shell brew ...) to set up QTDIR suggests. That seems iffy and
should at least be documented.
It includes tty along with Qt but lacks support for including the
curses interface so definitely needs more updating.
and run it.
We need to do some about preserving the Makefiles as they were before
the obsolete code went away, because many of the bits that that
obsolete code depended on are now going away too.
A check into github issue 364 confirmed that
ba6edbe5dc
had incorrectly updated the bwrite sizeof entry for sysflags.
The SYSFLAGS and MFLOPPY code is all in the outdated part of the tree, so just
remove it rather than re-correct it.
Closes#364Closes#207
fixes#361
Also, experminental introduction of vt_sounddata to enable tty to pass
a sound file index to the terminal side of things where perhaps someone
can add code to something like hterm to take the information relayed by
NetHack to trigger user_sounds locally even if playing on a server.
Compile time option TTY_SOUND_ESCCODES required to build that support in.
It should be independent of TTY_TILE_ESCCODES.
Avoid the warning that tmpname should be replaced by mkstemp by
replacing tmpname with mkstemp. lua has code to do that but it isn't
trivial to activate while leaving the lua distribution unmodified.
[I've no idea whether nethack's usage even results in liblua ever
creating any temporary files.]
Using nethack's hints to pass -DLUA_USE_POSIX from top Makefile to
lib/lua-$(LUA_VERSION)/Makefile has been tested, building liblua.a
on linux with that has not.
Pull request #330 would add "ec2" ("ec2-user" after dash and whatever
follows has been stripped off) to GENERICUSERS for Amazon Linux. Now
that dashes-in-username handling has been fixed, that doesn't need to
be obscure and the full user name can be included instead.
I also added a commented out entry for PORTABLE_DEVICE_PATHS to the
default sysconf, then cloned that for Windows' sysconf.template.
Fixes#330
Fix for $USER, $LOGNAME, getlogin() values that have dashes in them:
keep dash and whatever follows as part of the name instead of stripping
it off for role/race/gender/alignment.
Before:
% USER=test-bar-fem ./nethack
|Shall I pick your female Barbarian's race and alignment for you?
and character ended up named 'test'.
After:
% USER=test-bar-fem ./nethack
|Shall I pick character's race, role, gender and alignment for you?
and character ends up named 'test-bar-fem'. However,
% ./nethack -u test-bar-fem
still behaves like the 'before' case.
|Shall I pick your female Barbarian's race and alignment for you?
Dash handling is only changed when the dash comes from user name (or
from envionment overriding user name), not from direct player input
or run-time config file.
If an old port is resurrected to work with current version code, its files
can be relocated to the appropriate sys or win folder as required.
In the meantime, the burden of upkeep can be avoided for the stuff in the
outdated folder for now.