Commit Graph

1788 Commits

Author SHA1 Message Date
nhmall
ac9ba38449 file header bump from "NetHack 3.6" to "NetHack 3.7" 2020-08-03 22:07:36 -04:00
PatR
a968acb242 hints/macOS.2020
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).
2020-08-03 14:10:35 -07:00
PatR
02d616d8bc dat/Makefile spotless
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.
2020-08-03 13:36:40 -07:00
nhmall
d39ae5ce79 Support a build with tty,Qt,x11,curses on macOS Catalina 10.15
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
2020-08-02 23:03:13 -04:00
PatR
dcf5d7d68e Qt+X11 on OSX
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.
2020-07-31 14:30:55 -07:00
PatR
7f1420558a lua on Unix tinkering
The base Makefile hasn't been using the '+=' construct, so take
out the one used for lua (post 3.6.6).

Only the 'Sysunix' target has been tested.
2020-07-30 06:25:43 -07:00
PatR
5a072c4202 hints tinkering
For macosx10.10-qt, move the linker specification to one spot.
Should be no change in behavior.
2020-07-30 06:20:11 -07:00
PatR
79275629fc Qt tinkering
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.
2020-07-28 19:31:14 -07:00
nhmall
694fe2f161 allow checking tile2x11 utility build and execution on Windows
- this doesn't depend on building with X11 or linking with X11.
2020-07-25 11:42:59 -04:00
PatR
d8e383c63f unix/hints/macosx10.10-qt
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.
2020-07-18 08:18:25 -07:00
nhmall
a3bfb599ca more Makefile maintenance for Windows, msdos 2020-07-18 10:31:34 -04:00
nhmall
aa69f6be04 mirror the recent make depends update in some other Makefiles 2020-07-18 09:53:30 -04:00
nhmall
9b58010880 turn off clang -Wshadow when processing some qt headers
removes recently added win/Qt/qt_undef.h and win/Qt/qt_redef.h
adds win/Qt/qt_pre.h win/Qt/qt_post.h
2020-07-18 08:31:51 -04:00
PatR
c9ea607e46 bring Unix 'make depend' up to date
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.
2020-07-18 01:36:21 -07:00
nhmall
4fbc706fe5 update OSX hints/macosx10.10-qt VARDATND to include nhtiles.bmp
Match it to the linux Qt VARDATND

void NetHackQtWindow::CursorTo(int x,int y UNUSED) { puts("unexpected CursorTo"); }
2020-07-17 20:27:32 -04:00
nhmall
f6b4306ce6 quiet down some build warnings with Qt under OSX clang++ 2020-07-17 18:37:07 -04:00
nhmall
eab7a12b77 macosx10.10-qt follow-up bit to 3073a588 2020-07-16 19:57:20 -04:00
nhmall
c95fe8c32b Merge branch 'NetHack-3.7' into header-order3.7 2020-07-07 20:10:25 -04:00
nhmall
b967f73b96 build with the current Lua version 5.4.0 by default if not overridden 2020-07-07 17:36:23 -04:00
nhmall
1443ceecc5 more patchlevel consolidation 2020-07-07 08:55:11 -04:00
nhmall
68638d7103 outdated move follow-up 2020-07-05 15:25:37 -04:00
nhmall
55f3a015c9 Xcode project catch-up 2020-07-05 09:55:55 -04:00
nhmall
2bbfd4cce2 trailing whitespace bit 2020-07-05 09:30:17 -04:00
nhmall
6c0d522b1a relocate some more outdated code 2020-07-05 09:27:59 -04:00
nhmall
5a437b336a remove SYSFLAGS and MFLOPPY code
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 #364
Closes #207
2020-07-05 08:50:13 -04:00
nhmall
e4b18f0545 fix github issue 361 to make user_sounds useful even if MSGTYPE is hidden
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.
2020-07-02 15:49:45 -04:00
nhmall
f365bdd254 some mingw bits to move its gui variation closer to building and running 2020-06-11 12:26:44 -04:00
nhmall
bb1a0dd60b build warning for noreturn function that does return
The warning showed up with gcc on msdos (__DJGPP__)

end.c: In function 'nh_terminate':
end.c:1729:1: warning: 'noreturn' function does return
 }
 ^
2020-06-08 14:44:29 -04:00
nhmall
2c83e2e7e1 recognize visual studio 16.6 (released spring 2020) 2020-06-03 13:40:09 -04:00
nhmall
0fed5a06db Cross-compiling, msdos Makefile 2020-05-30 08:41:20 -04:00
nhmall
1d7ee022e6 remove outdated header files from Xcode project 2020-05-23 14:08:45 -04:00
nhmall
305ad3c58e remove outdated Xcode references 2020-05-23 14:00:34 -04:00
nhmall
e726bfe98a Xcode bit 2020-05-23 13:52:17 -04:00
PatR
ed5a2ea11e unix/Makefile.top bit
Guard against SYSCFLAGS someday containing space-separated tokens.
2020-05-19 11:07:48 -07:00
nhmall
696aaf8b8d remove added hints file
append the -fno-common to the existing Makefile
2020-05-18 23:24:29 -04:00
nhmall
98ba1bdf20 travis update - have a build with and without -fno-common 2020-05-18 22:49:05 -04:00
nhmall
ee41403af2 add -fno-common build to travis 2020-05-18 22:39:49 -04:00
PatR
ce5eebcb9b fix lua tmpname() vs mkstemp() on linux
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.
2020-05-18 12:01:23 -07:00
nhmall
c1cd4eb0ae Windows Makefile.msc update for more recent VS 2019 2020-05-15 17:49:50 -04:00
PatR
b42535fb2c add "ec2-user" to sysconf's list of generic users
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
2020-05-15 13:49:11 -07:00
PatR
41ae223585 hyphenated Unix user names
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.
2020-05-12 16:38:12 -07:00
nhmall
a6d84209bf msdos Makefile bit
still untested
2020-05-10 12:16:37 -04:00
nhmall
285fc69da0 Makefile updates for windows, msdos
The msdos Makefile changes are untested.
2020-05-10 12:11:17 -04:00
nhmall
390a531f16 relocate the real mode msdos code to outdated/sys/msdos 2020-05-10 11:46:07 -04:00
nhmall
c6d09a58d6 move unmaintained files into outdated folder
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.
2020-05-10 11:24:51 -04:00
nhmall
c2fa3c36d8 dependency bit 2020-05-09 18:19:56 -04:00
nhmall
044b55a8ba sys/winnt/Makefile.gcc updates for new file (mingw) 2020-05-06 16:24:03 -04:00
nhmall
c831522e94 Xcode fixes 2020-05-06 11:35:55 -04:00
nhmall
cdf280628c split symbols bits from drawing.c; new file src/symbols.c 2020-05-06 10:55:54 -04:00
nhmall
f1d7676bfb more CROSSCOMPILE fixes 2020-05-05 14:04:29 -04:00