any subset of those.
- For x11 support, you'll need to obtain and install x11 development libraries.
For example, on Ubuntu 20.04 (as of August 2020):
sudo apt-get install libx11-dev
sudo apt-get install libmotif-dev
sudo apt-get install libxaw7-dev
sudo apt install xfonts-utils
(That last one is for bdftopcf and mkfontdir utils)
- For Qt support, you'll need to obtain and install Qt.
For example, on Ubuntu 20.04 (as of August 2020):
sudo apt-get install qtbase5-dev
sudo apt-get install qtmultimedia5-dev
Another odd note about Qt on Linux is that if you find you are getting
the following error trying to run NetHack after you build it:
"error while loading shared libraries: libQt5Core.so.5:
cannot open shared object file: No such file or directory"
you may have to fix that (one-time only) by the following command:
sudo strip --remove-section=.note.ABI-tag /usr/lib/x86_64-linux-gnu/libQt5Core.so.5
- For curses support, you may need to obtain and install the
ncurses development libraries if they aren't already installed
with your distribution. They seem to be there already with Ubuntu 20.04, but
for example, if you needed to install ncurses:
sudo apt-get install libncurses-dev
- tty support shouldn't require any prerequisite additional packages.
---
Assuming you have the prerequisite packages mentioned above, you can
specify, right on the make command line, which window ports (or interfaces)
to include in your build. Doing it via the make command line means that you
don't have to edit the Makefile.
The make command line example below will build one binary that has
support for tty, curses, x11, and Qt. You can select between them via
your .nethackrc file (OPTIONS=windowtype:curses, OPTIONS=windowtype:tty,
OPTIONS=windowtype:x11, or OPTIONS=windowtype:Qt).
make WANT_WIN_QT=1 WANT_WIN_X11=1 WANT_WIN_CURSES=1 WANT_WIN_TTY=1 install