1 Installing aNetHack with a Qt or KDE interface
2 ---------------------------------------------
3 $ANH-Date$ $ANH-Branch$:$ANH-Revision$
5 This document describes the installation of aNetHack with a Qt interface
6 on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but
7 support for that is not currently official.
9 You can download Qt from http://www.trolltech.com.
10 You need Qt 2.0 or later to use this code.
12 To use this code on UNIX (not Mac OS X):
14 1. follow the directions for the UNIX installation (in ../../sys/unix)
15 to create the Makefiles.
17 2. ../../include/config.h
19 define QT_GRAPHICS (search for it). You can comment out
20 TTY_GRAPHICS if you want to, or leave it in to support both
21 interfaces (in which case be sure you have the right curses
22 libraries etc. required for that interface).
26 ensure your QTDIR environment variable was set correctly when
27 you installed Qt - $QTDIR/include/qwidget.h should exist, for
30 ensure CXX and LINK are set to the compiler and linker you need
31 for compiling and linking C++ software (e.g., set both to g++).
33 add $(WINQTSRC), $(WINQTOBJ), and $(WINQTLIB) to WINSRC, WINOBJ,
34 and WINLIB respectively, and compile. This will give you an
35 executable supporting both Qt and tty windowing.
37 4. ../../Makefile (the top-level makefile)
39 Just change the VARDATND setting to contain the files
40 "x11tiles", "rip.xpm", and "nhsplash.xpm":
42 VARDATND = x11tiles rip.xpm nhsplash.xpm
44 5. Follow all the instructions in ../../sys/unix/Install.unx for
45 the remainder of the installation process.
47 6. Consider adding the lines below to your .anethackrc, as they are
48 likely to give the best interface for this window port:
50 OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
51 OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
53 If you are using KDE, you may want to also try the KDE version. It just
54 uses the KDE menubar and follows other KDE conventions - there is no
55 extra functionality. To do so:
57 1. Ensure that you have KDE 2.x libraries on your system
58 (in 1999 KDE 1.x was the norm)
62 Add $(KDECXXFLAGS) to the CXXFLAGS definition, $(KDELFLAGS) to
63 the LFLAGS definition and $(WINKDELIB) to WINLIB.
65 3. Some additional files here - knh-mini.xpm, knh.xpm, and
66 kanethack.lnk are useful if you want to install "kanethack" in
67 the KDE games directory.
69 If you are using Qtopia, you can compile aNetHack for that environment
70 with the following additional steps:
72 1. First be sure that you can build a simple Qtopia application,
73 such as the examples that ship with Qtopia. Do not attempt
74 something as challenging to compile as aNetHack before you can
75 already build a Qtopia application for your target device.
77 2. If you are cross-compiling (eg. targetting an ARM-based handheld),
78 be sure to follow the steps for cross-compiling in the Makefile.src
79 and Makefile.utl files.
81 3. To CXXFLAGS in Makefile.src, add:
82 -DQWS -I$(QPEDIR)/include -fno-rtti -fno-exceptions
84 4. Rather than -lqt in WINQTLIB, have:
85 -L$(QPEDIR)/lib -lqpe -lqte
87 5. After building, use the "mkipks" program that ships with Qtopia
88 to package the result into an ipk file.
90 To use this code on Mac OS X:
92 1. follow the directions for the UNIX installation (in ../../sys/unix)
93 to create the Makefiles.
95 2. quite a number of changes are required to the Makefiles. They are
96 slowly being made 'official', but for now they are all in the patch
97 anethack-macosx-qt.patch:
100 patch -p0 < win/Qt/anethack-macosx-qt.patch
102 3. Follow all the instructions in ../../sys/unix/Install.unx for
103 the remainder of the installation process (basically run "make install").
105 4. Consider adding the lines below to a file called "aNetHack Defaults",
106 in your "Library/Preferences" folder, as they are likely to give
107 the best interface for this window port:
109 OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
110 OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt