The pull request included some changes that were neither accidental nor unintentional, so only a subset of the changes from pull request #869 submitted by klorpa were manually applied. behaviour -> behavior speach -> speech knowlege -> knowledge incrments -> increments stethscope -> stethoscope staiway -> stairway arifact -> artifact extracing -> extracting The uses of "iff" were left alone. Close #869
114 lines
4.3 KiB
Plaintext
114 lines
4.3 KiB
Plaintext
Installing NetHack with a Qt or KDE interface
|
|
---------------------------------------------
|
|
$NHDT-Date: 1524689332 2018/04/25 20:48:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $
|
|
# Copyright (c) 2004 by Warwick Allison
|
|
# NetHack may be freely redistributed. See license for details.
|
|
|
|
This document describes the installation of NetHack with a Qt interface
|
|
on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but
|
|
support for that is not currently official.
|
|
|
|
You can download Qt from http://www.trolltech.com.
|
|
You need Qt 2.0 or later to use this code.
|
|
|
|
To use this code on UNIX (not Mac OS X):
|
|
|
|
1. follow the directions for the UNIX installation (in ../../sys/unix)
|
|
to create the Makefiles.
|
|
|
|
2. ../../include/config.h
|
|
|
|
define QT_GRAPHICS (search for it). You can comment out
|
|
TTY_GRAPHICS if you want to, or leave it in to support both
|
|
interfaces (in which case be sure you have the right curses
|
|
libraries etc. required for that interface).
|
|
|
|
3. ../../src/Makefile
|
|
|
|
ensure your QTDIR environment variable was set correctly when
|
|
you installed Qt - $QTDIR/include/qwidget.h should exist, for
|
|
example.
|
|
|
|
ensure CXX and LINK are set to the compiler and linker you need
|
|
for compiling and linking C++ software (e.g., set both to g++).
|
|
|
|
add $(WINQTSRC), $(WINQTOBJ), and $(WINQTLIB) to WINSRC, WINOBJ,
|
|
and WINLIB respectively, and compile. This will give you an
|
|
executable supporting both Qt and tty windowing.
|
|
|
|
4. ../../Makefile (the top-level makefile)
|
|
|
|
Just change the VARDATND setting to contain the files
|
|
"x11tiles", "rip.xpm", and "nhsplash.xpm":
|
|
|
|
VARDATND = x11tiles rip.xpm nhsplash.xpm
|
|
|
|
5. Follow all the instructions in ../../sys/unix/Install.unx for
|
|
the remainder of the installation process.
|
|
|
|
6. Consider adding the lines below to your .nethackrc, as they are
|
|
likely to give the best interface for this window port:
|
|
|
|
OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
|
|
OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
|
|
|
|
If you are using KDE, you may want to also try the KDE version. It just
|
|
uses the KDE menubar and follows other KDE conventions - there is no
|
|
extra functionality. To do so:
|
|
|
|
1. Ensure that you have KDE 2.x libraries on your system
|
|
(in 1999 KDE 1.x was the norm)
|
|
|
|
2. ../../src/Makefile
|
|
|
|
Add $(KDECXXFLAGS) to the CXXFLAGS definition, $(KDELFLAGS) to
|
|
the LFLAGS definition and $(WINKDELIB) to WINLIB.
|
|
|
|
3. Some additional files here - knh-mini.xpm, knh.xpm, and
|
|
knethack.lnk are useful if you want to install "knethack" in
|
|
the KDE games directory.
|
|
|
|
If you are using Qtopia, you can compile NetHack for that environment
|
|
with the following additional steps:
|
|
|
|
1. First be sure that you can build a simple Qtopia application,
|
|
such as the examples that ship with Qtopia. Do not attempt
|
|
something as challenging to compile as NetHack before you can
|
|
already build a Qtopia application for your target device.
|
|
|
|
2. If you are cross-compiling (eg. targeting an ARM-based handheld),
|
|
be sure to follow the steps for cross-compiling in the Makefile.src
|
|
and Makefile.utl files.
|
|
|
|
3. To CXXFLAGS in Makefile.src, add:
|
|
-DQWS -I$(QPEDIR)/include -fno-rtti -fno-exceptions
|
|
|
|
4. Rather than -lqt in WINQTLIB, have:
|
|
-L$(QPEDIR)/lib -lqpe -lqte
|
|
|
|
5. After building, use the "mkipks" program that ships with Qtopia
|
|
to package the result into an ipk file.
|
|
|
|
To use this code on Mac OS X:
|
|
|
|
1. follow the directions for the UNIX installation (in ../../sys/unix)
|
|
to create the Makefiles.
|
|
|
|
2. quite a number of changes are required to the Makefiles. They are
|
|
slowly being made 'official', but for now they are all in the patch
|
|
nethack-macosx-qt.patch:
|
|
|
|
cd ../..
|
|
patch -p0 < win/Qt/nethack-macosx-qt.patch
|
|
|
|
3. Follow all the instructions in ../../sys/unix/Install.unx for
|
|
the remainder of the installation process (basically run "make install").
|
|
|
|
4. Consider adding the lines below to a file called "NetHack Defaults",
|
|
in your "Library/Preferences" folder, as they are likely to give
|
|
the best interface for this window port:
|
|
|
|
OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
|
|
OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
|
|
|