Commit Graph

992 Commits

Author SHA1 Message Date
keni
f9144fa576 build fixes for MacOSX:
- fix generation of sysconf when WANT_SOURCE_INSTALL=1
- use xcrun as main search for gdb
- turn gdb off in most cases
2018-01-09 20:59:26 -05:00
nhmall
2cfbd682a1 VS community editions are freely downloadable. Maintain only 2 most recent.
Changes to be committed:
	modified:   sys/winnt/Install.nt
	modified:   sys/winnt/Makefile.msc
	modified:   sys/winnt/nhsetup.bat
	deleted:    win/win32/vs2010/NetHack.sln
	deleted:    win/win32/vs2010/NetHackW.vcxproj
	deleted:    win/win32/vs2010/dgncomp.vcxproj
	deleted:    win/win32/vs2010/dgnstuff.vcxproj
	deleted:    win/win32/vs2010/dlb_main.vcxproj
	deleted:    win/win32/vs2010/levcomp.vcxproj
	deleted:    win/win32/vs2010/levstuff.vcxproj
	deleted:    win/win32/vs2010/makedefs.vcxproj
	deleted:    win/win32/vs2010/recover.vcxproj
	deleted:    win/win32/vs2010/tile2bmp.vcxproj
	deleted:    win/win32/vs2010/tilemap.vcxproj
	deleted:    win/win32/vs2010/tiles.vcxproj
	deleted:    win/win32/vs2010/uudecode.vcxproj
	deleted:    win/win32/vs2013/NetHack.sln
	deleted:    win/win32/vs2013/NetHack.vcxproj
	deleted:    win/win32/vs2013/NetHackW.vcxproj
	deleted:    win/win32/vs2013/dgncomp.vcxproj
	deleted:    win/win32/vs2013/dgnstuff.vcxproj
	deleted:    win/win32/vs2013/dlb_main.vcxproj
	deleted:    win/win32/vs2013/levcomp.vcxproj
	deleted:    win/win32/vs2013/levstuff.vcxproj
	deleted:    win/win32/vs2013/makedefs.vcxproj
	deleted:    win/win32/vs2013/nhdefkey.vcxproj
	deleted:    win/win32/vs2013/recover.vcxproj
	deleted:    win/win32/vs2013/tile2bmp.vcxproj
	deleted:    win/win32/vs2013/tilemap.vcxproj
	deleted:    win/win32/vs2013/tiles.vcxproj
	deleted:    win/win32/vs2013/uudecode.vcxproj
2017-12-03 08:42:38 -05:00
Pasi Kallinen
fe9762d1cc X11: Fix renaming at player selection
Due to the new player selection dialog I did, it was possible
to rename your character - but this didn't rename the lock files
and tried to load a save from the wrong name.

This is a bit of a hack, but seems to work and didn't seem to
cause problems for the tty.
2017-10-31 21:18:24 +02:00
nhmall
bba7a6b44c fix Makefile build for Windows after recent changes
New code in nttty.c had a dependency on gdi32.lib. Previously
that was only being linked in for the gui build when using the
Makefile.

Move the reference into the base libraries if both tty and gui
depend on it now.
2017-10-28 09:53:27 -04:00
Bart House
6322aec829 Win32TTY: Fix using a console font with wide glyphs
Added support to detect when the current console font has glyphs
that are too wide and will cause rendering errors in the console.
If detected, we warn the user and change the code page to 437
and the font to Consolas. At exit, if we had changed the font
and code page then we will restore to the original font and code page.
2017-10-25 10:59:11 +03:00
Bart House
a588541a27 Win32GUI: Gather raw_print text and display it all in single dialog
Defined strbuf_t and related routines to support dynamically sized
strings. Modified strip_newline() to strip the last newline in a string
instead of the first.

Simplified splash window code using new strbuf_t.

Prior to exiting game, re-enable getreturn and call wait_synch() in
case there is buffered raw prints that must be displayed to user.
2017-10-25 10:34:27 +03:00
Pasi Kallinen
1af921274e More Makefile verbosity 2017-10-15 18:00:56 +03:00
Pasi Kallinen
1ff4dfee85 Reduce *nix Makefile verbosity
Instead of showing all the CFLAGS and whatnot, just show "[CC] allmain.c"
or whatever. The verbose output can be switched back on with VERBOSEMAKE=1
2017-10-14 15:56:03 +03:00
Pasi Kallinen
7b156bf704 X11: add new player selection dialog
The dialog shows the player's name, race, role, gender, and
alignment in a single window, similar to the Qt4 dialog.
Also allows randomizing the character selection.

