OSDN Git Service

Initial Import
[nethackexpress/trunk.git] / win / Qt / Install.Qt
1 Installing NetHack with a Qt or KDE interface
2 ---------------------------------------------
3
4 This document describes the installation of NetHack with a Qt interface
5 on UNIX/X11 or Mac OS X. This code should also work with Qt/Windows, but
6 support for that is not currently official.
7
8 You can download Qt for UNIX and Qt for Windows from http://www.trolltech.com.
9 Qt for Mac OS X is currently only available commercially.  You need Qt 2.0 or
10 later to use this code.
11
12 To use this code:
13
14    1. follow the directions for the UNIX installation (in ../../sys/unix)
15       to create the Makefiles.
16
17    2. ../../include/config.h
18
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).
23
24    3. ../../src/Makefile
25
26         ensure your QTDIR environment variable was set correctly when
27         you installed Qt - $QTDIR/include/qwidget.h should exist, for
28         example.
29
30         ensure CXX and LD are set to the compiler and linker you need
31         for compiling and linking C++ software (e.g., set both to g++).
32
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.
36
37    4. ../../Makefile (the top-level makefile)
38
39         change the VARDATND setting to contain the files "x11tiles",
40         "rip.xpm", and "nhsplash.xpm":
41
42             VARDATND = x11tiles rip.xpm nhsplash.xpm
43
44    5. Follow all the instructions in ../../sys/unix/Install.unx for
45       the remainder of the installation process.
46
47    6. Consider adding the lines below to your .nethackrc, as they are
48       likely to give the best interface for this window port:
49
50         OPTIONS=name:player,number_pad,menustyle:partial,!time,showexp
51         OPTIONS=hilite_pet,toptenwin,msghistory:200,windowtype:Qt
52
53
54 If you are using KDE, you may want to also try the KDE version. It just
55 uses the KDE menubar and follows other KDE conventions - there is no
56 extra functionality. To do so:
57
58    1. Ensure that you have KDE 2.x libraries on your system
59         (in 1999 KDE 1.x was the norm)
60
61    2. ../../src/Makefile
62
63       Add $(KDECXXFLAGS) to the CXXFLAGS definition, $(KDELFLAGS) to
64       the LFLAGS definition and $(WINKDELIB) to WINLIB.
65
66    3. Some additional files here - knh-mini.xpm, knh.xpm, and
67       knethack.lnk are useful if you want to install "knethack" in
68       the KDE games directory.  
69
70
71 If you are using Qtopia, you can compile NetHack for that environment
72 with the following additional steps:
73
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.
78
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.
82
83    3. To CXXFLAGS in Makefile.src, add:
84       -DQWS -I$(QPEDIR)/include -fno-rtti -fno-exceptions
85
86    4. Rather than -lqt in WINQTLIB, have:
87       -L$(QPEDIR)/lib -lqpe -lqte
88
89    5. After building, use the "mkipks" program that ships with Qtopia
90       to package the result into an ipk file.
91
92