1 Installing NetHack with a Qt or KDE interface
2 ---------------------------------------------
3 $NHDT-Date: 1524689332 2018/04/25 20:48:52 $ $NHDT-Branch: NetHack-3.6.0 $:$NHDT-Revision: 1.11 $
4 # Copyright (c) 2004 by Warwick Allison
5 # NetHack may be freely redistributed. See license for details.
7 This document describes the installation of NetHack with a Qt interface
8 on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but
9 support for that is not currently official.
11 You can download Qt from http://www.trolltech.com.
12 You need Qt 2.0 or later to use this code.
14 To use this code on UNIX (not Mac OS X):
16 1. follow the directions for the UNIX installation (in ../../sys/unix)
17 to create the Makefiles.
19 2. ../../include/config.h
21 define QT_GRAPHICS (search for it). You can comment out
22 TTY_GRAPHICS if you want to, or leave it in to support both
23 interfaces (in which case be sure you have the right curses
24 libraries etc. required for that interface).
28 ensure your QTDIR environment variable was set correctly when
29 you installed Qt - $QTDIR/include/qwidget.h should exist, for
32 ensure CXX and LINK are set to the compiler and linker you need
33 for compiling and linking C++ software (e.g., set both to g++).
35 add $(WINQTSRC), $(WINQTOBJ), and $(WINQTLIB) to WINSRC, WINOBJ,
36 and WINLIB respectively, and compile. This will give you an
37 executable supporting both Qt and tty windowing.
39 4. ../../Makefile (the top-level makefile)
41 Just change the VARDATND setting to contain the files
42 "x11tiles", "rip.xpm", and "nhsplash.xpm":
44 VARDATND = x11tiles rip.xpm nhsplash.xpm
46 5. Follow all the instructions in ../../sys/unix/Install.unx for
47 the remainder of the installation process.
49 6. Consider adding the lines below to your .nethackrc, as they are
50 likely to give the best interface for this window port:
52 OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
53 OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
55 If you are using KDE, you may want to also try the KDE version. It just
56 uses the KDE menubar and follows other KDE conventions - there is no
57 extra functionality. To do so:
59 1. Ensure that you have KDE 2.x libraries on your system
60 (in 1999 KDE 1.x was the norm)
64 Add $(KDECXXFLAGS) to the CXXFLAGS definition, $(KDELFLAGS) to
65 the LFLAGS definition and $(WINKDELIB) to WINLIB.
67 3. Some additional files here - knh-mini.xpm, knh.xpm, and
68 knethack.lnk are useful if you want to install "knethack" in
69 the KDE games directory.
71 If you are using Qtopia, you can compile NetHack for that environment
72 with the following additional steps:
74 1. First be sure that you can build a simple Qtopia application,
75 such as the examples that ship with Qtopia. Do not attempt
76 something as challenging to compile as NetHack before you can
77 already build a Qtopia application for your target device.
79 2. If you are cross-compiling (eg. targetting an ARM-based handheld),
80 be sure to follow the steps for cross-compiling in the Makefile.src
81 and Makefile.utl files.
83 3. To CXXFLAGS in Makefile.src, add:
84 -DQWS -I$(QPEDIR)/include -fno-rtti -fno-exceptions
86 4. Rather than -lqt in WINQTLIB, have:
87 -L$(QPEDIR)/lib -lqpe -lqte
89 5. After building, use the "mkipks" program that ships with Qtopia
90 to package the result into an ipk file.
92 To use this code on Mac OS X:
94 1. follow the directions for the UNIX installation (in ../../sys/unix)
95 to create the Makefiles.
97 2. quite a number of changes are required to the Makefiles. They are
98 slowly being made 'official', but for now they are all in the patch
99 nethack-macosx-qt.patch:
102 patch -p0 < win/Qt/nethack-macosx-qt.patch
104 3. Follow all the instructions in ../../sys/unix/Install.unx for
105 the remainder of the installation process (basically run "make install").
107 4. Consider adding the lines below to a file called "NetHack Defaults",
108 in your "Library/Preferences" folder, as they are likely to give
109 the best interface for this window port:
111 OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
112 OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt