Pass {delayed_}create_progress_dlg a pointer the top level window
[metze/wireshark/wip.git] / ui / qt / QtShark.pro
1 #-------------------------------------------------
2 #
3 # Project created by QtCreator 2010-12-21T11:38:10
4 #
5 #-------------------------------------------------
6
7 QT += core gui
8
9 TARGET = qtshark
10 TEMPLATE = app
11
12 xxx {
13     message( )
14     message(CONFIG:)
15     message(  $$CONFIG)
16     message( )
17 }
18
19 unix {
20     CONFIG += link_pkgconfig
21     PKGCONFIG += \
22         glib-2.0
23
24     # Some versions of Ubuntu don't ship with zlib.pc
25     eval(PKGCONFIG += zlib) {
26         PKGCONFIG += zlib
27     }
28 }
29
30 win32 {
31     # Note:
32     # Windows Wireshark is compiled with /MD and thus must
33     #  be linked with the "release" versions of the Qt libraries
34     #  which are also compiled with /MD.
35     #
36     # Also: Windows Wireshark is compiled with /Zi and linked with /DEBUG
37     #  which enables source level Wireshark debugging using the
38     #  Windows Visual Studio debugger.
39     #  So: QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS are set to match
40     #  those used building Windows Wireshark. (See config.pri).
41     #  Among other things source-level debugging of the Qt version of Wireshark
42     # (including the ui/qt source) is thus enabled.
43     #
44     #  Note that in this case source level debugging of the Qt
45     #  *libraries* will not be possible since the Qt release libs are
46     #  not compiled with /Zi (and not linked with /DEBUG).
47     #  The Qt "debug" libraries are compiled with /MDd. To build a
48     #  Wireshark-Qt debug version with the ability to do source level debugging
49     #  of the Qt libraries themselves requires that Wireshark first be built with /MDd.
50     #  Presumably doing source-level Qt library debugging shoyuld rarely be needed.
51
52     # We want to build only the QtShark linked with the QT "release" libraries
53     #  so disable debug & etc.
54 ##    CONFIG -= release
55     CONFIG -= debug
56     CONFIG -= debug_and_release
57
58     # Use only Wireshark CFLAGS, CXXFLAGS and LDFLAGS from config.nmake (as provided via config.pri)
59     #  for building the "release" version of Wireshark-Qt
60     # (e.g., so we don't get the Qt release CFLAGS [specifically /O2]
61     QMAKE_CFLAGS_RELEASE   = ""
62     QMAKE_CXXFLAGS_RELEASE = ""
63     QMAKE_LFLAGS_RELEASE   = ""
64
65     # XXX We need to figure out how to pull this in from config.nmake.
66     !include( config.pri ) {
67         error("Can't find config.pri. Have you run 'nmake -f Makefile.nmake' two directories up?")
68     }
69
70     DESTDIR = wireshark-qt
71
72     !wireshark_manifest_info_required {
73         CONFIG -= embed_manifest_dll
74         CONFIG -= embed_manifest_exe
75     }
76 }
77
78 INCLUDEPATH += ../.. ../../wiretap
79 win32:INCLUDEPATH += \
80     $${WIRESHARK_LIB_DIR}/gtk2/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk2/lib/glib-2.0/include \
81     $${WIRESHARK_LIB_DIR}/WpdPack/Include \
82     $${WIRESHARK_LIB_DIR}/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include \
83     $${WIRESHARK_LIB_DIR}/zlib125/include
84
85 # We have to manually trigger relinking each time one of these is modified.
86 # Is there any way to do this automatically?
87 SOURCES_WS_C = \
88     ../../airpcap_loader.c \
89     ../../capture-pcap-util.c     \
90     ../../capture.c       \
91     ../../capture_ifinfo.c \
92     ../../capture_info.c  \
93     ../../capture_opts.c \
94     ../../capture_sync.c  \
95     ../../capture_ui_utils.c \
96     ../../cfile.c \
97     ../../clopts_common.c \
98     ../../color_filters.c \
99     ../../disabled_protos.c       \
100     ../../file.c  \
101     ../../fileset.c       \
102     ../../filters.c       \
103     ../../frame_data_sequence.c   \
104     ../../g711.c \
105     ../../merge.c \
106     ../../packet-range.c  \
107     ../../print.c \
108     ../../proto_hier_stats.c      \
109     ../../ps.c    \
110     ../../recent.c \
111     ../../summary.c       \
112     ../../sync_pipe_write.c       \
113     ../../tap-megaco-common.c     \
114     ../../tap-rtp-common.c    \
115     ../../tempfile.c      \
116     ../../timestats.c     \
117     ../../u3.c \
118     ../../ui/alert_box.c  \
119     ../../ui/util.c  \
120     ../../version_info.c
121
122 unix:SOURCES_WS_C += ../../capture-pcap-util-unix.c
123 win32:SOURCES_WS_C += \
124     ../../capture-wpcap.c \
125     ../../capture_wpcap_packet.c \
126     ../../ui/win32/file_dlg_win32.c
127
128
129 SOURCES_QT_CPP = \
130     byte_view_tab.cpp \
131     byte_view_text.cpp \
132     capture_file_dialog.cpp \
133     capture_info_dialog.cpp \
134     capture_interface_dialog.cpp \
135     color_dialog.cpp \
136     color_utils.cpp \
137     display_filter_combo.cpp \
138     display_filter_edit.cpp \
139     fileset_dialog.cpp \
140     interface_tree.cpp \
141     main.cpp \
142     main_status_bar.cpp \
143     main_welcome.cpp \
144     main_window.cpp \
145     monospace_font.cpp \
146     packet_list.cpp \
147     packet_list_model.cpp \
148     packet_list_record.cpp \
149     progress_bar.cpp \
150     proto_tree.cpp \
151     qt_ui_utils.cpp \
152     recent_file_status.cpp \
153     simple_dialog_qt.cpp \
154     wireshark_application.cpp \
155     label_stack.cpp
156
157
158 HEADERS_WS_C  = \
159     ../../wsutil/privileges.h
160
161 HEADERS_QT_CPP = \
162     byte_view_tab.h \
163     byte_view_text.h \
164     capture_file_dialog.h \
165     capture_info_dialog.h \
166     capture_interface_dialog.h \
167     color_dialog.h \
168     color_utils.h \
169     display_filter_combo.h \
170     display_filter_edit.h \
171     fileset_dialog.h \
172     interface_tree.h \
173     main_status_bar.h \
174     main_welcome.h \
175     main_window.h \
176     monospace_font.h \
177     packet_list.h \
178     packet_list_model.h \
179     packet_list_record.h \
180     progress_bar.h \
181     proto_tree.h \
182     qt_ui_utils.h \
183     qt_ui_utils.h \
184     recent_file_status.h \
185     simple_dialog_qt.h \
186     wireshark_application.h \
187     label_stack.h
188
189 FORMS += main_window.ui
190
191 win32 { ## These should be in config.pri ??
192     !isEmpty(PORTAUDIO_DIR) {
193         PA_OBJECTS = \
194             ../gtk/pa_allocation.obj \
195             ../gtk/pa_converters.obj \
196             ../gtk/pa_cpuload.obj \
197             ../gtk/pa_dither.obj \
198             ../gtk/pa_front.obj \
199             ../gtk/pa_process.obj \
200             ../gtk/pa_skeleton.obj \
201             ../gtk/pa_stream.obj \
202             ../gtk/pa_trace.obj \
203             ../gtk/pa_win_wmme.obj \
204             ../gtk/pa_win_hostapis.obj \
205             ../gtk/pa_win_util.obj \
206             ../gtk/pa_win_waveformat.obj \
207             ../gtk/pa_x86_plain_converters.obj
208         PA_OBJECTS ~= s,/,\\,g
209     }
210 }
211
212 win32 {
213     SOURCES += $$SOURCES_QT_CPP
214     HEADERS += $$HEADERS_WS_C
215     HEADERS += $$HEADERS_QT_CPP
216     OBJECTS_WS_C = $$SOURCES_WS_C
217     OBJECTS_WS_C ~= s/[.]c/.obj/g
218     OBJECTS_WS_C ~= s,/,\\,g
219     OBJECTS_WS_C += ../../image/file_dlg_win32.res
220 } else {
221 ## XXX: Shouldn't need to (re)compile WS_C sources ??
222     SOURCES += $$SOURCES_WS_C
223     SOURCES += $$SOURCES_QT_CPP
224     HEADERS += $$HEADERS_WS_C
225     HEADERS += $$HEADERS_QT_CPP
226 }
227
228 DEFINES += HAVE_CONFIG_H INET6 REENTRANT
229 unix:DEFINES += _U_=\"__attribute__((unused))\"
230
231 macx:QMAKE_LFLAGS += \
232     -framework CoreServices \
233     -framework ApplicationServices -framework CoreFoundation -framework CoreServices
234
235 unix:LIBS += -L../../lib -Wl,-rpath ../../lib -lwireshark -lwiretap -lwsutil \
236     -lpcap -lportaudio
237 macx:LIBS += -Wl,-macosx_version_min,10.5 -liconv
238
239 # http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
240 unix: {
241     EXTRA_BINFILES = \
242         ../../dumpcap \
243         ../../lib/*.so  \
244 }
245 unix:!macx {
246     for(FILE,EXTRA_BINFILES){
247         QMAKE_POST_LINK += $$quote(cp $${FILE} .$$escape_expand(\\n\\t))
248     }
249 }
250 # qmake 2.01a / Qt 4.7.0 doesn't set DESTDIR on OS X.
251 macx {
252     for(FILE,EXTRA_BINFILES){
253         QMAKE_POST_LINK += $$quote(cp $${FILE} $${TARGET}.app/Contents/MacOS$$escape_expand(\\n\\t))
254     }
255 }
256
257 win32 {
258     # Add the wireshark objects to LIBS
259     LIBS += $$OBJECTS_WS_C
260     LIBS += $$PA_OBJECTS
261     LIBS += \
262         wsock32.lib user32.lib shell32.lib comctl32.lib comdlg32.lib \
263         -L../../epan -llibwireshark -L../../wsutil -llibwsutil -L../../wiretap -lwiretap-$${WTAP_VERSION} \
264         -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0
265
266     EXTRA_BINFILES = \
267         ../../dumpcap.exe \
268         ../../epan/libwireshark.dll ../../wiretap/wiretap-$${WTAP_VERSION}.dll ../../wsutil/libwsutil.dll \
269         $${GLIB_DIR}/bin/libglib-2.0-0.dll $${GLIB_DIR}/bin/libgmodule-2.0-0.dll \
270         $${GLIB_DIR}/bin/libgthread-2.0-0.dll $${GLIB_DIR}/bin/$${INTL_DLL} \
271         $${C_ARES_DIR}/bin/libcares-2.dll $${ZLIB_DIR}/zlib1.dll \
272         $${GNUTLS_DIR}/bin/libgcrypt-11.dll $${GNUTLS_DIR}/bin/libgnutls-26.dll \
273         $${GNUTLS_DIR}/bin/libgpg-error-0.dll $${GNUTLS_DIR}/bin/ $${GNUTLS_DIR}/bin/libtasn1-3.dll \
274         $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
275         $${LUA_DIR}/lua5.1.dll \
276         $${GEOIP_DIR}/bin/libGeoIP-1.dll \
277         ../../colorfilters ../../dfilters ../../cfilters
278
279     wireshark_use_kfw {
280         EXTRA_BINFILES += \
281             $${KFW_DIR}/bin/comerr32.dll $${KFW_DIR}/bin/krb5_32.dll $${KFW_DIR}/bin/k5sprt32.dll
282     }
283
284     EXTRA_BINFILES ~= s,/,\\,g
285     for(FILE,EXTRA_BINFILES){
286         QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${FILE} $(DESTDIR)$$escape_expand(\\n\\t))
287     }
288     PLUGINS_DIR = $(DESTDIR)\\plugins\\$${VERSION_FULL}
289     QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLUGINS_DIR} $(MKDIR) $${PLUGINS_DIR}$$escape_expand(\\n\\t))
290     QMAKE_POST_LINK +=$$quote($(COPY_FILE) ..\\..\\wireshark-gtk2\\plugins\\$${VERSION_FULL}\\*.dll $(DESTDIR)\\plugins\\$${VERSION_FULL}$$escape_expand(\\n\\t))
291
292     # This doesn't depend on wireshark-gtk2. It also doesn't work.
293     #PLUGINS_IN_PWD=$${IN_PWD}
294     #PLUGINS_OUT_PWD=$${OUT_PWD}
295     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)\\..\\..\\plugins$$escape_expand(\\n\\t))
296     #QMAKE_POST_LINK +=$$quote(nmake -f Makefile.nmake INSTALL_DIR=$$replace(PLUGINS_OUT_PWD, /, \\)\\$(DESTDIR)$$escape_expand(\\n\\t))
297     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)$$escape_expand(\\n\\t))
298
299 }
300
301 RESOURCES += \
302     toolbar.qrc \
303     welcome.qrc \
304     display_filter.qrc \
305     i18n.qrc
306
307 TRANSLATIONS = \
308         qtshark_fr.ts
309
310 ICON = ../../packaging/macosx/Resources/Wireshark.icns
311
312 win32: QMAKE_CLEAN += *.pdb
313
314
315