Commit Graph
500 Commits
Author SHA1 Message Date
karafruit f981f44949 Merge branch 'NetHack-5.0' into twitch-interact 2026-09-22 08:36:33 -07:00
nhmall 017fbcf510 follow-up 2026-09-09 20:00:58 -04:00
nhmall 3a496219f3 macOS generated tile build fix 2026-09-09 19:55:33 -04:00
nhmall 96c564f09d Merge branch 'x11-bmp-gif' of https://github.com/chasonr/NetHack into NetHack-5.0 2026-09-09 11:23:34 -04:00
nhmall cc4768f1c9 adjust some Makefile dependencies
Reported by @benknoble in https://github.com/NetHack/NetHack/issues/1669

Some undeclared dependencies could arise when building with make --shuffle

This attempts to resolve those.
2026-09-01 13:38:05 -04:00
Ray Chason a575fccf08 Add PNG support 2026-08-24 12:02:35 -04:00
Ray Chason 9179d5d960 Adjustments for MacOS compile
per comments by Michael Allison
2026-08-19 09:37:41 +03:00
Ray Chason 7e39b3faf1 Note Xft support in option window 2026-08-19 09:37:41 +03:00
Ray Chason fbc586bf44 Convert map to use Xft 2026-08-19 09:37:40 +03:00
nhmall 15cfe90d62 follow-up: build with Qt6 support on Linux with Qt 6.1
1d3178a quieted the g++ build, but made the warnings even
worse with a clang build.

The addition of the -Wno-sfinae-incomplete caused an unrecognized
option warning using recent clang.

Recent clang build with Qt6.1 also caused several warnings
during the processing of the Qt6.1 header files related to
c++26-extensions.

This adds (under Linux) -Wnoc++-26-extensions to the clang++
command line to quiet those warnings and restricts the
-Wno-sfinae-incomplete command line option to the g++ build.
2026-08-06 10:05:27 -04:00
nhmall 1d3178a199 build with Qt6 support on Linux with Qt 6.1 2026-07-27 16:27:20 -04:00
Ray Chason e00b32263e Support the Curses-only configuration 2026-07-10 09:08:55 -04:00
Ray Chason 7889eedfa5 MS-DOS: Support no-tiles and no-graphics builds
In previous versions of NetHack, setting -DUSE_TILES enabled the tile
support, while setting -DSUPPRESS_GRAPHICS produced a NetHack that
would write its TTY output to standard output, and rely on ANSI.SYS or
similar to do screen control. (USE_TILES is now TILES_IN_GLYPHMAP.)

This change ensures that the current NetHack can be built the same
ways.

One twist is that previous NetHacks would drop all support for graphical
modes when tiles were not supported. Thus sys/msdos/vid{vga,vesa}.c have
very disordered use of TILES_IN_GLYPHMAP. There was no need to check
this. But now, the graphical modes also support Unicode. A non-tiled
build should have the graphical modes, with only the text functions
present, provided that ENHANCED_SYMBOLS is defined.

Some unused and locally used symbols were cleaned up along the way.
2026-07-09 23:48:14 -04:00
nhmall 6d0757fc86 Fix MS-DOS crosscompile on macOS host 2026-06-16 19:56:30 -04:00
Patric Mueller 49ac961884 replace NOTPARMDECL with TPARM_WORKAROUND
The old logic used a negative check to emit an extern declaration for
tparm(). This guarded against old platforms whose curses implementations
did not declare their own functions.

If there are still any platforms left that need this declaration, they
can set TPARM_WORKAROUND to get the old behavior back.
2026-06-10 10:16:44 +02:00
Ingo Paschke 63cb04f410 hints: keep host CC for top-level lua in cross builds
LUAMAKEFLAGS uses TARGET_CC, which the cross hints override to the
target compiler.  The top-level liblua.a is a host-side prerequisite
of the generated include/nhlua.h; the target lua is built separately
under BUILD_TARGET_LUA.
2026-06-04 07:17:35 -04:00
nhmall cd047cc6b8 thinko in comment 2026-06-03 16:38:53 -04:00
nhmall 8182cf3982 required after TIMED_DELAY fix previously committed 2026-06-03 16:29:51 -04:00
Pasi Kallinen 4fadc7c96f Fix qt compile
Some recent Makefile hints reorg messed with the Qt compile,
it needs to be linked tiles
2026-06-03 10:54:16 +03:00
nhmall 0bf0498155 add dirs-perms.500 and a default build change
The directories and permissions portion of the linux.500 and macOS.500
hints files and their included files has been consolidated to
dirs-perms.500.

The builder can edit that one file now, to identify
the folders that will be utilised as part of the build.

Alternatively, you can set those folders and permissions in a
make.perms file in the top of the NetHack folder tree and
they should take precedence over the ones in dirs-perms.500
because dirs-perms.500 uses '?=' variable assignment, which
means "set the value of the variable if no value has been set."

* NOTE: BUILD CHANGE *