Use the dialog by setting OPTIONS=player_selection:dialog
2017-10-13 22:41:43 +03:00
Pasi Kallinen
257f17f8df Qt4: Don't segfault with QT_COMPACT 2017-10-10 20:18:04 +03:00
Pasi Kallinen
e2b367102a Complain if hints file does not exist 2017-10-10 17:50:39 +03:00
Pasi Kallinen
4659c55b5c Win32GUI: increase scroll_margin
Scrolling when 5 tiles from the edge is far too little,
you could get zapped from farther away.
2017-10-08 18:56:10 +03:00
Pasi Kallinen
61e2960c02 win32: Turn off autopickup by default
Watching new players stream NetHack, the conclusion is that
everyone turns off autopickup by default... once they learn how
to do it.
2017-10-08 18:36:57 +03:00
Pasi Kallinen
6b51f6ce09 Qt4: Use TIMED_DELAY and same delay as tty 2017-10-08 11:28:28 +03:00
Pasi Kallinen
e8ef27d985 Enable dumplogs for X11 and Qt4 2017-10-08 03:04:52 +03:00
Pasi Kallinen
ed335dd0a7 Add Qt4 windowport
Originally by Ray Chason for 3.4.3, based on the Qt windowport by
Warwick Allison. The look and feel is mostly the same.

Some improvements over the Qt 3 interface are:

* Panes are resizable
* Full support for IBMgraphics, and walls and corridors are drawn with
  graphical primitives for a continuous appearance no matter what the font
  says
* Lots of irritating glitches fixed
* Menus support proportional fonts correctly

Adding this because the old Qt windowport cannot be compiled on Qt4,
even with Qt3 compatibility stuff.

TODO:
 - background map glyphs
 - status hilites
 - menucolors
