A comment in macosx10.14 describing how to create a signed package
had the last sample command wrong. Fix it now in case that part
carries over to hypothetical--but likely--new macosx10.15 hints.
Also, shorten a couple of wide comment lines in the same area.
Add
--showpaths
early option to show where NetHack is expecting to find certain files
without starting up a game. It exits afterwards.
Windows sample (for illustration only, locations may differ for you):
Variable playground locations:
[hackdir ]="C:\Users\JohnDoe\NetHack\3.6\"
[leveldir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
[savedir ]="C:\Users\JohnDoe\AppData\Local\NetHack\3.6\"
[bonesdir ]="C:\ProgramData\NetHack\3.6\"
[datadir ]="C:\personal\nhdev\363\test\binary\"
[scoredir ]="C:\ProgramData\NetHack\3.6\"
[lockdir ]="C:\ProgramData\NetHack\3.6\"
[sysconfdir]="C:\ProgramData\NetHack\3.6\"
[configdir ]="C:\Users\JohnDoe\NetHack\3.6\"
[troubledir]="C:\Users\JohnDoe\NetHack\3.6\"
Your system configuration file (in sysconfdir):
"C:\Users\JohnDoe\NetHack\3.6\sysconf"
Your system symbols file (in sysconfdir):
"C:\Users\JohnDoe\NetHack\3.6\symbols"
Your personal configuration file (in configdir):
"C:\Users\JohnDoe\NetHack\3.6\.nethackrc"
Linux (for illustration only, locations may differ for you):
Your system configuration file:
"/home/johndoe/nh/install/games/lib/nethackdir/sysconf"
Your system symbols file:
"/home/johndoe/nh/install/games/lib/nethackdir/symbols"
Your personal configuration file:
"/home/johndoe/.nethackrc"
Errors seen during build:
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_ProgramData[.refptr.FOLDERID_ProgramData]+0x0): undefined reference to `FOLDERID_ProgramData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_LocalAppData[.refptr.FOLDERID_LocalAppData]+0x0): undefined reference to `FOLDERID_LocalAppData'
o/windmain.o:windmain.c:(.rdata$.refptr.FOLDERID_Profile[.refptr.FOLDERID_Profile]+0x0): undefined reference to `FOLDERID_Profile'
collect2.exe: error: ld returned 1 exit status
mingw32-make: *** [Makefile:849: ../binary/NetHack.exe] Error 1
DEFINE_KNOWN_FOLDER is using this particular definition in the mingw
header files:
rather than this one:
So, the known folder values that recent code is using such as
FOLDERID_ProgramData, FOLDERID_LocalAppData, and FOLDERID_Profile are
being declared as external constants.
That is why the error is a link error. We need to include -luuid on
the link command line because those external constants are defined
in uuid.lib.
mingw-w64 sys/winnt/Makefile.gcc required a Windows version bump from
0x0501 to 0x0601 (XP level to Windows 7 level) during compile in
order for the mingw system header files to include some of the
needed support for recent Windows port changes.
make typedef of boolean match mingw header files
link with shell32 and ole32 as Makefile.msc now had to do
kludge some stuff missing from mingw headers in sys/winnt/windmain.c
A few symbol-related modifications:
- fulfill a request from a blind player to allow them to
specify a unique/recognizable character for all pets and/or
the player in the config file for use when using a screen
reader (S_player_override, S_pet_override). Requires sysconf
setting ACCESSIBILITY to be set to have an effect, although
they can still be specified in the config file.
- Config file SYMBOLS entries were not working properly on
the rogue level. Allow ROGUESYMBOLS as well as SYMBOLS to be
specified in the config file independently.
- When values are moved into showsyms[], the overriding SYMBOLS
or ROGUESYMBOLS entry from the config file is used if there is
one; if there is no overriding value for a particular symbol,
the loaded symset value is used; if there is no symset entry
loaded for the symbol then a default symbol is used.
Noticed while investigating the message loop. If I had level files
from an interrupted game and was asked "Destroy old game?" when
starting a new one, answering 'n' left the terminal in an unusable
state. Executing 'stty sane' (invisibly since input echo was off)
repaired things but the user shouldn't have to do that.
Change unixtty.c's error() to shut down windowing if that has been
initialized. This might need some tweaking for tty, which will now
clear the screen before showing the startup error message. Other
systems besides unix use unixtty.c so are affected, but I think the
change doesn't introduce anything that should cause trouble (aside
from the potential screen erasure).
I had this in place at one point but must have accidentally undone it
before deciding that yesterday's patch was finished. Defer fetching
'pw' until it's needed.
Fixes#26
Report stated that the attempt to look up the player's username
(on Unix) failed (reason unknown) and nethack refused to allow the
player to execute the #explore command even though sysconf was set
to use character names (CHECK_PLNAME=1) instead of user names.
Setting EXPLORERS to "*" overcomes this glitch, but the fix moves
a bit of code around to honor CHECK_PLNAME before fetching username
so that that isn't necessary.
I ended up doing some formattng clean up (replace tabs with spaces,
whitespace cleanup in 'port_insert_pastebuf()'). The actual change
to fix#26 is only a few lines.
Another part of github issue 227. Casting a function pointer when
passing it to another function is iffy when lying about the return
type. tputs() expects a routine which returns int, so give it one.
Other xputc() usage is equivalent to putchar(), so define xputc()
with the same function signature as that has.
The tputs() declarations in system.h should probably be changed
(third argument is a function which takes an int rather than
unspecified parameters) but I've left them alone. I made that change
to tputs() in sys/share/tclib.c though.
NT and MSDOS changes are untested. tclib.c compiles ok with clang-
as-gcc on OSX but hasn't been tested with the port that uses it (VMS).
Change all the POSTINSTALL 'mkfontdir' to 'mkfontdir -x .lev' although
the mkfontdir version on my system didn't think $(HACKDIR)/*.lev were
font files when I built without dlb.
Also change the PREINSTALL 'cp -n win/X11/nethack.rc ~/.nethackrc' to
keep going if it fails. The linux hints use 'cp -n' for sysconf but
since it is doing so for the playground directory and 'make install'
starts out by clearing away everything in that directory, it shouldn't
fail. But some extra bullet proofing there may be warranted. Only
the initial cp is protected against clobbering an existing file; the
ownership+permission fixups that are applied to the copy of original
file still get applied to an existing one.
travis recently changed linux default dist from trusty to xenial, and bionic is next
include an additional travis linux build under bionic to eliminate surprises there
add a parameter to mkfontdir under linux to prevent it form going after .lev files