]> granicus.if.org Git - nethack/commit
support version-specific dlb file
authornhmall <nhmall@nethack.org>
Sun, 12 May 2019 18:51:26 +0000 (14:51 -0400)
committernhmall <nhmall@nethack.org>
Sun, 12 May 2019 18:51:26 +0000 (14:51 -0400)
commitbcd05308aa75b2e193c21641fa808cb798195c99
tree81d9aec13d4a9e85c682f3303dc018539bb20c80
parent717829627a00da8230dd0ff79340cae42fe6381b
support version-specific dlb file

There was a post-3.6.2 discussion on a forum where someone had
tried to copy the NetHack 3.6.2 exe file overtop of an
existing NetHack 3.6.0 playground, and then try to run it.

We have never suggested trying that, nor do we attempt to
provide any backward or forward compatibility between the
supporting files found in nhdat that would allow that. Any
particular version of NetHack expects to have matching
support files designed and matched to that version.

This adds optional support for helping to prevent the
opening of nhdat containing support files from an
unmatched version of NetHack.

If you #define VERSION_IN_DLB_FILENAME in your
platform's include/*conf.h file, it will use a
name such as nhdat362, instead of plain nhdat, and
will exit more gracefully than the fault/crash
mentioned in the discussion if it doesn't find the
file it is looking for.

Developers - please note that if you do
to cause NetHack to look for an nhdat* file with
the version info appended to the name, you will likely
have to modify your build/clean/spotless mechanics
beyond the C compile itself to properly deal with the
new generated file name.
21 files changed:
include/dlb.h
include/ntconf.h
src/dlb.c
sys/winnt/Makefile.msc
util/dlb_main.c
win/win32/vs2017/NetHack.sln
win/win32/vs2017/NetHack.vcxproj
win/win32/vs2017/NetHackProperties.props [new file with mode: 0644]
win/win32/vs2017/NetHackW.vcxproj
win/win32/vs2017/afterdlb.proj
win/win32/vs2017/dgncomp.vcxproj
win/win32/vs2017/dlb.vcxproj
win/win32/vs2017/levcomp.vcxproj
win/win32/vs2017/makedefs.vcxproj
win/win32/vs2017/nh340key.vcxproj
win/win32/vs2017/nhdefkey.vcxproj
win/win32/vs2017/nhraykey.vcxproj
win/win32/vs2017/recover.vcxproj
win/win32/vs2017/tile2bmp.vcxproj
win/win32/vs2017/tilemap.vcxproj
win/win32/vs2017/uudecode.vcxproj