Commit Graph

303 Commits

Author SHA1 Message Date
nhmall
a0b53ee391 merge 2018-11-11 10:29:52 -05:00
PatR
bb62ab6fc1 another Guidebook update - mostly NETHACKOPTIONS
Move some 'roff macros from Guidebook.mn to new file tmac.nh.

Header for tmac.nh is not being updated, even after explicitly adding
it to .gitattributes.  I'm not sure what I've done wrong.  (I'm using
'git nhadd doc/' here rather than explicit 'git nhadd doc/tmac.nh'.)

In Guidebook.mn, change the ``setenv NETHACKOPTIONS'' example so that
it fits within one line in Guidebook.txt.  (I looked at 3.4.3's
edition of that file and the example went not just beyond the margin
of the formatted text but beyond 80 columns, so wrapped in an ugly
fashion.)  I had previously changed 'autoquiver' to 'color' to shorten
it, now have changed '!autopickup' to '!leg' to show an example of
truncated option name as well as shorten, and also 'fruit:papaya' to
'fruit:lime' to squeeze out the last two columns needed to fit within
the text margin while retaining 'name:Blue Meanie' as requested.
Guidebook.txt shows both NETHACKOPTIONS examples with indentation
suppressed, Guidebook.ps uses normal indentation (evidently using a
narrower font, even with \f(CR (constant-width Roman) to approximate
TeX's \tt, since the indented example fits fine and looks better).

Some Guidebook.tex catchup.  I suspect that lots of bits and bobs
don't match between Guidebook.mn and Guidebook.tex these days.
Particularly quoting and variant font (italics, bold, \tt) usage.
Also the recently added box around the sample screenshot.  This
modifies the screenshot to match Guidebook.mn's, reflecting change
in status field spacing by STATUS_HILITES.
2018-10-27 00:42:11 -07:00
keni
17b48480a5 Remove "makedefs -m" and monstr.c from the Unix build. 2018-10-20 23:14:34 -04:00
Ray Chason
25f770509a -ansi -pedantic can't come after -std=c++11 2018-09-10 21:13:28 +03:00
Ray Chason
5e04a6e6cb New hints file for Qt 5 on Mac OS X 2018-09-10 21:12:17 +03:00
Pasi Kallinen
249494c8ee Qt4 moc is moc-qt4
At least on my Debian, the Qt4 MOC is now called moc-qt4,
when it used to be just moc - probably due to Qt5 being moc-qt5
2018-09-10 21:06:37 +03:00
Ray Chason
08ef5ff99f Provide Qt 5 configuration on Linux
* CXX specifies -std=gnu++11
* WINQT5LIB variable added
* Hints file can specify CXX and MOC
2018-09-09 18:10:20 +03:00
nhmall
3b77543bcc preserve change from old branch 2018-05-18 22:05:05 -04:00
PatR
546321d055 Unix Makefile changes 2018-05-18 22:04:21 -04:00
nhmall
5a62515d7b more bump of version ID 2018-05-16 23:08:37 -04:00
nhmall
2b66b5ecd1 bump version ID values 2018-05-16 23:06:44 -04:00
nhmall
821399c6be fix access violation when --debug:xxxx has no other args after it 2018-05-15 19:39:05 -04:00
keni
f810a45dc1 fix H7138: sys/unix/setup.sh fails with no arguments
Sanity check was in the wrong place.
2018-05-15 16:30:28 -04:00
nhmall
702154529f provide some debug developer controls - part 1 2018-05-10 10:05:29 -04:00
nhmall
2576ae071f text bit in sys/unix/Makefile.dat 2018-04-25 19:26:35 -04:00
keni
0f58af6f37 add missing copyright info 2018-04-25 16:54:50 -04:00
keni
09502df9f1 force expand unexpanded substitution variables 2018-04-25 15:36:11 -04:00
keni
d8c49ec9d1 Add updated copyright lines, part 1. 2018-04-25 15:00:13 -04:00
keni
11f1983253 update .gitattributes files for substitution and copyright headers 2018-04-25 14:52:43 -04:00
nhmall
d420d8073d update some old version references 2018-04-21 18:05:46 -04:00
Pasi Kallinen
22cc37ed61 How to create single-page Guidebook.txt 2018-04-10 18:19:45 +03:00
PatR
a365dc3450 {dgn,lev}_lex.c - suppress yyunput() complaint
When dgn_comp.l and lev_comp.l are processed by older versions of
flex, 'gcc -Wunused' complains when compiling dgn_lex.c and lev_lex.c
because flex creates 'static void yyunput()' and nethack doesn't use
it.  Newer versions honor macro YY_NO_UNPUT to hide the offending
code, but that doesn't help with older versions (like the one
masquerading as 'lex' on OSX).  Adding a dummy usage would probably
cause problems with other lexers, so change it from static to
'void yyunput()' as a 'sed' fixup in util/Makefile after flex has
finished.  That will be a no-op when yyunput doesn't exist or isn't
static.

In addition to the sys/unix/Makefile.utl change, this checks in new
sys/share/{dgn,lev}_lex.c with the fixup in place.
2018-03-27 16:34:47 -07:00
PatR
c43b19a6d2 sys/unix/gitinfo.sh
Avoid '[[ ... ]]' to cater to a more rudimentary shell.
2018-03-16 00:39:05 -07:00
Pasi Kallinen
cbf6f83a8b Fix the filename in qt4 hints file 2018-03-14 19:02:07 +02:00
PatR
ddb830911e more Unix gitinfo
When make uses 'makedefs -v' to create date.h, force it to create
gitinfo.txt all the time instead of just when that doesn't already
exist.  Use 'make GITINFO=0' to get the previous behavior.

To skip it entirely, you need to do that and also make sure that
some file by that name already exists.  'touch dat/gitinfo.txt' or
perhaps 'echo "#no git" > dat/gitinfo.txt' would suffice.
2018-03-10 12:32:52 -08:00
PatR
4d35ca86f3 gitinfo.txt on Unix
Hide the scary perl command during 'make all' feedback in src/.
I'm not a shell programmer but this works fine for me when skipping
NHgithook::NHversioning because dat/gitinfo.txt is already present,
when creating dat/gitinfo.txt successfully, and when creation fails
because perl can't find NHgithook.pm.  It hasn't been tested when
perl itself is absent.
2018-03-04 14:17:13 -08:00
Pasi Kallinen
09554c2b96 Make spotless should remove qt4 specific files 2018-03-03 16:58:07 +02:00
keni
cd96394ccd Update docs, man page.
Add last chance attempt to build dat/gitinfo.txt
2018-02-23 19:50:28 -05:00
keni
cf9cf038f3 gitinfo.pl: special case code to allow running it from $TOP or DEVEL without
installing the hooks first
NHgithook.pm: add some warnings if nhversioning can't open files
make sure nhversioning fails before opening gitinfo.txt if it can't get valid
 data
2018-02-23 19:50:15 -05:00
nhmall
65655d2cee Incorporate some git information into NetHack
Incorporate some git information into NetHack so that it
is potentially visible to a player. That's useful when
collecting details about the version that they are
running and, if the gitinfo is present, it can tie the
code to a specific git commit in the repository.

This modifies 'makedefs -v' to check for the presence of a data file
called dat/gitinfo.txt and if it is there, parse out its
contents, then write additional lines to include/date.h beyond
what 'makedefs -v' was previously putting in there, similar to
this sample:

      #define NETHACK_GIT_SHA "0c84e564c78e2024e562d39539376ce2e21eec8e"
      #define NETHACK_GIT_BRANCH "NetHack-3.6.0"

The contents of an appropriate dat/gitinfo.txt are as follows,
and trailing/leading whitespace is not significant:

      githash = 0c84e564c78e2024e562d39539376ce2e21eec8e
      gitbranch = NetHack-3.6.0

It also adjusts the contents of the 'v' version information to
include the additional git info when available.

Also adds some hooks DEVEL/hooksdir and a perl file to DEVEL
for simplifying and automating the deposit of dat/gitinfo.txt
so that it generally reflects the most current git commit.

DEVEL/gitinfo.pl can be used to build dat/gitinfo.txt at any
time without doing a commit, merge, or checkout.
    	perl DEVEL/gitinfo.pl

command line --version and -version support

To complement the extra information being provided in the
version by the 'v' command, this also adds support for the
following new command line arguments:
    --version
     -version            Output the NetHack version string then exit.

    --version:paste      Output the NetHack version string and also copy it to
     -version:paste      the platform's paste buffer for insertion somewhere,
                         then exit.

If the paste variation of -version is requested on a platform that
hasn't incorporated any support for the capability, it will deliver
the version info then an error message, prior to exiting.

To support the extended -version:paste variation, a port needs to:
    - provide a port-specific routine to perform
      the paste buffer copy in a port code file.
    - #define RUNTIME_PASTEBUF_SUPPORT in the include/portconf.h header file.

    --skeleton--
    void port_insert_pastebuf(buf)
    char *buf;
    {
    	/* insert code to copy the version info from buf into
    	   platform's paste buffer in a supported way */
    }

macosx and Windows have both added support for RUNTIME_PASTEBUF_SUPPORT
2018-02-23 19:34:44 -05:00
keni
12530cb155 infrastructure fixes:
- fix bug in git hooks that loses file permissions when doing variable expansion
- fix execute permissions on sys/unix/hints/macosx.sh
- explicitly call out perl as required for hooks in Developer.txt
2018-02-16 12:07:37 -05:00
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
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
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
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
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
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
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