Add a note as to how I was able to build & successfully use a Debug Qt Wireshark.
[obnox/wireshark/wip.git] / doc / README.qt
1 0. Abstract
2
3 Wireshark's user interface is showing its age. While GTK+ is wonderful on
4 Linux and BSD its low-tier status on Windows and even-lower-tier status on OS
5 X makes it hard to deliver a good product to users on those platforms.
6
7 The Qt port is an attempt at an updated UI which will better serve our users
8 and let us add features more easily.
9
10
11 1. Getting up and running
12
13 The Qt interface for Wireshark has been compiled and tested on Mac OS X 10.6
14 (XCode gcc), Windows 7 x86 (Visual C++ 2010), and Ubuntu 10.04 (gcc).
15 Compilation via Qt Creator has been tested but command-line compilation using
16 QMake and make or nmake should work.
17
18 The ui/qt directory is loosely coupled with the rest of the codebase. The main
19 Wireshark sources must be built beforehand using CMake on Linux and OS X and
20 nmake on Windows. Autotools + QMake is a basket full of crazy that hasn't yet
21 been sorted and folded.  (Autotools + Boring Old Make, without using
22 QMake at all, might actually be simpler:
23
24         http://www.mail-archive.com/automake@gnu.org/msg11149.html
25
26 Work is in progress on this.)
27
28 1.1 Prerequisites
29
30 Before compiling you need the Qt SDK and Qt Creator.
31
32 1.1.1 OS X
33
34 Download the latest Qt SDK (currently 1.1.4) and install it. Build the
35 top-level directory using CMake.
36
37 1.1.2 Windows
38
39 The default Qt SDK libraries are built using MinGW, which isn't supported for
40 Wireshark. Instead of downloading the Qt SDK all-in-one package, download the
41 Qt Libraries package that matches your compiler (VS 2008 or VS 2010) and Qt
42 Creator for Windows.
43
44 Settings in config.nmake are passed to the Qt environment via
45 ui/qt/config.pri. This file should be created automatically when you
46 compile Wireshark in the top-level source directory. You can create it
47 by hand by running "nmake -f Makefile.nmake ui\qt\config.pri".
48
49 Before compiling in Qt Creator select "Projects" in the left toolbar,
50 select "Build Settings" and do the following:
51
52 - In "Edit build configuration" make sure the "Release" build is selected.
53   ("Debug" currently crashes.)
54   XXX: I was able to build and use a Debug configuration by first building
55        Wireshark with /MDd (instead of the normal /MD).
56        (/MDd is what QtCreator uses for the debug configuration).
57        [Is there a way to config QtCreator to use /MD to build a
58        debug Qt Wireshark ? As a complete Qt newbie I have as yet no idea].
59
60        Note: I did the debugging using the VC2010 debugger rather than
61        invoking the debugger (CDB ?) from QtCreator.
62
63 - Make sure "Qt version" matches your version of Visual Studio.
64 - Make sure "Tool chain" matches your Visual C++ version.
65
66 If you require plugin support select "Run Settings" and add
67 "WIRESHARK_RUN_FROM_BUILD_DIRECTORY=1" to the Run Environment.
68
69 1.1.3 Linux
70
71 Install the Qt libraries and Qt Creator via your package manager or from
72 http://qt.nokia.com/downloads/. On Debian and Ubuntu the "qt-sdk" meta-package
73 should provide everything you need. Build the top-level directory using CMake
74 (no out of tree builds yet). Inside ui/qt/ do "qtcreate QtShark.pro".
75
76
77 2. Going forward
78
79 DO NOT simply port things over. Every feature, window, and element should be
80 re-thought. For example, should the user have to navigate two dialogs to get
81 HTTP request statistics?