This also makes WANT_SOURCE_INSTALL=1 the default over
WANT_SHARED_INSTALL=1, if neither is explicitly set.
The new default is the safer and less-impacting default,
but it will change where things get installed over earlier
Makefile builds. You can be explicit with WANT_SHARED_INSTALL=1
in your make command to get that..

These are the differences between the two:

make WANT_SHARED_INSTALL=1    Place the results of the install/update portion
                              of the build into a shared area on a multiuser
                              system.

make WANT_SOURCE_INSTALL=1    Place the results of the install/update portion
                              of the build into a subfolder of the source
                              tree, rather than in a system-wide shared area.

Also note that the macOS hints file behaves slightly differntly depending
on whether WANT_SOURCE_INSTALL=1 was set versus letting it be the default.
That's not new, it behaved that way before.
2026-05-27 19:32:40 -04:00
nhmall c506c73fbe X11 bit 2026-05-24 00:21:40 -04:00
nhmall 7025945d2a Get CROSSCOMPILE defined earlier in the Makefiles 2026-05-23 22:50:12 -04:00
nhmall 1b7e529732 cross-compile and build adjustments
Tested:
    Ubuntu: make WANT_WIN_TTY=1 WANT_WIN_CURSES=1 resp=1 update
    Ubuntu: make WANT_SYSTEM_LUA=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 resp=1 update
    make CROSS_TO_MSDOS=1 package
    make CROSS_TO_AMIGA=1 all
    make CROSS_TO_AMIGA=1 package
2026-05-20 00:37:02 -04:00
nhmall 4c825ed9a9 typo CROSS_TO_MSDOS=1 2026-05-19 15:38:37 -04:00
nhmall b17eafa0ab CROSS_TO_AMIGA=1 build fix
Fallout from other work this past weekend.
2026-05-19 12:18:23 -04:00
nhmall 182dd93a38 remove a debug line 2026-05-19 11:53:54 -04:00
nhmall 46735de8a6 extend WANT_SYSTEM_LUA=1 to other distros
Only tested on Ubuntu at this point.

feedback on other distros is welcome
2026-05-19 11:38:05 -04:00
nhmall 5333747f02 Add some support for Alpine Linux system Lua package
Requires apk add lua5.4-dev (for the C Lua headers)
2026-05-19 00:49:30 -04:00
nhmall 721dc27f26 remove an unneeded change from earlier CROSS_TO_MSDOS 2026-05-18 16:09:36 -04:00
nhmall 68e36aff74 CROSS_TO_AMIGA fix 2026-05-18 16:06:15 -04:00
nhmall 9841830460 some more follow-up
CROSS_TO_MSDOS build
2026-05-18 15:46:54 -04:00
nhmall 95151d99fc more follow-up
CI still had a duplicate tile.o
2026-05-18 14:18:24 -04:00
nhmall 0607d6426c follow-up 2026-05-18 13:53:02 -04:00
nhmall 3a892160df macOS follow-up 2026-05-18 13:07:13 -04:00
nhmall 29951cccd1 add support for optional builder-created make.prefs
Set things up so that the Makefile build will look for 'make.prefs'
at the top of the NetHack source tree.

If 'make.prefs' is present, the Makefile build will include it
just ahead of the PRE section of a hints file specified to
sys/unix/setup.sh, or practically the first thing during a
Makefile build if no hints file was specified.

The advantage of using a 'make.prefs' is that instead of putting a
series of Makefile variable value assignments on the command line
each time, like this:
    make WANT_WIN_X11=1 WANT_WIN_TTY=1 WANT_WIN_CURSES=1 c2x=1 resp=1 update
you can, instead, put those preferences into make.prefs, like this:

# start of make.prefs
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
# end of make.prefs

Now, my make command just needs to specify a target:
    make update

The syntax for checking whether make.prefs exists, and for including
it, is GNU make, or bsd make, specific, so sys/unix/mkmkfile.sh will
insert the correct syntax for the make that is in-use when
sys/unix/setup.sh is executed.

The 'make.prefs' file isn't limited to Makefile variable assignments, and
can contain any valid make syntax for the version of make on your system,
but adding make syntax beyond Makefile variable assignment will cause
your make.prefs file to become specific to that version of make. There
are syntactical differences between GNU make and bsd make, particularly
for directives and conditional tests.

The 'make.prefs' file can potentially eliminate much/all of the manual
editing of distributed repository Makefiles or hints files that you, as
a NetHack developer or builder, might routinely carry out.
You have the option of placing your preference changes in 'make.prefs'
instead.

Related reference for .500 hints file variables:

In the NetHack source tree:
sys/unix/README.hints

On GitHub:
https://github.com/NetHack/NetHack/blob/NetHack-5.0/sys/unix/README-hints

For example, on macOS, where GNU make is being used, and I typically
set things up using the macOS.500 hints file:
    sys/unix/setup.sh sys/unix/hints/macOS.500