2017-10-08 01:15:02 +03:00
nhmall
c60db38725 missed file in vesa inclusion back in 2016 2017-10-04 19:55:40 -04:00
Pasi Kallinen
2804e750a0 Default status hilites for Windows 2017-10-01 17:44:41 +03:00
Pasi Kallinen
69f7a78dba Hilite Status: Improved
Allow defining multiple stops per field. Add hitpointbar.
2017-09-26 10:04:25 +03:00
Pasi Kallinen
596bc64341 Add option to make commands ask an inventory item via menu
Turning the boolean option force_invmenu makes all the commands
that ask for an inventory item pop up a menu instead of asking
a text query.  This should be much more friendlier to new
players, and is very useful for window ports on systems
with touch screens and no physical keyboard, such as cell phones.
2017-09-23 22:47:14 +03:00
PatR
cd8f028352 sys/unix/*.c formatting and PANICTRACE fix
I started out just reformatting the function header for regularize()
but ended up doing miscellaneous other stuff, including some code
changes.  I think the CHDIR code is a bit cleaner now, but shouldn't
have any differences in behavior.

Along the way I noticed that 'nethack -dpath' or 'nethack -d path'
modifies argv[] before PANICTRACE attempted to save argv[0], so would
break having nethack invoke gdb to get a backtrace.  ('ARGV0' seems to
be unnecessary since 'hname' holds the same value, but I didn't get rid
of it....)
2017-09-13 15:33:43 -07:00
Pasi Kallinen
cbd5934a1a No secure config errors in linux hints file
The linux hints file is for a single-user build, no need for this.
2017-09-10 21:31:41 +03:00
Pasi Kallinen
9c118b5b6b Secure config errors
If user can make NETHACKOPTIONS point to a file, that user could then
get the file contents via the extended config file error reporting.
Add CONFIG_ERROR_SECURE compile-time option to make that case output
only the first error, no line number or error context.
2017-09-10 21:05:51 +03:00
Pasi Kallinen
cfb09c9bf8 Handle windowtype and CHOOSE config errors 2017-09-09 13:50:34 +03:00
Bart House
70ac8a12af Improvements to build.bat scripts used to build Windows builds. Remove CRT Secure warnings. 2017-09-05 13:14:13 +03:00
Bart House
51f7cb5e9d Fix build errors with Visual Studio 2017 using latest SDK. We have yet another global namespace collision between window headers and nethack headers. This time it is the macro Protection that is defined before it is used in a function prototype in the windows headers. 2017-09-04 12:56:20 +03:00
Pasi Kallinen
26328d28ab Default menucolors for Windows 2017-09-01 12:45:28 +03:00
Pasi Kallinen
ecdebff121 Typofix 2017-09-01 12:20:21 +03:00
Bart House
f9a6cf2bf7 Improvements to Visual Studio 2015 build. 2017-09-01 12:14:04 +03:00
Bart House
77bd37b435 Visual Studio 2015 build improvements. 2017-09-01 12:13:58 +03:00
Pasi Kallinen
1eca824321 Add sysconf BONES_POOLS to allow more bones-files per level
Reduce the chance of a player playing on a public server encountering
their own bones, by implementing separate bones pools. The pool a player
belongs to is determined at game start, and only bones in that pool
are used. The sysconf BONES_POOLS allows the sysadmin to define how
many pools there are.
2017-08-20 23:04:59 +03:00
Pasi Kallinen
a2b51de481 Add stuff for compiling with Visual Studio 2015 2017-08-19 15:21:24 +03:00
Pasi Kallinen
189809a55c Rename terminate to nh_terminate so VS2015 can compile 2017-08-19 14:10:29 +03:00
PatR
1614f8f5ee fix brace mismatch in winami.c
Reported directly to devteam, so no #H number.  Conditional code in
amii_get_ext_cmd() included an unmatched '{', which would break
compilation (at least if EXTMENU was enabled) and also resulted in
the remainder of winami.c being mis-formatted (the functions there
were treated as being inside a block rather than at file level).

This is completely untested.

There's some code suppressed via '#if 0' with a comment "fix for PL2".
We haven't used the patch-level nomenclature since version 3.0!
2017-08-05 17:58:20 -07:00
PatR
0d7101cd29 fix part of #H5778 - file descriptor leaks
Handle the part of #H5778 in sys/atari/tos.c.

The part in util/recover.c has already been fixed; the part in
src/files.c still needs to be fixed.
2017-08-05 17:29:24 -07:00
PatR
6b851e0503 fix misplaced #if in sys/msdos/pckeys.c
Reported directly to devteam, so no #H number.  If SIMULATE_CURSOR
isn't defined, there would be no switch statement to attach the
subsequent cases to.

The suggested fix is obviously correct, but untested....
2017-07-30 18:43:47 -07:00
Pasi Kallinen
7d8b4d4f97 Add end-of-game dumplogs
This is based on the "new" dumplog patch for 3.6.0, by Maxime Bacoux.

Define DUMPLOG to enable. By default only enabled for the TTY linux.
2017-02-19 15:33:27 +02:00
Pasi Kallinen
f3b1cc74c6 Set max players in sysconf, not in the shell script 2016-12-14 16:49:52 +02:00
Pasi Kallinen
17e13f1e53 X11: Handle define-lines in NetHack.ad
xrdb can load a X recource file with #define-lines, but NetHack
cannot. Substitute the defines in Makefile during compile.

Requires grep
2016-10-14 16:50:25 +03:00
PatR
5e0cf04b04 update sys/unix/hints/macosx10.10
On OSX, one of the XQuartz header files triggers a compiler warning
about using a gcc extension, resulting in a diagnostic for each of
the files compiled with the WANT_WIN_X11 set of CFLAGS.  Use the
same fix as hints/macosx10.8 already does.
2016-07-30 01:59:27 -07:00
PatR
d69f0787be add '(uchar)' casts to ctype calls
This is from the pull request for the assertion failure fix.  It
did not mention how to reproduce the assertion failure, just added
casts to a bunch of isspace/isprint/tolower calls that didn't already
have such.

I removed an obsolete change for win/tty/topl.c and changed the
win/win32/mswproc.c code to avoid using an expression with side-effects
(*colorstring++) in calls to tolower() in case someone overrides that
with a macro which evaluates its argument more than once as some pre-
ANSI ones used to do.  Not tested, might have typos....

sys/wince/*.c still needs similar casts.
2016-07-19 05:40:09 -07:00
Pasi Kallinen
5f35d49105 X11: Make statue tiles look like grayscale monsters 2016-06-23 09:44:07 +03:00
Pasi Kallinen
942ee14d0f Move generic usernames to sysconf 2016-06-13 11:01:05 +03:00
PatR
4ff8d8ac7e fix #H4060 - sysconf is re-read if no config file
Config file handling remembers the name of the last config file
read in order for options processing to use it in messages, but
it was also reused as default config file name if user-supplied
config file name failed access() test.  So the SYSCF file became
the default user config file after it was used.  The config file
handling was a real mess.

This patch fixes it for Unix but there is a lot of scope for
typos in the changes for other platforms.  Testing is needed.
2016-06-12 17:52:12 -07:00
PatR
9c6e5a0563 dat/keyhelp for vms
Update vms/install.com (rather than Makefile.top) to install the new
data file for the 'whatdoes' command.

Also, the 3.6.0 distribution puts version number 3.5.0 into vms
binaries (all the programs, not just nethack itself).  It's something
observable with native tools without running the program, nothing to
do with nethack's 'v' command which gets its version number from
patchlevel.h via makedefs.
2016-06-05 06:33:42 -07:00
PatR
4ef23c6ac4 'whatdoes' command and new file: dat/keyhelp
Make the whatdoes ('&' or '?f') command support the 'altmeta' option
for meta-characters generated by two character seqeunce 'ESC char'.
Also, make it be more descriptive when reporting "no such command"
by including the numeric value it operated on when failing to match
any command.  That might provide a way for us to get some extra
information when players report problems with odd keystrokes:  we ask
them to type such at the "what command?" prompt and then tell us what
numbers come up.

It's been given a help file to deal with assorted idiosyncracies
which can come up when querying what keys do.  Unfortunately that
ended up being way more verbose than intended.

Installation of the extra data file has only been done for Unix.
Other platforms will get "can't open file" if they respond with
'&' or '?' to the "what command?" prompt.  The command will still
work though, just without the extra text.
2016-06-05 01:09:52 -07:00
PatR
d63ff7700d fix #H4287 - inconsistent handling of CPPFLAGS
[Subject should mention Unix, but would exceed 50 characters.]

Explicit build rules ignore $(CPPFLAGS), but the implicit C rule
(at least in GNU make) specifies it.  If user has a value for this
in the environment, that value would apply to building some source
files but not others.  This patch gives it an explicit empty value,
so building via implicit rule should expand it to nothing and match
the fact that it's omitted from explicit rules.

There was one C++ file which relied on the implicit C++ rule.  I've
added it to the files processed by 'make depend' and re-run that.
It now will get built via an explicit rule.

Also, a small amount of reformatting for HACKCSRC.
2016-04-01 16:49:49 -07:00
PatR
ca979cbc2b REPRODUCIBLE_BUILD, part 2
Other half of the Debian reproducible-builds patch.  For Unix
Makefile.top, explicitly set locale to generic 'C' when running
'dlb' during install, so that wildcard expansion will yield a
predictable ordering regardless of collation order specified by
the local enviroenment.  Otherwise contents of the 'nhdat'
container might be different--when viewed as a single data file
itself--during subsequent rebuild even when no changes to source
or data have been made and each module inside remains the same.

This assumes that locale doesn't matter during generation of any
of the data files (whether destined for dlb or not).  I don't
think the utility programs attempt any sorting on the fly or
other locale-dependent output but wouldn't swear to that....
2016-03-31 18:09:59 -07:00
Haoyang Wang
f81543aa4f MacOS 10.11.3 now requires the exec bits to be set on macosx.sh 2016-03-28 02:36:43 -07:00
PatR
105fd0a9a2 fix #H4286 - race condition during Unix build
Update sys/unix/Makefile.src to force it to build monst.o and
objects.o before attempting to build makedefs, so that building
the latter doesn't use the rules for those two object files in
Makefile.utl.  Prior to this, if 'make' was building multiple
targets in parallel monst.o and/or objects.o might be clobbered
when a process using util/Makefile tries to build them while its
parent is also building them via src/Makefile.

This includes a bit of reformatting which wasn't present in
yesterday's email attachment.
2016-03-27 16:50:38 -07:00