qt: add missing initializers (CID 1325722)
[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 multimedia
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     # Use xcopy instead of copy so as to ensure that newer version of files are copied
160     QMAKE_COPY_FILE = xcopy /d /y
161 }
162
163 SOURCES_TAP = \
164     "stats_tree_dialog.cpp"
165
166 tap_register.name = Generate wireshark-tap-register.c
167 tap_register.input = SOURCES_TAP
168 tap_register.output = wireshark-tap-register.c
169 tap_register.variable_out = SOURCES
170 win32 {
171     tap_register.commands = $${PYTHON} "../../tools/make-tap-reg.py" "\"""$$PWD""\"" taps $$SOURCES_TAP
172 } else {
173     tap_register.commands = python ../../tools/make-tap-reg.py "\"""$$PWD""\"" taps $$SOURCES_TAP
174 }
175 #tap_register.CONFIG += no_link
176 QMAKE_EXTRA_COMPILERS += tap_register
177
178 INCLUDEPATH += ../.. ../../wiretap
179 win32:INCLUDEPATH += \
180     $${WIRESHARK_LIB_DIR}/gtk2/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk2/lib/glib-2.0/include \
181     $${WIRESHARK_LIB_DIR}/gtk3/include/glib-2.0 $${WIRESHARK_LIB_DIR}/gtk3/lib/glib-2.0/include \
182     $${WIRESHARK_LIB_DIR}/WpdPack/Include \
183     $${WIRESHARK_LIB_DIR}/AirPcap_Devpack_4_1_0_1622/Airpcap_Devpack/include \
184     $${GNUTLS_DIR}/include \
185     $${GEOIP_DIR}/include \
186     $${ZLIB_DIR}
187
188 # We have to manually trigger relinking each time one of these is modified.
189 # Is there any way to do this automatically?
190 SOURCES_WS_C = \
191     ../../capture_info.c  \
192     ../../capture_opts.c \
193     ../../cfile.c \
194     ../../color_filters.c \
195     ../../extcap.c \
196     ../../extcap_parser.c \
197     ../../file.c  \
198     ../../fileset.c \
199     ../../frame_tvbuff.c \
200     ../../summary.c \
201     ../../sync_pipe_write.c
202
203 win32:SOURCES_WS_C += \
204     ../../ui/win32/console_win32.c \
205     ../../ui/win32/file_dlg_win32.c
206
207 HEADERS_WS_C  = \
208     ../../wsutil/privileges.h
209
210 FORMS += \
211     about_dialog.ui \
212     address_editor_frame.ui \
213     bluetooth_att_server_attributes_dialog.ui \
214     bluetooth_devices_dialog.ui \
215     bluetooth_hci_summary_dialog.ui \
216     capture_file_properties_dialog.ui \
217     capture_interfaces_dialog.ui \
218     capture_preferences_frame.ui \
219     coloring_rules_dialog.ui \
220     column_preferences_frame.ui \
221     column_editor_frame.ui \
222     compiled_filter_output.ui \
223     conversation_hash_tables_dialog.ui \
224     decode_as_dialog.ui \
225     display_filter_expression_dialog.ui \
226     dissector_tables_dialog.ui \
227     enabled_protocols_dialog.ui \
228     expert_info_dialog.ui \
229     export_object_dialog.ui \
230     export_pdu_dialog.ui \
231     extcap_options_dialog.ui \
232     file_set_dialog.ui \
233     filter_dialog.ui \
234     filter_expressions_preferences_frame.ui \
235     follow_stream_dialog.ui \
236     font_color_preferences_frame.ui \
237     funnel_string_dialog.ui \
238     funnel_text_dialog.ui \
239     gsm_map_summary_dialog.ui \
240     iax2_analysis_dialog.ui \
241     import_text_dialog.ui \
242     io_graph_dialog.ui \
243     layout_preferences_frame.ui \
244     lbm_lbtrm_transport_dialog.ui \
245     lbm_lbtru_transport_dialog.ui \
246     lbm_stream_dialog.ui \
247     lbm_uimflow_dialog.ui \
248     lte_rlc_graph_dialog.ui \
249     main_welcome.ui \
250     main_window.ui \
251     main_window_preferences_frame.ui \
252     manage_interfaces_dialog.ui \
253     module_preferences_scroll_area.ui \
254     mtp3_summary_dialog.ui \
255     packet_comment_dialog.ui \
256     packet_dialog.ui \
257     packet_format_group_box.ui \
258     packet_range_group_box.ui \
259     preference_editor_frame.ui \
260     preferences_dialog.ui \
261     print_dialog.ui \
262     profile_dialog.ui \
263     progress_frame.ui \
264     protocol_hierarchy_dialog.ui \
265     remote_capture_dialog.ui  \
266     remote_settings_dialog.ui  \
267     resolved_addresses_dialog.ui \
268     rtp_analysis_dialog.ui   \
269     rtp_player_dialog.ui \
270     rtp_stream_dialog.ui   \
271     sctp_all_assocs_dialog.ui   \
272     sctp_assoc_analyse_dialog.ui \
273     sctp_chunk_statistics_dialog.ui  \
274     sctp_graph_dialog.ui  \
275     sctp_graph_arwnd_dialog.ui  \
276     sctp_graph_byte_dialog.ui  \
277     search_frame.ui \
278     sequence_dialog.ui \
279     splash_overlay.ui \
280     supported_protocols_dialog.ui \
281     tap_parameter_dialog.ui \
282     tcp_stream_dialog.ui \
283     time_shift_dialog.ui \
284     traffic_table_dialog.ui \
285     uat_dialog.ui \
286     voip_calls_dialog.ui \
287     wireless_frame.ui
288
289 HEADERS += $$HEADERS_WS_C \
290     about_dialog.h \
291     accordion_frame.h \
292     address_editor_frame.h \
293     bluetooth_att_server_attributes_dialog.h \
294     bluetooth_devices_dialog.h \
295     bluetooth_hci_summary_dialog.h \
296     capture_file_properties_dialog.h \
297     capture_interfaces_dialog.h \
298     capture_preferences_frame.h \
299     coloring_rules_dialog.h \
300     column_preferences_frame.h \
301     column_editor_frame.h \
302     compiled_filter_output.h \
303     conversation_dialog.h \
304     conversation_hash_tables_dialog.h \
305     decode_as_dialog.h \
306     display_filter_expression_dialog.h \
307     dissector_tables_dialog.h \
308     elided_label.h \
309     enabled_protocols_dialog.h \
310     endpoint_dialog.h \
311     expert_info_dialog.h \
312     export_dissection_dialog.h \
313     export_object_dialog.h \
314     export_pdu_dialog.h \
315     extcap_argument.h \
316     extcap_argument_file.h \
317     extcap_options_dialog.h \
318     filter_action.h \
319     filter_expressions_preferences_frame.h \
320     follow_stream_dialog.h \
321     follow_stream_text.h \
322     font_color_preferences_frame.h \
323     funnel_string_dialog.h \
324     funnel_text_dialog.h \
325     funnel_statistics.h \
326     gsm_map_summary_dialog.h \
327     layout_preferences_frame.h \
328     lbm_lbtrm_transport_dialog.h \
329     lbm_lbtru_transport_dialog.h \
330     lbm_stream_dialog.h \
331     lbm_uimflow_dialog.h \
332     lte_mac_statistics_dialog.h \
333     lte_rlc_graph_dialog.h \
334     lte_rlc_statistics_dialog.h \
335     main_window_preferences_frame.h \
336     manage_interfaces_dialog.h \
337     module_preferences_scroll_area.h \
338     mtp3_summary_dialog.h \
339     multicast_statistics_dialog.h \
340     overlay_scroll_bar.h \
341     packet_comment_dialog.h \
342     packet_dialog.h \
343     packet_format_group_box.h \
344     percent_bar_delegate.h \
345     preference_editor_frame.h \
346     preferences_dialog.h \
347     print_dialog.h \
348     profile_dialog.h \
349     progress_frame.h \
350     protocol_hierarchy_dialog.h \
351     protocol_preferences_menu.h \
352     remote_capture_dialog.h  \
353     remote_settings_dialog.h    \
354     resolved_addresses_dialog.h \
355     rtp_analysis_dialog.h  \
356     rtp_audio_stream.h \
357     rtp_player_dialog.h \
358     rtp_stream_dialog.h  \
359     sctp_all_assocs_dialog.h  \
360     sctp_assoc_analyse_dialog.h \
361     sctp_chunk_statistics_dialog.h  \
362     sctp_graph_dialog.h  \
363     sctp_graph_arwnd_dialog.h  \
364     sctp_graph_byte_dialog.h  \
365     search_frame.h \
366     service_response_time_dialog.h \
367     simple_statistics_dialog.h \
368     splash_overlay.h \
369     stats_tree_dialog.h \
370     tango_colors.h \
371     tap_parameter_dialog.h \
372     tcp_stream_dialog.h \
373     traffic_table_dialog.h \
374     uat_dialog.h \
375     voip_calls_dialog.h \
376     wireless_frame.h \
377     wlan_statistics_dialog.h
378
379 win32 {
380     OBJECTS_WS_C = $$SOURCES_WS_C
381     OBJECTS_WS_C ~= s/[.]c/.obj/g
382     OBJECTS_WS_C ~= s,/,\\,g
383     OBJECTS_WS_C += ../../image/file_dlg_win32.res
384 } else {
385 ## XXX: Shouldn't need to (re)compile WS_C sources ??
386     SOURCES += $$SOURCES_WS_C
387 }
388
389 DEFINES += INET6 REENTRANT
390 unix:DEFINES += _U_=\"__attribute__((unused))\"
391
392 macx:QMAKE_LFLAGS += \
393     -framework CoreServices \
394     -framework ApplicationServices \
395     -framework CoreFoundation \
396     -framework SystemConfiguration
397
398 unix {
399     exists(../../epan/.libs/libw*) {
400         message( "Assuming Autotools library paths" )
401         LIBS += \
402             -L.. \
403             -L../../epan/.libs -Wl,-rpath ../../epan/.libs \
404             -L../../wiretap/.libs -Wl,-rpath ../../wiretap/.libs \
405             -L../../wsutil/.libs -Wl,-rpath ../../wsutil/.libs
406     } else:exists(../../run/libw*) {
407         message( "Assuming CMake library path" )
408         LIBS += -L../../run -Wl,-rpath ../../run
409     }
410
411     LIBS += -lwireshark -lwiretap -lcapchild -lcaputils -lui -lcodecs -lwsutil \
412     -lpcap
413
414     exists(../libui_dirty.a) {
415         LIBS += -lui_dirty
416     }
417 }
418
419 macx:LIBS += -Wl,-macosx_version_min,10.6 -liconv -lz
420
421 # XXX Copy this only if we're linking with Lua.
422 EXTRA_BINFILES = \
423     ../../epan/wslua/console.lua
424
425 # http://stackoverflow.com/questions/3984104/qmake-how-to-copy-a-file-to-the-output
426 unix: {
427
428     exists(../../.libs/dumpcap) {
429         EXTRA_BINFILES += \
430             ../../.libs/dumpcap
431         EXTRA_LIBFILES += \
432             ../../epan/.libs/libwireshark*$$QMAKE_EXTENSION_SHLIB* \
433             ../../wiretap/.libs/libwiretap*$$QMAKE_EXTENSION_SHLIB* \
434             ../../wsutil/.libs/libwsutil*$$QMAKE_EXTENSION_SHLIB*
435     } else:exists(../../run/libw*) {
436         EXTRA_BINFILES += \
437             ../../run/dumpcap
438         EXTRA_LIBFILES += ../../run/libwireshark*$$QMAKE_EXTENSION_SHLIB* \
439                         ../../run/libwiretap*$$QMAKE_EXTENSION_SHLIB* \
440                         ../../run/libwsutil*$$QMAKE_EXTENSION_SHLIB*
441     }
442
443 }
444 unix:!macx {
445     EXTRA_BINFILES += $$EXTRA_LIBFILES
446     for(FILE,EXTRA_BINFILES){
447         QMAKE_POST_LINK += $$quote(cp $${FILE} .$$escape_expand(\\n\\t))
448     }
449 }
450 # qmake 2.01a / Qt 4.7.0 doesn't set DESTDIR on OS X.
451 macx {
452     MACOS_DIR = "$${DESTDIR}/$${TARGET}.app/Contents/MacOS"
453     FRAMEWORKS_DIR = "$${DESTDIR}/$${TARGET}.app/Contents/Frameworks"
454
455     for(FILE,EXTRA_BINFILES){
456         QMAKE_POST_LINK += $$quote(cp -R $${FILE} $${MACOS_DIR}/$$escape_expand(\\n\\t))
457     }
458
459 #    QMAKE_POST_LINK += $$quote($(MKDIR) $${FRAMEWORKS_DIR}/$$escape_expand(\\n\\t))
460 #    for(FILE,EXTRA_LIBFILES){
461 #        QMAKE_POST_LINK += $$quote(cp -R $${FILE} $${FRAMEWORKS_DIR}/$$escape_expand(\\n\\t))
462 #    }
463
464     # Homebrew installs libraries read-only, which makes macdeployqt fail when
465     # it tries to adjust paths. Work around this by running it twice.
466     QMAKE_POST_LINK += $$quote(macdeployqt \"$${DESTDIR}/$${TARGET}.app\" || /bin/true$$escape_expand(\\n\\t))
467     QMAKE_POST_LINK += $$quote(chmod 644 \"$${FRAMEWORKS_DIR}/\"*.dylib$$escape_expand(\\n\\t))
468     QMAKE_POST_LINK += $$quote(macdeployqt -executable=\"$${MACOS_DIR}/dumpcap\" \"$${DESTDIR}/$${TARGET}.app\"$$escape_expand(\\n\\t))
469     QMAKE_POST_LINK += $$quote(chmod 444 \"$${FRAMEWORKS_DIR}/\"*.dylib$$escape_expand(\\n\\t))
470 }
471
472 win32 {
473     DEFINES+=HAVE_PCAP_REMOTE
474     DEFINES+=HAVE_PCAP_SETSAMPLING
475     # Add the wireshark objects to LIBS
476     LIBS += $$OBJECTS_WS_C
477     LIBS += $$PA_OBJECTS
478     LIBS += \
479         $${guilibsdll} $${HHC_LIBS} \
480         -L../../epan -llibwireshark -L../../wsutil -llibwsutil \
481         -L../../wiretap -lwiretap-$${WTAP_VERSION} \
482         -L../../capchild -llibcapchild -L../../caputils -llibcaputils \
483         -L.. -llibui -L../../codecs -lcodecs \
484         -L$${GLIB_DIR}/lib -lglib-2.0 -lgmodule-2.0 \
485         -L$${ZLIB_DIR}/lib -lzdll \
486         -L$${WINSPARKLE_DIR} -lWinSparkle
487
488     !isEmpty(MSVCR_DLL) {
489         EXTRA_BINFILES += \"$${MSVCR_DLL}\"
490     }
491
492     PLATFORM_DLL_DIR = $(DESTDIR)platforms
493     CONFIG(debug, debug|release) {
494         isEqual(QT_MAJOR_VERSION, 4) {
495             EXTRA_DLLS = QtCored4 QtGuid4
496         } else: lessThan(QT_MINOR_VERSION, 3) {
497             # The QT lib parts are copied by windeployqt post 5.3
498             EXTRA_DLLS = Qt5Cored Qt5Guid Qt5Widgetsd Qt5PrintSupportd Qt5Multimediad
499             EXTRA_PLATFORM_DLLS = qwindowsd
500             QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLATFORM_DLL_DIR} $(MKDIR) $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
501         }
502     }
503     CONFIG(release, debug|release) {
504         isEqual(QT_MAJOR_VERSION, 4) {
505             EXTRA_DLLS = QtCore4 QtGui4
506         } else: lessThan(QT_MINOR_VERSION, 3) {
507             # The QT lib parts are copied by windeployqt post 5.3
508             EXTRA_DLLS = Qt5Core Qt5Gui Qt5Widgets Qt5PrintSupport Qt5Multimedia
509             EXTRA_PLATFORM_DLLS = qwindows
510             QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLATFORM_DLL_DIR} $(MKDIR) $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
511         }
512     }
513     for(DLL,EXTRA_DLLS){
514         EXTRA_BINFILES += $$[QT_INSTALL_BINS]/$${DLL}.dll
515     }
516     INSTALL_PLATFORM_DIR = $$[QT_INSTALL_PLUGINS]/platforms
517     INSTALL_PLATFORM_DIR ~= s,/,\\,g
518     for(DLL,EXTRA_PLATFORM_DLLS){
519         QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${INSTALL_PLATFORM_DIR}\\$${DLL}.dll $${PLATFORM_DLL_DIR}$$escape_expand(\\n\\t))
520         EXTRA_BINFILES +=
521     }
522
523     EXTRA_BINFILES += \
524         ../../dumpcap.exe \
525         ../../epan/libwireshark.dll ../../wiretap/wiretap-$${WTAP_VERSION}.dll ../../wsutil/libwsutil.dll \
526         $${GLIB_DIR}/bin/libglib-2.0-0.dll $${GLIB_DIR}/bin/libgmodule-2.0-0.dll \
527         $${GLIB_DIR}/bin/$${INTL_DLL} \
528         $${GLIB_DIR}/bin/gspawn-$${WIRESHARK_TARGET_PLATFORM}-helper.exe \
529         $${GLIB_DIR}/bin/gspawn-$${WIRESHARK_TARGET_PLATFORM}-helper-console.exe \
530         $${C_ARES_DIR}/bin/libcares-2.dll $${ZLIB_DIR}/zlib1.dll \
531         $${GNUTLS_DIR}/bin/libffi-6.dll $${GNUTLS_DIR}/bin/$${GCC_DLL} \
532         $${GNUTLS_DIR}/bin/libgcrypt-20.dll $${GNUTLS_DIR}/bin/libgmp-10.dll \
533         $${GNUTLS_DIR}/bin/libgnutls-28.dll $${GNUTLS_DIR}/bin/$${GPGERROR_DLL} \
534         $${GNUTLS_DIR}/bin/libhogweed-2-4.dll $${GNUTLS_DIR}/bin/libnettle-4-6.dll \
535         $${GNUTLS_DIR}/bin/libp11-kit-0.dll $${GNUTLS_DIR}/bin/libtasn1-6.dll \
536         $${GNUTLS_DIR}/bin/libintl-8.dll $${SMI_DIR}/bin/libsmi-2.dll \
537         $${LUA_DIR}/lua52.dll \
538         $${GEOIP_DIR}/bin/libGeoIP-1.dll \
539         $${WINSPARKLE_DIR}/WinSparkle.dll \
540         ../../colorfilters ../../dfilters ../../cfilters
541
542     wireshark_use_kfw {
543         EXTRA_BINFILES += \
544             $${KFW_DIR}/bin/$${COMERR_DLL} $${KFW_DIR}/bin/$${KRB5_DLL} $${KFW_DIR}/bin/$${K5SPRT_DLL}
545     }
546
547     EXTRA_BINFILES ~= s,/,\\,g
548     for(FILE,EXTRA_BINFILES){
549         QMAKE_POST_LINK +=$$quote($(COPY_FILE) $${FILE} $(DESTDIR)$$escape_expand(\\n\\t))
550     }
551     PLUGINS_DIR = $(DESTDIR)plugins
552     QMAKE_POST_LINK +=$$quote($(CHK_DIR_EXISTS) $${PLUGINS_DIR} $(MKDIR) $${PLUGINS_DIR}$$escape_expand(\\n\\t))
553     QMAKE_POST_LINK +=$$quote($(COPY_FILE) ..\\..\\$${INSTALL_DIR}\\plugins\\*.dll $(DESTDIR)plugins$$escape_expand(\\n\\t))
554
555     # This doesn't depend on wireshark-gtk2. It also doesn't work.
556     #PLUGINS_IN_PWD=$${IN_PWD}
557     #PLUGINS_OUT_PWD=$${OUT_PWD}
558     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)\\..\\..\\plugins$$escape_expand(\\n\\t))
559     #QMAKE_POST_LINK +=$$quote(nmake -f Makefile.nmake INSTALL_DIR=$$replace(PLUGINS_OUT_PWD, /, \\)\\$(DESTDIR)$$escape_expand(\\n\\t))
560     #QMAKE_POST_LINK +=$$quote(cd $$replace(PLUGINS_IN_PWD, /, \\)$$escape_expand(\\n\\t))
561
562     # Use windeployqt to copy the required QT libs.
563     # Currently the QT bin dir has to be on the path for windeployqt to work
564     isEqual(QT_MAJOR_VERSION, 5):greaterThan(QT_MINOR_VERSION, 2) {
565       QMAKE_POST_LINK +=$$quote(set PATH=%PATH%;$${QT5_BASE_DIR}\\bin$$escape_expand(\\n\\t))
566       QMAKE_POST_LINK +=$$quote(windeployqt --release --no-compiler-runtime $(DESTDIR)wireshark.exe)$$escape_expand(\\n\\t))
567     }
568 }
569
570 RESOURCES += \
571     ../../image/about.qrc \
572     ../../image/languages/languages.qrc \
573     ../../image/layout.qrc \
574     ../../image/status.qrc \
575     ../../image/toolbar.qrc \
576     ../../image/wsicon.qrc \
577     i18n.qrc \
578
579
580 # wireshark_en should be pluralonly.
581 TRANSLATIONS = \
582         wireshark_de.ts \
583         wireshark_en.ts \
584         wireshark_fr.ts \
585         wireshark_it.ts \
586         wireshark_ja_JP.ts \
587         wireshark_pl.ts \
588         wireshark_zh_CN.ts
589
590 ICON = ../../packaging/macosx/Resources/Wireshark.icns
591
592 RC_FILE = ../../image/wireshark.rc
593
594 # http://lists.trolltech.com/qt-interest/2008-01/thread00516-0.html
595 # http://www.freehackers.org/thomas/2009/03/10/fixing-qmake-missing-rule-for-ts-qm/
596 !isEmpty(TRANSLATIONS) {
597
598     isEmpty(QMAKE_LRELEASE) {
599         win32:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]\\lrelease.exe
600         else:QMAKE_LRELEASE = $$[QT_INSTALL_BINS]/lrelease
601     }
602
603     isEmpty(TS_DIR):TS_DIR = Translations
604
605     TSQM.name = lrelease ${QMAKE_FILE_IN}
606     TSQM.input = TRANSLATIONS
607     TSQM.output = $$TS_DIR/${QMAKE_FILE_BASE}.qm
608     TSQM.commands = $$QMAKE_LRELEASE ${QMAKE_FILE_IN}
609     TSQM.CONFIG = no_link
610 #    QMAKE_EXTRA_COMPILERS += TSQM
611 #    PRE_TARGETDEPS += compiler_TSQM_make_all
612 } else {
613     message(No translation files in project)
614 }
615
616 win32: QMAKE_CLEAN += *.pdb *.pri
617
618 HEADERS += \
619     byte_view_tab.h \
620     byte_view_text.h \
621     capture_file.h \
622     capture_file_dialog.h \
623     capture_filter_combo.h \
624     capture_filter_edit.h \
625     capture_filter_syntax_worker.h \
626     capture_info_dialog.h \
627     color_utils.h \
628     display_filter_combo.h \
629     display_filter_edit.h \
630     file_set_dialog.h \
631     filter_dialog.h \
632     iax2_analysis_dialog.h \
633     import_text_dialog.h \
634     interface_tree.h \
635     io_graph_dialog.h \
636     label_stack.h \
637     main_status_bar.h \
638     main_welcome.h \
639     main_window.h \
640     packet_list.h \
641     packet_list_model.h \
642     packet_list_record.h \
643     packet_range_group_box.h \
644     proto_tree.h \
645     qt_ui_utils.h \
646     qt_ui_utils.h \
647     qcustomplot.h \
648     recent_file_status.h \
649     related_packet_delegate.h \
650     response_time_delay_dialog.h \
651     rpc_service_response_time_dialog.h \
652     sequence_diagram.h \
653     sequence_dialog.h \
654     simple_dialog.h \
655     sparkline_delegate.h \
656     stock_icon_tool_button.h \
657     supported_protocols_dialog.h \
658     syntax_line_edit.h \
659     tap_parameter_dialog.h \
660     time_shift_dialog.h \
661     wireshark_application.h \
662     wireshark_dialog.h \
663     wlan_statistics_dialog.h
664
665 SOURCES += \
666     about_dialog.cpp \
667     accordion_frame.cpp \
668     address_editor_frame.cpp \
669     bluetooth_att_server_attributes_dialog.cpp \
670     bluetooth_devices_dialog.cpp \
671     bluetooth_hci_summary_dialog.cpp \
672     byte_view_tab.cpp \
673     byte_view_text.cpp \
674     capture_file.cpp \
675     capture_file_dialog.cpp \
676     capture_file_properties_dialog.cpp \
677     capture_filter_combo.cpp \
678     capture_filter_edit.cpp \
679     capture_filter_syntax_worker.cpp \
680     capture_info_dialog.cpp \
681     capture_interfaces_dialog.cpp \
682     capture_preferences_frame.cpp \
683     color_utils.cpp \
684     coloring_rules_dialog.cpp \
685     column_preferences_frame.cpp \
686     column_editor_frame.cpp \
687     compiled_filter_output.cpp \
688     conversation_dialog.cpp \
689     conversation_hash_tables_dialog.cpp \
690     decode_as_dialog.cpp \
691     display_filter_combo.cpp \
692     display_filter_edit.cpp \
693     display_filter_expression_dialog.cpp \
694     dissector_tables_dialog.cpp \
695     elided_label.cpp \
696     enabled_protocols_dialog.cpp \
697     endpoint_dialog.cpp \
698     expert_info_dialog.cpp \
699     export_dissection_dialog.cpp \
700     export_object_dialog.cpp \
701     export_pdu_dialog.cpp \
702     extcap_argument.cpp \
703     extcap_argument_file.cpp \
704     extcap_options_dialog.cpp \
705     file_set_dialog.cpp \
706     filter_action.cpp \
707     filter_dialog.cpp \
708     filter_expressions_preferences_frame.cpp \
709     follow_stream_dialog.cpp \
710     follow_stream_text.cpp \
711     font_color_preferences_frame.cpp \
712     funnel_string_dialog.cpp \
713     funnel_text_dialog.cpp \
714     funnel_statistics.cpp \
715     gsm_map_summary_dialog.cpp \
716     iax2_analysis_dialog.cpp \
717     import_text_dialog.cpp \
718     interface_tree.cpp \
719     io_graph_dialog.cpp \
720     label_stack.cpp \
721     layout_preferences_frame.cpp \
722     lbm_lbtrm_transport_dialog.cpp \
723     lbm_lbtru_transport_dialog.cpp \
724     lbm_stream_dialog.cpp \
725     lbm_uimflow_dialog.cpp \
726     lte_mac_statistics_dialog.cpp \
727     lte_rlc_graph_dialog.cpp \
728     lte_rlc_statistics_dialog.cpp \
729     main_status_bar.cpp \
730     main_welcome.cpp \
731     main_window.cpp \
732     main_window_preferences_frame.cpp \
733     main_window_slots.cpp \
734     manage_interfaces_dialog.cpp \
735     module_preferences_scroll_area.cpp \
736     mtp3_summary_dialog.cpp \
737     multicast_statistics_dialog.cpp \
738     overlay_scroll_bar.cpp \
739     packet_comment_dialog.cpp \
740     packet_dialog.cpp \
741     packet_format_group_box.cpp \
742     packet_list.cpp \
743     packet_list_model.cpp \
744     packet_list_record.cpp \
745     packet_range_group_box.cpp \
746     percent_bar_delegate.cpp \
747     preference_editor_frame.cpp \
748     preferences_dialog.cpp \
749     print_dialog.cpp \
750     profile_dialog.cpp \
751     progress_frame.cpp \
752     proto_tree.cpp \
753     protocol_hierarchy_dialog.cpp \
754     protocol_preferences_menu.cpp \
755     qcustomplot.cpp \
756     qt_ui_utils.cpp \
757     recent_file_status.cpp \
758     related_packet_delegate.cpp \
759     remote_capture_dialog.cpp  \
760     remote_settings_dialog.cpp \
761     response_time_delay_dialog.cpp \
762     resolved_addresses_dialog.cpp \
763     rpc_service_response_time_dialog.cpp \
764     rtp_analysis_dialog.cpp  \
765     rtp_audio_stream.cpp \
766     rtp_player_dialog.cpp \
767     rtp_stream_dialog.cpp  \
768     sctp_all_assocs_dialog.cpp  \
769     sctp_assoc_analyse_dialog.cpp \
770     sctp_chunk_statistics_dialog.cpp  \
771     sctp_graph_dialog.cpp  \
772     sctp_graph_arwnd_dialog.cpp  \
773     sctp_graph_byte_dialog.cpp  \
774     search_frame.cpp \
775     sequence_diagram.cpp \
776     sequence_dialog.cpp \
777     service_response_time_dialog.cpp \
778     simple_dialog.cpp \
779     simple_statistics_dialog.cpp \
780     sparkline_delegate.cpp \
781     splash_overlay.cpp \
782     stats_tree_dialog.cpp \
783     stock_icon.cpp \
784     stock_icon_tool_button.cpp \
785     supported_protocols_dialog.cpp \
786     syntax_line_edit.cpp \
787     tap_parameter_dialog.cpp \
788     tcp_stream_dialog.cpp \
789     time_shift_dialog.cpp \
790     traffic_table_dialog.cpp \
791     uat_dialog.cpp \
792     voip_calls_dialog.cpp \
793     wireless_frame.cpp \
794     wireshark_application.cpp \
795     wireshark_dialog.cpp \
796     wlan_statistics_dialog.cpp \
797     ../../wireshark-qt.cpp