I might have the following make.prefs in the root of my NetHack source tree:
#---- snip -------
$(info Attention - Using make.prefs)
WANT_MACSOUND=1
resp=1
#---- end-snip ---

For another example, on Linux, where GNU make is being used, and I
typically set things up using the linux.500 hints file:
    sys/unix/setup.sh sys/unix/hints/linux.500
I might have the following make.prefs file in the root of my NetHack
source tree:
#---- snip -------
$(info Using make.prefs)
WANT_WIN_X11=1
WANT_WIN_TTY=1
WANT_WIN_CURSES=1
c2x=1
resp=1
#---- end-snip ---
2026-05-18 13:03:31 -04:00
nhmall d9bc6d7b8a Revert "add #-EARLY section"
This reverts commit 85ca1cce74.
2026-05-17 20:54:08 -04:00
nhmall 85ca1cce74 add #-EARLY section 2026-05-17 20:38:10 -04:00
nhmall 2445b97a10 build fix with hints file linux.500 and musl=1
This fix was suggested by @PPN-SD in the comments on
GitHub issue https://github.com/NetHack/NetHack/issues/1530#issuecomment-4466027729

Resolves #1530
2026-05-16 08:57:54 -04:00
nhmall c558ef0b33 Makefile syntax did not work on OpenBSD
Trying another approach for whichbsd.500
2026-05-15 15:29:25 -04:00
nhmall d81d47b81e new file header info 2026-05-15 12:18:29 -04:00
nhmall 8d0cfb05fa rename netbsd.500 to bsd.500
In past releases of NetHack, there was a myriad of different hints
files for different operating systems, and even different versions
of operating systems.

It made maintenance a chore, because all the variable hints files
had to be updated for a wanted change, or (as typically was the
case), some lesser-used hints files were left behind and became
outdated.

Instead of going down that road again, this renames
    sys/unix/hints/netbsd.500
to
    sys/unix/hints/bsd.500

Where things need to differ for a different bsd flavour,
the differences can be shrouded in things like

    .if ${WHICHBSD} == "NETBSD"
    .else
    .endif

This change is being done to make maintenance easier, at the
cost of making the resulting Makefiles a little more complex,
but there won't be as many separate Makefile hints to maintain.

This commit is being done instead of merging pull request #1531
which would add a new sys/unix/hints/openbsd.500 file.

Only tested on NetBSD so far. Please let us know if there's
an issue on other bsd's, and we will attempt to fix thos issues.

Closes #1531

Close
2026-05-15 12:11:34 -04:00
nhmall 342bbc85c4 warning bit for clang-22 and tiletext.c 2026-05-14 08:31:33 -04:00
nhmall 11cd021063 update header info on netbsd.500 2026-05-13 17:34:46 -04:00
Anthony C Howe afeb2f55c9 bsd build support
Originating from https://github.com/NetHack/NetHack/pull/1519,
there was an issue with the pull request's back-end fork or with
the pull request itself.

The code changes were applied manually instead, with credit to the
pull request's author, instead of being directly merged in via the
pull request.

Contributed by @SirWumpus on GitHub.

Also,
- fixed a bit of conditional code in include/unixconf.h, where the
  #else clause remained out of reach for non-bsd systems, but was
  needed..
- added a disclaimer to the contributed sys/unix/hints/netbsd.500.
2026-05-13 12:49:45 -04:00
Ingo Paschke 7c8524ae37 Amiga: make amigapkg depend on $(GAMEBIN)
Without the dependency, 'make amigapkg' would copy whatever was
already in targets/amiga/ without ever rebuilding when sources
changed -- silently shipping a stale binary.
2026-05-12 15:12:07 +02:00
nhmall 9bfaa066e2 Merge branch 'cleanup' of https://github.com/ingpaschke/NetHack into NetHack-5.0 2026-05-11 15:43:56 -04:00
nhmall 3ca18c8e44 be more cautious on gcc version for warning 2026-05-11 15:40:29 -04:00
nhmall 0991b0e770 tiletext.c warning suppression 2026-05-11 15:30:53 -04:00
Ingo Paschke 688f9344cd Amiga: route port paths through fqname()
Tile loading hard-coded "NetHack:tiles/tiles{16,32}.iff" and PORT_HELP
hard-coded "nethack:amii.hlp".  Route through fqname(DATAPREFIX) so
DATADIR= overrides apply.  Refresh amii.hlp to 5.0 content, ship it via
amigapkg, and document HACKDIR / SAVEDIR / BONESDIR examples in
nethack.cnf.
2026-05-11 20:51:06 +02:00
Ingo Paschke 7b559f4d02 Amiga: delete dead files and dead-macro code
Delete amigst.c (empty) and amitty.c (TTY/BBS stub).  Drop WINVERS_AMIT,
SUPERBITMAP_MAP, EXTMENU, SHELL/dosh(), and the bbs_id reference in
src/files.c.
2026-05-11 20:30:45 +02:00