Add ServiceResponseTimeDialog.
[metze/wireshark/wip.git] / ui / qt / Wireshark.pro
1 #-------------------------------------------------
2 #
3 # Project created by QtCreator 2010-12-21T11:38:10
4 #
5 #-------------------------------------------------
6 #
7 # Wireshark - Network traffic analyzer
8 # By Gerald Combs <gerald@wireshark.org>
9 # Copyright 1998 Gerald Combs
10 #
11 # This program is free software; you can redistribute it and/or
12 # modify it under the terms of the GNU General Public License
13 # as published by the Free Software Foundation; either version 2
14 # of the License, or (at your option) any later version.
15 #
16 # This program is distributed in the hope that it will be useful,
17 # but WITHOUT ANY WARRANTY; without even the implied warranty of
18 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19 # GNU General Public License for more details.
20 #
21 # You should have received a copy of the GNU General Public License
22 # along with this program; if not, write to the Free Software
23 # Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
24 #
25
26 isEqual(QT_MAJOR_VERSION, 4) {
27     QT += core gui
28 } else {
29     QT += core widgets printsupport multimediawidgets
30 }
31
32 isEqual(QT_MAJOR_VERSION, 5): greaterThan(QT_MINOR_VERSION, 1): win32 {
33     QT += winextras
34 }
35
36 win32|macx {
37     TARGET = Wireshark
38 } else {
39     TARGET = wireshark
40 }
41
42 TEMPLATE = app
43
44 TOP_SRCDIR = "$$PWD/../.."
45
46 CONFIG(debug, debug|release) {
47     DESTDIR = "$${TOP_SRCDIR}/wireshark-qt-debug"
48 }
49 CONFIG(release, debug|release) {
50     DESTDIR = "$${TOP_SRCDIR}/wireshark-qt-release"
51 }
52
53 QMAKE_INFO_PLIST = "$$PWD/../../packaging/macosx/Info.plist"
54
55 xxx {
56     message( )
57     message(CONFIG:)
58     message(  $$CONFIG)
59     message( )
60 }
61
62 isEmpty (QMAKE_EXTENSION_SHLIB) {
63     macx {
64         QMAKE_EXTENSION_SHLIB=".dylib"
65     } else: win32 {
66         QMAKE_EXTENSION_SHLIB=".dll"
67     } else { # Everyone else runs Linux or Solaris, right?
68         QMAKE_EXTENSION_SHLIB=".so"
69     }
70 }
71
72 unix {
73
74     #Check if Qt < 4.8.x (packagesExist is present in Qt >= 4.8)
75     contains(QT_VERSION, ^4\\.[0-7]\\..*) {
76         #Copy from mkspecs/features/qt_functions.prf (Qt 4.8)
77         defineTest(packagesExist) {
78             # this can't be done in global scope here because qt_functions is loaded
79             # before the .pro is parsed, so if the .pro set PKG_CONFIG, we wouldn't know it
80             # yet. oops.
81             isEmpty(PKG_CONFIG):PKG_CONFIG = pkg-config # keep consistent with link_pkgconfig.prf! too
82
83             for(package, ARGS) {
84             !system($$PKG_CONFIG --exists $$package):return(false)
85             }
86
87         return(true)
88         }
89     }
90
91     isEqual(QT_MAJOR_VERSION, 5) {
92         # Hack around what appears to be a bug in the 5.0.2 SDK
93         QT_CONFIG -= no-pkg-config
94     }
95     CONFIG += link_pkgconfig
96     PKGCONFIG += \
97         glib-2.0
98
99     # Some versions of Ubuntu don't ship with zlib.pc
100     !macx {
101         eval(PKGCONFIG += zlib) {
102             PKGCONFIG += zlib
103         }
104     }
105
106     macx {
107         packagesExist(Qt5MacExtras) {
108             message( "Found Qt5MacExtras" )
109             QT += macextras
110         }
111     }
112 }
113
114 win32 {
115     # Note:
116     # Windows Wireshark is compiled with /MD and thus must
117     #  be linked with the "release" versions of the Qt libraries
118     #  which are also compiled with /MD.
119     #
120     # Also: Windows Wireshark is compiled with /Zi and linked with /DEBUG
121     #  which enables source level Wireshark debugging using the
122     #  Windows Visual Studio debugger.
123     #  So: QMAKE_CFLAGS, QMAKE_CXXFLAGS and QMAKE_LFLAGS are set to match
124     #  those used building Windows Wireshark. (See config.pri).
125     #  Among other things source-level debugging of the Qt version of Wireshark
126     # (including the ui/qt source) is thus enabled.
127     #
128     #  Note that in this case source level debugging of the Qt
129     #  *libraries* will not be possible since the Qt release libs are
130     #  not compiled with /Zi (and not linked with /DEBUG).
131     #  The Qt "debug" libraries are compiled with /MDd. To build a
132     #  Wireshark-Qt debug version with the ability to do source level debugging
133     #  of the Qt libraries themselves requires that Wireshark first be built with /MDd.
134     #  Presumably doing source-level Qt library debugging shoyuld rarely be needed.
135
136     # We want to build only the Wireshark linked with the Qt "release" libraries
137     #  so disable debug & etc.
138 ##    CONFIG -= release
139     CONFIG -= debug
140     CONFIG -= debug_and_release
141
142     # Use only Wireshark CFLAGS, CXXFLAGS and LDFLAGS from config.nmake (as provided via config.pri)
143     #  for building the "release" version of Wireshark-Qt
144     # (e.g., so we don't get the Qt release CFLAGS [specifically /O2]
145     QMAKE_CFLAGS_RELEASE   = ""
146     QMAKE_CXXFLAGS_RELEASE = ""
147     QMAKE_LFLAGS_RELEASE   = ""
148
149     # XXX We need to figure out how to pull this in from config.nmake.
150     !include( config.pri ) {
151         error("Can't find config.pri. Have you run 'nmake -f Makefile.nmake' two directories up?")
152     }
153
154     !wireshark_manifest_info_required {
155         CONFIG -= embed_manifest_dll
156         CONFIG -= embed_manifest_exe
157     }
158 }
159
160 SOURCES_TAP = \
161     "stats_tree_dialog.cpp"
162
163 tap_register.name = Generate wireshark-tap-register.c
164 tap_register.input = SOURCES_TAP
165 tap_register.output = wireshark-tap-register.c
166 tap_register.variable_out = SOURCES
167 win32 {
168     tap_register.commands = $${PYTHON} "../../tools/make-tap-reg.py" "\"""$$PWD""\"" taps $$SOURCES_TAP
169 } else {
170     tap_register.commands = python ../../tools/make-tap-reg.py "\"""$$PWD""\"" taps $$SOURCES_TAP
171 }
172 #tap_register.CONFIG += no_link
173 QMAKE_EXTRA_COMPILERS += tap_register
174
175 INCLUDEPATH += ../.. ../../wiretap
176 win32:INCLUDEPATH += \
177     $${WIRESHARK_LIB_DIR}/gtk2/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk2/lib/glib-2.0/include \
178     $${WIRESHARK_LIB_DIR}/gtk3/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk3/lib/glib-2.0/include \
179     $${WIRESHARK_LIB_DIR}/WpdPack/Include \
180     $${WIRESHARK_LIB_DIR}/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include \
181     $${GNUTLS_DIR}/include \
182     $${GEOIP_DIR}/include \
183     $${ZLIB_DIR}
184
185 # We have to manually trigger relinking each time one of these is modified.
186 # Is there any way to do this automatically?
187 SOURCES_WS_C = \
188     ../../capture_info.c  \
189     ../../capture_opts.c \
190     ../../cfile.c \
191     ../../color_filters.c \
192     ../../extcap.c \
193     ../../extcap_parser.c \
194     ../../file.c  \
195     ../../fileset.c \
196     ../../frame_tvbuff.c \
197     ../../summary.c \
198     ../../sync_pipe_write.c
199
200 win32:SOURCES_WS_C += \
201     ../../ui/win32/console_win32.c \
202     ../../ui/win32/file_dlg_win32.c
203
204 HEADERS_WS_C  = \
205     ../../wsutil/privileges.h
206
207 FORMS += \
208     about_dialog.ui \
209     bluetooth_att_server_attributes_dialog.ui \
210     bluetooth_devices_dialog.ui \
211     capture_file_progress_frame.ui \
212     capture_file_properties_dialog.ui \
213     capture_interfaces_dialog.ui \
214     capture_preferences_frame.ui \
215     coloring_rules_dialog.ui \
216     column_preferences_frame.ui \
217     column_editor_frame.ui \
218     compiled_filter_output.ui \
219     decode_as_dialog.ui \
220     display_filter_expression_dialog.ui \
221     expert_info_dialog.ui \
222     export_object_dialog.ui \
223     export_pdu_dialog.ui \
224     extcap_options_dialog.ui \
225     file_set_dialog.ui \
226     filter_dialog.ui \
227     filter_expressions_preferences_frame.ui \
228     follow_stream_dialog.ui \
229     font_color_preferences_frame.ui \
230     import_text_dialog.ui \
231     io_graph_dialog.ui \
232     layout_preferences_frame.ui \
233     lbm_lbtrm_transport_dialog.ui \
234     lbm_lbtru_transport_dialog.ui \
235     lbm_stream_dialog.ui \
236     lbm_uimflow_dialog.ui \
237     main_welcome.ui \
238     main_window.ui \
239     main_window_preferences_frame.ui \
240     manage_interfaces_dialog.ui \
241     module_preferences_scroll_area.ui \
242     packet_comment_dialog.ui \
243     packet_dialog.ui \
244     packet_format_group_box.ui \
245     packet_range_group_box.ui \
246     preference_editor_frame.ui \
247     preferences_dialog.ui \
248     print_dialog.ui \
249     profile_dialog.ui \
250     protocol_hierarchy_dialog.ui \
251     remote_capture_dialog.ui  \
252     remote_settings_dialog.ui  \
253     rtp_stream_dialog.ui   \
254     sctp_all_assocs_dialog.ui   \
255     sctp_assoc_analyse_dialog.ui \
256     sctp_chunk_statistics_dialog.ui  \
257     sctp_graph_dialog.ui  \
258     sctp_graph_arwnd_dialog.ui  \
259     sctp_graph_byte_dialog.ui  \
260     search_frame.ui \
261     sequence_dialog.ui \
262     splash_overlay.ui \
263     tap_parameter_dialog.ui \
264     tcp_stream_dialog.ui \
265     time_shift_dialog.ui \
266     traffic_table_dialog.ui \
267     uat_dialog.ui \
268     voip_calls_dialog.ui \
269     wireless_frame.ui
270
271
272 HEADERS += $$HEADERS_WS_C \
273     about_dialog.h \
274     accordion_frame.h \
275     bluetooth_att_server_attributes_dialog.h \
276     bluetooth_devices_dialog.h \
277     capture_file_progress_frame.h \
278     capture_file_properties_dialog.h \
279     capture_interfaces_dialog.h \
280     capture_preferences_frame.h \
281     coloring_rules_dialog.h \
282     column_preferences_frame.h \
283     column_editor_frame.h \
284     compiled_filter_output.h \
285     conversation_dialog.h \
286     decode_as_dialog.h \
287     display_filter_expression_dialog.h \
288     elided_label.h \
289     endpoint_dialog.h \
290     expert_info_dialog.h \
291     export_dissection_dialog.h \
292     export_object_dialog.h \
293     export_pdu_dialog.h \
294     extcap_argument.h \
295     extcap_argument_file.h \
296     extcap_options_dialog.h \
297     filter_action.h \
298     filter_expressions_preferences_frame.h \
299     follow_stream_dialog.h \
300     follow_stream_text.h \
301     font_color_preferences_frame.h \
302     layout_preferences_frame.h \
303     lbm_lbtrm_transport_dialog.h \
304     lbm_lbtru_transport_dialog.h \
305     lbm_stream_dialog.h \
306     lbm_uimflow_dialog.h \
307     main_window_preferences_frame.h \
308     manage_interfaces_dialog.h \
309     module_preferences_scroll_area.h \
310     packet_comment_dialog.h \
311     packet_dialog.h \
312     packet_format_group_box.h \
313     preference_editor_frame.h \
314     preferences_dialog.h \
315     print_dialog.h \
316     profile_dialog.h \
317     protocol_hierarchy_dialog.h \
318     protocol_preferences_menu.h \
319     remote_capture_dialog.h  \
320     remote_settings_dialog.h    \
321     rtp_stream_dialog.h  \
322     sctp_all_assocs_dialog.h  \
323     sctp_assoc_analyse_dialog.h \
324     sctp_chunk_statistics_dialog.h  \
325     sctp_graph_dialog.h  \
326     sctp_graph_arwnd_dialog.h  \
327     sctp_graph_byte_dialog.h  \
328     search_frame.h \
329     service_response_time_dialog.h \
330     splash_overlay.h \
331     stats_tree_dialog.h \
332     tango_colors.h \
333     tap_parameter_dialog.h \
334     tcp_stream_dialog.h \
335     traffic_table_dialog.h \
336     uat_dialog.h \
337     voip_calls_dialog.h \
338     wireless_frame.h
339
340 win32 {
341     OBJECTS_WS_C = $$SOURCES_WS_C
342     OBJECTS_WS_C ~= s/[.]c/.obj/g
343     OBJECTS_WS_C ~= s,/,\\,g
344     OBJECTS_WS_C += ../../image/file_dlg_win32.res
345 } else {
346 ## XXX: Shouldn't need to (re)compile WS_C sources ??
347     SOURCES += $$SOURCES_WS_C
348 }
349
350 DEFINES += INET6 REENTRANT
351 unix:DEFINES += _U_=\"__attribute__((unused))\"
352
353 macx:QMAKE_LFLAGS += \
354     -framework CoreServices \
355     -framework ApplicationServices \
356     -framework CoreFoundation \
357     -framework SystemConfiguration
358
359 unix {
360     exists(../../epan/.libs/libw*) {
361         message( "Assuming Autotools library paths" )
362         LIBS += \
363             -L.. \
364             -L../../epan/.libs -Wl,-rpath ../../epan/.libs \
365             -L../../wiretap/.libs -Wl,-rpath ../../wiretap/.libs \
366             -L../../wsutil/.libs -Wl,-rpath ../../wsutil/.libs
367     } else:exists(../../run/libw*) {
368         message( "Assuming CMake library path" )
369         LIBS += -L../../run -Wl,-rpath ../../run
370     }
371
372     LIBS += -lwireshark -lwiretap -lcapchild -lcaputils -lui -lcodecs -lwsutil \
373     -lpcap
374
375     exists(../libui_dirty.a) {
376         LIBS += -lui_dirty
377     }
378 }
379
380 macx:LIBS += -Wl,-macosx_version_min,10.6 -liconv -lz
381
382 # XXX Copy this only if we're linking with Lua.
383 EXTRA_BINFILES = \
384     ../../epan/wslua/console.lua
385
386 # http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
387 unix: {
388
389     exists(../../.libs/dumpcap) {
390         EXTRA_BINFILES += \
391             ../../.libs/dumpcap
392         EXTRA_LIBFILES += \
393             ../../epan/.libs/libwireshark*$$QMAKE_EXTENSION_SHLIB* \
394             ../../wiretap/.libs/libwiretap*$$QMAKE_EXTENSION_SHLIB* \
395             ../../wsutil/.libs/libwsutil*$$QMAKE_EXTENSION_SHLIB*
396     } else:exists(../../run/libw*) {
397         EXTRA_BINFILES += \
398             ../../run/dumpcap
399         EXTRA_LIBFILES += ../../run/libwireshark*$$QMAKE_EXTENSION_SHLIB* \
400                         ../../run/libwiretap*$$QMAKE_EXTENSION_SHLIB* \
401                         ../../run/libwsutil*$$QMAKE_EXTENSION_SHLIB*
402     }
403
404 }
405 unix:!macx {
406     EXTRA_BINFILES += $$EXTRA_LIBFILES
407     for(FILE,EXTRA_BINFILES){
408         QMAKE_POST_LINK += $$quote(cp $${FILE} .$$escape_expand(\\n\\t))
409     }
410 }
411 # qmake 2.01a / Qt 4.7.0 doesn't set DESTDIR on OS X.
412 macx {
413     MACOS_DIR = "$${DESTDIR}/$${TARGET}.app/Contents/MacOS"
414     FRAMEWORKS_DIR = "$${DESTDIR}/$${TARGET}.app/Contents/Frameworks"
415
416     for(FILE,EXTRA_BINFILES){
417         QMAKE_POST_LINK += $$quote(cp -R $${FILE} $${MACOS_DIR}/$$escape_expand(\\n\\t))
418     }
419
420 #    QMAKE_POST_LINK += $$quote($(MKDIR) $${FRAMEWORKS_DIR}/$$escape_expand(\\n\\t))
421 #    for(FILE,EXTRA_LIBFILES){
422 #        QMAKE_POST_LINK += $$quote(cp -R $${FILE} $${FRAMEWORKS_DIR}/$$escape_expand(\\n\\t))
423 #    }
424
425     # Homebrew installs libraries read-only, which makes macdeployqt fail when
426     # it tries to adjust paths. Work around this by running it twice.
427     QMAKE_POST_LINK += $$quote(macdeployqt \"$${DESTDIR}/$${TARGET}.app\" || /bin/true$$escape_expand(\\n\\t))
428     QMAKE_POST_LINK += $$quote(chmod 644 \"$${FRAMEWORKS_DIR}/\"*.dylib$$escape_expand(\\n\\t))
429     QMAKE_POST_LINK += $$quote(macdeployqt -executable=\"$${MACOS_DIR}/dumpcap\" \"$${DESTDIR}/$${TARGET}.app\"$$escape_expand(\\n\\t))
430     QMAKE_POST_LINK += $$quote(chmod 444 \"$${FRAMEWORKS_DIR}/\"*.dylib$$escape_expand(\\n\\t))
431 }
432
433 win32 {
434     DEFINES+=HAVE_PCAP_REMOTE
435     DEFINES+=HAVE_PCAP_SETSAMPLING
436     # Add the wireshark objects to LIBS
437     LIBS += $$OBJECTS_WS_C
438     LIBS += $$PA_OBJECTS
439     LIBS += \
440         $${guilibsdll} $${HHC_LIBS} \
441         -L../../epan -llibwireshark -L../../wsutil -llibwsutil \
442         -L../../wiretap -lwiretap-$${WTAP_VERSION} \
443         -L../../capchild -llibcapchild -L../../caputils -llibcaputils \
444         -L.. -llibui -L../../codecs -lcodecs \
445         -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0 \
446         -L$${ZLIB_DIR}/lib -lzdll \
447         -L$${WINSPARKLE_DIR} -lWinSparkle
448
449     !isEmpty(MSVCR_DLL) {
450         EXTRA_BINFILES += \"$${MSVCR_DLL}\"
451     }
452
453     PLATFORM_DLL_DIR = $(DESTDIR)platforms
454     CONFIG(debug, debug|release) {
455         isEqual(QT_MAJOR_VERSION, 4) {
456             EXTRA_DLLS = QtCored4 QtGuid4
457         } else: lessThan(QT_MINOR_VERSION, 3) {
458             # The QT lib parts are copied by windeployqt post 5.3
459             EXTRA_DLLS = Qt5Cored Qt5Guid Qt5Widgetsd Qt5PrintSupportd Qt5MultimediaWidgetsd
460             EXTRA_PLATFORM_DLLS = qwindowsd
461             QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLATFORM_DLL_DIR} $(MKDIR) $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
462         }
463     }
464     CONFIG(release, debug|release) {
465         isEqual(QT_MAJOR_VERSION, 4) {
466             EXTRA_DLLS = QtCore4 QtGui4
467         } else: lessThan(QT_MINOR_VERSION, 3) {
468             # The QT lib parts are copied by windeployqt post 5.3
469             EXTRA_DLLS = Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5MultimediaWidgets
470             EXTRA_PLATFORM_DLLS = qwindows
471             QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLATFORM_DLL_DIR} $(MKDIR) $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
472         }
473     }
474     for(DLL,EXTRA_DLLS){
475         EXTRA_BINFILES += $$[QT_INSTALL_BINS]/$${DLL}.dll
476     }
477     INSTALL_PLATFORM_DIR = $$[QT_INSTALL_PLUGINS]/platforms
478     INSTALL_PLATFORM_DIR ~= s,/,\\,g
479     for(DLL,EXTRA_PLATFORM_DLLS){
480         QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${INSTALL_PLATFORM_DIR}\\$${DLL}.dll $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
481         EXTRA_BINFILES +=
482     }
483
484     EXTRA_BINFILES += \
485         ../../dumpcap.exe \
486         ../../epan/libwireshark.dll ../../wiretap/wiretap-$${WTAP_VERSION}.dll ../../wsutil/libwsutil.dll \
487         $${GLIB_DIR}/bin/libglib-2.0-0.dll $${GLIB_DIR}/bin/libgmodule-2.0-0.dll \
488         $${GLIB_DIR}/bin/$${INTL_DLL} \
489         $${GLIB_DIR}/bin/gspawn-$${WIRESHARK_TARGET_PLATFORM}-helper.exe \
490         $${GLIB_DIR}/bin/gspawn-$${WIRESHARK_TARGET_PLATFORM}-helper-console.exe \
491         $${C_ARES_DIR}/bin/libcares-2.dll $${ZLIB_DIR}/zlib1.dll \
492         $${GNUTLS_DIR}/bin/libffi-6.dll $${GNUTLS_DIR}/bin/$${GCC_DLL} \
493         $${GNUTLS_DIR}/bin/libgcrypt-20.dll $${GNUTLS_DIR}/bin/libgmp-10.dll \
494         $${GNUTLS_DIR}/bin/libgnutls-28.dll $${GNUTLS_DIR}/bin/$${GPGERROR_DLL} \
495         $${GNUTLS_DIR}/bin/libhogweed-2-4.dll $${GNUTLS_DIR}/bin/libnettle-4-6.dll \
496         $${GNUTLS_DIR}/bin/libp11-kit-0.dll $${GNUTLS_DIR}/bin/libtasn1-6.dll \
497         $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
498         $${LUA_DIR}/lua52.dll \
499         $${GEOIP_DIR}/bin/libGeoIP-1.dll \
500         $${WINSPARKLE_DIR}/WinSparkle.dll \
501         ../../colorfilters ../../dfilters ../../cfilters
502
503     wireshark_use_kfw {
504         EXTRA_BINFILES += \
505             $${KFW_DIR}/bin/$${COMERR_DLL} $${KFW_DIR}/bin/$${KRB5_DLL} $${KFW_DIR}/bin/$${K5SPRT_DLL}
506     }
507
508     EXTRA_BINFILES ~= s,/,\\,g
509     for(FILE,EXTRA_BINFILES){
510         QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${FILE} $(DESTDIR)$$escape_expand(\\n\\t))
511     }
512     PLUGINS_DIR = $(DESTDIR)plugins
513     QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLUGINS_DIR} $(MKDIR) $${PLUGINS_DIR}$$escape_expand(\\n\\t))
514     QMAKE_POST_LINK +=$$quote($(COPY_FILE) ..\\..\\$${INSTALL_DIR}\\plugins\\*.dll $(DESTDIR)plugins$$escape_expand(\\n\\t))
515
516     # This doesn't depend on wireshark-gtk2. It also doesn't work.
517     #PLUGINS_IN_PWD=$${IN_PWD}
518     #PLUGINS_OUT_PWD=$${OUT_PWD}
519     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)\\..\\..\\plugins$$escape_expand(\\n\\t))
520     #QMAKE_POST_LINK +=$$quote(nmake -f Makefile.nmake INSTALL_DIR=$$replace(PLUGINS_OUT_PWD, /, \\)\\$(DESTDIR)$$escape_expand(\\n\\t))
521     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)$$escape_expand(\\n\\t))
522
523     # Use windeployqt to copy the required QT libs.
524     # Currently the QT bin dir has to be on the path for windeployqt to work
525     isEqual(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 2) {
526       QMAKE_POST_LINK +=$$quote(set PATH=%PATH%;$${QT5_BASE_DIR}\\bin$$escape_expand(\\n\\t))
527       QMAKE_POST_LINK +=$$quote(windeployqt --release --no-compiler-runtime $(DESTDIR)wireshark.exe)$$escape_expand(\\n\\t))
528     }
529 }
530
531 RESOURCES += \
532     ../../image/about.qrc \
533     ../../image/display_filter.qrc \
534     ../../image/languages/languages.qrc \
535     ../../image/layout.qrc \
536     ../../image/status.qrc \
537     ../../image/toolbar.qrc \
538     ../../image/wsicon.qrc \
539     i18n.qrc \
540
541
542 # wireshark_en should be pluralonly.
543 TRANSLATIONS = \
544         wireshark_de.ts \
545         wireshark_en.ts \
546         wireshark_fr.ts \
547         wireshark_it.ts \
548         wireshark_ja_JP.ts \
549         wireshark_pl.ts \
550         wireshark_zh_CN.ts
551
552 ICON = ../../packaging/macosx/Resources/Wireshark.icns
553
554 RC_FILE = ../../image/wireshark.rc
555
556 # http://lists.trolltech.com/qt-interest/2008-01/thread00516-0.html
557 # http://www.freehackers.org/thomas/2009/03/10/fixing-qmake-missing-rule-for-ts-qm/
558 !isEmpty(TRANSLATIONS) {
559
560     isEmpty(QMAKE_LRELEASE) {
561         win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
562         else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
563     }
564
565     isEmpty(TS_DIR):TS_DIR = Translations
566
567     TSQM.name = lrelease ${QMAKE_FILE_IN}
568     TSQM.input = TRANSLATIONS
569     TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
570     TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
571     TSQM.CONFIG = no_link
572 #    QMAKE_EXTRA_COMPILERS += TSQM
573 #    PRE_TARGETDEPS += compiler_TSQM_make_all
574 } else {
575     message(No translation files in project)
576 }
577
578 win32: QMAKE_CLEAN += *.pdb *.pri
579
580 HEADERS += \
581     byte_view_tab.h \
582     byte_view_text.h \
583     capture_file.h \
584     capture_file_dialog.h \
585     capture_filter_combo.h \
586     capture_filter_edit.h \
587     capture_filter_syntax_worker.h \
588     capture_info_dialog.h \
589     color_utils.h \
590     display_filter_combo.h \
591     display_filter_edit.h \
592     file_set_dialog.h \
593     filter_dialog.h \
594     import_text_dialog.h \
595     interface_tree.h \
596     io_graph_dialog.h \
597     label_stack.h \
598     main_status_bar.h \
599     main_welcome.h \
600     main_window.h \
601     packet_list.h \
602     packet_list_model.h \
603     packet_list_record.h \
604     packet_range_group_box.h \
605     proto_tree.h \
606     qt_ui_utils.h \
607     qt_ui_utils.h \
608     qcustomplot.h \
609     recent_file_status.h \
610     related_packet_delegate.h \
611     sequence_diagram.h \
612     sequence_dialog.h \
613     simple_dialog.h \
614     sparkline_delegate.h \
615     syntax_line_edit.h \
616     tap_parameter_dialog.h \
617     time_shift_dialog.h \
618     wireshark_application.h \
619     wireshark_dialog.h \
620
621
622 SOURCES += \
623     about_dialog.cpp \
624     accordion_frame.cpp \
625     bluetooth_att_server_attributes_dialog.cpp \
626     bluetooth_devices_dialog.cpp \
627     byte_view_tab.cpp \
628     byte_view_text.cpp \
629     capture_file.cpp \
630     capture_file_dialog.cpp \
631     capture_file_progress_frame.cpp \
632     capture_file_properties_dialog.cpp \
633     capture_filter_combo.cpp \
634     capture_filter_edit.cpp \
635     capture_filter_syntax_worker.cpp \
636     capture_info_dialog.cpp \
637     capture_interfaces_dialog.cpp \
638     capture_preferences_frame.cpp \
639     color_utils.cpp \
640     coloring_rules_dialog.cpp \
641     column_preferences_frame.cpp \
642     column_editor_frame.cpp \
643     compiled_filter_output.cpp \
644     conversation_dialog.cpp \
645     decode_as_dialog.cpp \
646     display_filter_combo.cpp \
647     display_filter_edit.cpp \
648     display_filter_expression_dialog.cpp \
649     elided_label.cpp \
650     endpoint_dialog.cpp \
651     expert_info_dialog.cpp \
652     export_dissection_dialog.cpp \
653     export_object_dialog.cpp \
654     export_pdu_dialog.cpp \
655     extcap_argument.cpp \
656     extcap_argument_file.cpp \
657     extcap_options_dialog.cpp \
658     file_set_dialog.cpp \
659     filter_action.cpp \
660     filter_dialog.cpp \
661     filter_expressions_preferences_frame.cpp \
662     follow_stream_dialog.cpp \
663     follow_stream_text.cpp \
664     font_color_preferences_frame.cpp \
665     import_text_dialog.cpp \
666     interface_tree.cpp \
667     io_graph_dialog.cpp \
668     label_stack.cpp \
669     layout_preferences_frame.cpp \
670     lbm_lbtrm_transport_dialog.cpp \
671     lbm_lbtru_transport_dialog.cpp \
672     lbm_stream_dialog.cpp \
673     lbm_uimflow_dialog.cpp \
674     main_status_bar.cpp \
675     main_welcome.cpp \
676     main_window.cpp \
677     main_window_preferences_frame.cpp \
678     main_window_slots.cpp \
679     manage_interfaces_dialog.cpp \
680     module_preferences_scroll_area.cpp \
681     packet_comment_dialog.cpp \
682     packet_dialog.cpp \
683     packet_format_group_box.cpp \
684     packet_list.cpp \
685     packet_list_model.cpp \
686     packet_list_record.cpp \
687     packet_range_group_box.cpp \
688     preference_editor_frame.cpp \
689     preferences_dialog.cpp \
690     print_dialog.cpp \
691     profile_dialog.cpp \
692     proto_tree.cpp \
693     protocol_hierarchy_dialog.cpp \
694     protocol_preferences_menu.cpp \
695     qcustomplot.cpp \
696     qt_ui_utils.cpp \
697     recent_file_status.cpp \
698     related_packet_delegate.cpp \
699     remote_capture_dialog.cpp  \
700     remote_settings_dialog.cpp \
701     rtp_stream_dialog.cpp  \
702     sctp_all_assocs_dialog.cpp  \
703     sctp_assoc_analyse_dialog.cpp \
704     sctp_chunk_statistics_dialog.cpp  \
705     sctp_graph_dialog.cpp  \
706     sctp_graph_arwnd_dialog.cpp  \
707     sctp_graph_byte_dialog.cpp  \
708     search_frame.cpp \
709     sequence_diagram.cpp \
710     sequence_dialog.cpp \
711     service_response_time_dialog.cpp \
712     simple_dialog.cpp \
713     sparkline_delegate.cpp \
714     splash_overlay.cpp \
715     stats_tree_dialog.cpp \
716     stock_icon.cpp \
717     syntax_line_edit.cpp \
718     tap_parameter_dialog.cpp \
719     tcp_stream_dialog.cpp \
720     time_shift_dialog.cpp \
721     traffic_table_dialog.cpp \
722     uat_dialog.cpp \
723     voip_calls_dialog.cpp \
724     wireless_frame.cpp \
725     wireshark_application.cpp \
726     wireshark_dialog.cpp \
727     ../../wireshark-qt.cpp