From cfab5ef035db7be8502623af203ab3494a9200e3 Mon Sep 17 00:00:00 2001 From: Ahmad Fatoum Date: Tue, 4 Apr 2017 23:23:59 +0200 Subject: [PATCH] Add libxml2 as optional dependency This can be used by dissectors that need to parse out-of-band configuration. Change-Id: I13c0a2f408fb5c21bad7ab3d7971e0fa8ed7d783 Reviewed-on: https://code.wireshark.org/review/20912 Reviewed-by: Roland Knall --- CMakeLists.txt | 17 ++++ CMakeOptions.txt | 1 + cmake/modules/FindLibXml2.cmake | 108 ++++++++++++++++++++++++++ cmakeconfig.h.in | 3 + configure.ac | 22 ++++++ debian/control | 2 +- epan/CMakeLists.txt | 1 + epan/Makefile.am | 3 +- epan/dissectors/Makefile.am | 2 +- epan/epan.c | 20 +++++ macosx-setup.sh | 53 +++++++++++++ packaging/nsis/CMakeLists.txt | 2 +- packaging/rpm/SPECS/wireshark.spec.in | 13 ++++ packaging/wix/CMakeLists.txt | 4 +- tools/debian-setup.sh | 2 +- tools/macos-setup-brew.sh | 4 +- tools/win-setup.ps1 | 7 +- 17 files changed, 253 insertions(+), 11 deletions(-) create mode 100644 cmake/modules/FindLibXml2.cmake diff --git a/CMakeLists.txt b/CMakeLists.txt index 0c3997575d..11543733ec 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -875,6 +875,10 @@ if(ENABLE_SPANDSP) set(PACKAGELIST ${PACKAGELIST} SPANDSP) endif() +if(ENABLE_LIBXML2) + set(PACKAGELIST ${PACKAGELIST} LibXml2) +endif() + # Capabilities if(ENABLE_CAP) set(PACKAGELIST ${PACKAGELIST} CAP SETCAP) @@ -908,6 +912,8 @@ foreach(PACKAGE ${PACKAGELIST}) set(PACKAGE_VAR "GETTEXT") elseif(${PACKAGE} STREQUAL "Perl") set(PACKAGE_VAR "PERL") + elseif(${PACKAGE} STREQUAL "LibXml2") + set(PACKAGE_VAR "LIBXML2") else() set(PACKAGE_VAR ${PACKAGE}) endif() @@ -989,6 +995,9 @@ endif() if(SPANDSP_FOUND) set(HAVE_SPANDSP 1) endif() +if(LIBXML2_FOUND) + set(HAVE_LIBXML2 1) +endif() if(EXTCAP_ANDROIDDUMP_LIBPCAP) set(ANDROIDDUMP_USE_LIBPCAP 1) endif() @@ -1370,6 +1379,7 @@ include(FeatureSummary) #SET_FEATURE_INFO(NAME DESCRIPTION [URL [COMMENT] ]) SET_FEATURE_INFO(SBC "SBC Codec for Bluetooth A2DP stream playing" "http://git.kernel.org/cgit/bluetooth/sbc.git" ) SET_FEATURE_INFO(SPANDSP "Support for G.722 and G.726 codecs in RTP player" "http://www.soft-switch.org/" ) +SET_FEATURE_INFO(LIBXML2 "Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors" "http://xmlsoft.org/" ) SET_FEATURE_INFO(LIBSSH "libssh is library for ssh connections and it is needed to build sshdump/ciscodump" "https://www.libssh.org/get-it/" ) SET_FEATURE_INFO(LZ4 "LZ4 is lossless compression algorithm used in some protocol (CQL...)" "http://www.lz4.org" ) SET_FEATURE_INFO(SNAPPY "snappy is a fast compressor/decompressor from Google used in some protocol (CQL, kafka...)" "http://google.github.io/snappy/") @@ -1650,6 +1660,13 @@ if(WIN32) "${_dll_output_dir}" ) endif(SPANDSP_FOUND) + if (LIBXML2_FOUND) + add_custom_command(TARGET copy_cli_dlls PRE_BUILD + COMMAND ${CMAKE_COMMAND} -E copy_if_different + "${LIBXML2_DLL_DIR}/${LIBXML2_DLL}" + "${_dll_output_dir}" + ) + endif(LIBXML2_FOUND) if (SMI_FOUND) # Wireshark.nsi wants SMI_DIR which is the base SMI directory get_filename_component(SMI_DIR ${SMI_DLL_DIR} DIRECTORY) diff --git a/CMakeOptions.txt b/CMakeOptions.txt index 8c05d35890..233a706a2e 100644 --- a/CMakeOptions.txt +++ b/CMakeOptions.txt @@ -88,6 +88,7 @@ endif() option(ENABLE_KERBEROS "Build with Kerberos support" ON) option(ENABLE_SBC "Build with SBC Codec support in RTP Player" ON) option(ENABLE_SPANDSP "Build with G.722/G.726 codecs support in RTP Player" ON) +option(ENABLE_LIBXML2 "Build with libxml2 support" ON) # How to install set(DUMPCAP_INSTALL_OPTION "normal" CACHE STRING "Permissions to install") set(DUMPCAP_INST_VALS "normal" "suid" "capabilities") diff --git a/cmake/modules/FindLibXml2.cmake b/cmake/modules/FindLibXml2.cmake new file mode 100644 index 0000000000..fdaccd13e6 --- /dev/null +++ b/cmake/modules/FindLibXml2.cmake @@ -0,0 +1,108 @@ +# This code was copied from https://gitlab.kitware.com/cmake/cmake/raw/master/Modules/FindLibXml2.cmake +# and modified to support Wireshark Windows 3rd party packages + +#.rst: +# FindLibXml2 +# ----------- +# +# Try to find the LibXml2 xml processing library +# +# Once done this will define +# +# :: +# +# LIBXML2_FOUND - System has LibXml2 +# LIBXML2_INCLUDE_DIR - The LibXml2 include directory +# LIBXML2_LIBRARIES - The libraries needed to use LibXml2 +# LIBXML2_DEFINITIONS - Compiler switches required for using LibXml2 +# LIBXML2_XMLLINT_EXECUTABLE - The XML checking tool xmllint coming with LibXml2 +# LIBXML2_VERSION_STRING - the version of LibXml2 found (since CMake 2.8.8) +# +# :: Included for Wireshark build system +# LIBXML2_DLL_DIR - (Windows) Path to the libxml2 DLL. +# LIBXML2_DLL - (Windows) Name of the libxml2 DLL. + + +#============================================================================= +# Copyright 2006-2009 Kitware, Inc. +# Copyright 2006 Alexander Neundorf +# +# Distributed under the OSI-approved BSD License (the "License"); +# see accompanying file Copyright.txt for details. +# +# This software is distributed WITHOUT ANY WARRANTY; without even the +# implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. +# See the License for more information. +#============================================================================= +# (To distribute this file outside of CMake, substitute the full +# License text for the above reference.) + +# use pkg-config to get the directories and then use these values +# in the find_path() and find_library() calls +find_package(PkgConfig QUIET) +PKG_CHECK_MODULES(PC_LIBXML QUIET libxml-2.0) +set(LIBXML2_DEFINITIONS ${PC_LIBXML_CFLAGS_OTHER}) + +INCLUDE(FindWSWinLibs) +FindWSWinLibs("libxml2-.*" "LIBXML2_HINTS") + +find_path(LIBXML2_INCLUDE_DIR NAMES libxml/xpath.h + HINTS + ${PC_LIBXML_INCLUDEDIR} + ${PC_LIBXML_INCLUDE_DIRS} + "${LIBXML2_HINTS}/include" + PATH_SUFFIXES libxml2 + ) + +find_library(LIBXML2_LIBRARIES NAMES xml2 libxml2 libxml2-2 + HINTS + ${PC_LIBXML_LIBDIR} + ${PC_LIBXML_LIBRARY_DIRS} + "${LIBXML2_HINTS}/lib" + ) + +find_program(LIBXML2_XMLLINT_EXECUTABLE xmllint + HINTS + "${LIBXML2_HINTS}/bin" + ) +# for backwards compat. with KDE 4.0.x: +set(XMLLINT_EXECUTABLE "${LIBXML2_XMLLINT_EXECUTABLE}") + +if(PC_LIBXML_VERSION) + set(LIBXML2_VERSION_STRING ${PC_LIBXML_VERSION}) +elseif(LIBXML2_INCLUDE_DIR AND EXISTS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h") + file(STRINGS "${LIBXML2_INCLUDE_DIR}/libxml/xmlversion.h" libxml2_version_str + REGEX "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\".*\"") + + string(REGEX REPLACE "^#define[\t ]+LIBXML_DOTTED_VERSION[\t ]+\"([^\"]*)\".*" "\\1" + LIBXML2_VERSION_STRING "${libxml2_version_str}") + unset(libxml2_version_str) +endif() + +include(FindPackageHandleStandardArgs) +FIND_PACKAGE_HANDLE_STANDARD_ARGS(LibXml2 + REQUIRED_VARS LIBXML2_LIBRARIES LIBXML2_INCLUDE_DIR + VERSION_VAR LIBXML2_VERSION_STRING) + +# Included for Wireshark build system. If libxml2 was found, include direct +# paths to the DLLs for windows +if(WIN32) + if(LIBXML2_FOUND) + set ( LIBXML2_DLL_DIR "${LIBXML2_HINTS}/bin" + CACHE PATH "Path to Libxml2 DLL" + ) + file( GLOB _libxml2_dll RELATIVE "${LIBXML2_DLL_DIR}" + "${LIBXML2_DLL_DIR}/libxml2-*.dll" + ) + set ( LIBXML2_DLL ${_libxml2_dll} + # We're storing filenames only. Should we use STRING instead? + CACHE FILEPATH "Libxml2 DLL file name" + ) + mark_as_advanced( LIBXML2_DLL_DIR LIBXML2_DLL ) + else() + set( LIBXML2_DLL_DIR ) + set( LIBXML2_DLL ) + endif() +endif() + +mark_as_advanced(LIBXML2_INCLUDE_DIR LIBXML2_LIBRARIES LIBXML2_XMLLINT_EXECUTABLE) diff --git a/cmakeconfig.h.in b/cmakeconfig.h.in index 5147c7f1be..043c6ada08 100644 --- a/cmakeconfig.h.in +++ b/cmakeconfig.h.in @@ -303,6 +303,9 @@ /* Define to 1 if you have the SpanDSP library. */ #cmakedefine HAVE_SPANDSP 1 +/* Define to 1 if you have the lixbml2 library. */ +#cmakedefine HAVE_LIBXML2 1 + /* Define to 1 if you have the `setresgid' function. */ #cmakedefine HAVE_SETRESGID 1 diff --git a/configure.ac b/configure.ac index a552b322c4..29767774c1 100644 --- a/configure.ac +++ b/configure.ac @@ -2552,6 +2552,27 @@ else fi AM_CONDITIONAL(HAVE_SPANDSP, test "x$have_spandsp" = "xyes") +#` +# Libxml2 check +AC_ARG_WITH(libxml2, + AC_HELP_STRING([--with-libxml2=@<:@yes/no@:>@], + [Libxml2 is a XML C parser, which can be used for handling XML configuration in dissectors @<:@default=yes, if available@:>@]), + with_libxml2="$withval"; want_libxml2="yes", with_libxml2="yes") + +PKG_CHECK_MODULES(LIBXML2, libxml-2.0, [have_libxml2=yes], [have_libxml2=no]) +if test "x$with_libxml2" != "xno"; then + if (test "${have_libxml2}" = "yes"); then + AC_DEFINE(HAVE_LIBXML2, 1, [Define if you have libxml2]) + elif test "x$want_libxml2" = "xyes"; then + # Error out if the user explicitly requested libxml2 + AC_MSG_ERROR([Libxml2 was requested, but is not available]) + fi +else + have_libxml2=no +fi +AM_CONDITIONAL(HAVE_LIBXML2, test "x$have_libxml2" = "xyes") + + dnl dnl check whether plugins should be enabled and, if they should be, dnl check for plugins directory - stolen from Amanda's configure.ac @@ -3171,6 +3192,7 @@ echo " Have ssh_userauth_agent : $ssh_userauth_agent_message" echo " Use nl library : $libnl_message" echo " Use SBC codec library : $have_sbc" echo " Use SpanDSP library : $have_spandsp" +echo " Use libxml2 library : $have_libxml2" echo " Use nghttp2 library : $nghttp2_message" echo " Use LZ4 library : $have_lz4" echo " Use Snappy library : $have_snappy" diff --git a/debian/control b/debian/control index 9e1cf5b04d..ec6bd7153e 100644 --- a/debian/control +++ b/debian/control @@ -22,7 +22,7 @@ Build-Depends: libgtk-3-dev, lsb-release, libgeoip-dev, dpkg-dev (>= 1.16.1~), imagemagick, xdg-utils, libnl-genl-3-dev [linux-any], libnl-route-3-dev [linux-any], asciidoc, cmake (>= 2.8.8), w3m, libsbc-dev, libnghttp2-dev, libssh-gcrypt-dev, - liblz4-dev, libsnappy-dev, libspandsp-dev + liblz4-dev, libsnappy-dev, libspandsp-dev, libxml2-dev Build-Conflicts: libsnmp4.2-dev, libsnmp-dev Vcs-Svn: svn://svn.debian.org/svn/collab-maint/ext-maint/wireshark/trunk Vcs-Browser: http://svn.debian.org/wsvn/collab-maint/ext-maint/wireshark/trunk/ diff --git a/epan/CMakeLists.txt b/epan/CMakeLists.txt index 3c1f014cd7..4ebc03f60e 100644 --- a/epan/CMakeLists.txt +++ b/epan/CMakeLists.txt @@ -205,6 +205,7 @@ set(epan_LIBS ${SMI_LIBRARIES} ${SNAPPY_LIBRARIES} ${WIN_PSAPI_LIBRARY} + ${LIBXML2_LIBRARIES} ) set(CLEAN_FILES diff --git a/epan/Makefile.am b/epan/Makefile.am index 24df231fe3..1b9878fd8b 100644 --- a/epan/Makefile.am +++ b/epan/Makefile.am @@ -40,7 +40,7 @@ DIST_SUBDIRS = $(SUBDIRS) $(wslua_dist_dir) AM_CPPFLAGS = $(INCLUDEDIRS) -I$(builddir)/wslua $(WS_CPPFLAGS) \ $(GLIB_CFLAGS) $(LUA_CFLAGS) $(LIBGNUTLS_CFLAGS) \ $(LIBGCRYPT_CFLAGS) $(LIBSMI_CFLAGS) $(LIBGEOIP_CFLAGS) \ - $(LZ4_CFLAGS) $(KRB5_CFLAGS) $(SNAPPY_CFLAGS) + $(LZ4_CFLAGS) $(KRB5_CFLAGS) $(SNAPPY_CFLAGS) $(LIBXML2_CFLAGS) noinst_LTLIBRARIES = libwireshark_generated.la libwireshark_asmopt.la lib_LTLIBRARIES = libwireshark.la @@ -336,6 +336,7 @@ libwireshark_la_LIBADD = \ @NGHTTP2_LIBS@ \ @SSL_LIBS@ \ @SNAPPY_LIBS@ \ + @LIBXML2_LIBS@ \ @GLIB_LIBS@ libwireshark_la_DEPENDENCIES = \ diff --git a/epan/dissectors/Makefile.am b/epan/dissectors/Makefile.am index b74e9c3789..7cd515358b 100644 --- a/epan/dissectors/Makefile.am +++ b/epan/dissectors/Makefile.am @@ -22,7 +22,7 @@ include $(top_srcdir)/Makefile.am.inc AM_CPPFLAGS = $(INCLUDEDIRS) -I$(top_srcdir)/epan $(WS_CPPFLAGS) \ $(GLIB_CFLAGS) $(LIBGNUTLS_CFLAGS) $(LIBGCRYPT_CFLAGS) \ - $(KRB5_CFLAGS) + $(KRB5_CFLAGS) $(LIBXML2_CFLAGS) include Custom.common diff --git a/epan/epan.c b/epan/epan.c index 75ff54214b..e3a3ae85d1 100644 --- a/epan/epan.c +++ b/epan/epan.c @@ -84,6 +84,11 @@ #include #endif +#ifdef HAVE_LIBXML2 +#include +#include +#endif + static wmem_allocator_t *pinfo_pool_cache = NULL; const gchar* @@ -166,6 +171,10 @@ epan_init(void (*register_all_protocols_func)(register_cb cb, gpointer client_da gcry_control (GCRYCTL_INITIALIZATION_FINISHED, 0); #ifdef HAVE_LIBGNUTLS gnutls_global_init(); +#endif +#ifdef HAVE_LIBXML2 + xmlInitParser(); + LIBXML_TEST_VERSION; #endif TRY { tap_init(); @@ -253,6 +262,9 @@ epan_cleanup(void) #endif #ifdef HAVE_LIBGNUTLS gnutls_global_deinit(); +#endif +#ifdef HAVE_LIBXML2 + xmlCleanupParser(); #endif except_deinit(); addr_resolv_cleanup(); @@ -677,6 +689,14 @@ epan_get_compiled_version_info(GString *str) g_string_append(str, "without Snappy"); #endif /* HAVE_SNAPPY */ + /* libxml2 */ + g_string_append(str, ", "); +#ifdef HAVE_LIBXML2 + g_string_append(str, "with libxml2 " LIBXML_DOTTED_VERSION); +#else + g_string_append(str, "without libxml2"); +#endif /* HAVE_LIBXML2 */ + } /* diff --git a/macosx-setup.sh b/macosx-setup.sh index e3302fd3ef..72a64d6ab8 100755 --- a/macosx-setup.sh +++ b/macosx-setup.sh @@ -136,6 +136,7 @@ GNUTLS_VERSION=2.12.19 LUA_VERSION=5.2.4 PORTAUDIO_VERSION=pa_stable_v19_20111121 SNAPPY_VERSION=1.1.3 +LIBXML2_VERSION=2.9.4 LZ4_VERSION=r131 SBC_VERSION=1.3 GEOIP_VERSION=1.6.10 @@ -227,6 +228,41 @@ uninstall_snappy() { fi } +install_libxml2() { + if [ "$LIBXML2_VERSION" -a ! -f libxml2-$LIBXML2_VERSION-done ] ; then + echo "Downloading, building, and installing libxml2:" + [ -f libxml2-$LIBXML2_VERSION.tar.gz ] || curl -L -O ftp://xmlsoft.org/libxml2/libxml2-$LIBXML2_VERSION.tar.gz || exit 1 + gzcat libxml2-$LIBXML2_VERSION.tar.gz | tar xf - || exit 1 + cd libxml2-$LIBXML2_VERSION + CFLAGS="$CFLAGS -D_FORTIFY_SOURCE=0" ./configure || exit 1 + make $MAKE_BUILD_OPTS || exit 1 + $DO_MAKE_INSTALL || exit 1 + cd .. + touch libxml2-$LIBXML2_VERSION-done + fi +} + +uninstall_libxml2() { + if [ ! -z "$installed_libxml2_version" ] ; then + echo "Uninstalling libxml2:" + cd libxml2-$installed_libxml2_version + $DO_MAKE_UNINSTALL || exit 1 + make distclean || exit 1 + cd .. + rm libxml2-$installed_libxml2_version-done + + if [ "$#" -eq 1 -a "$1" = "-r" ] ; then + # + # Get rid of the previously downloaded and unpacked version. + # + rm -rf libxml2-$installed_libxml2_version + rm -rf libxml2-$installed_libxml2_version.tar.gz + fi + + installed_libxml2_version="" + fi +} + install_lz4() { if [ "$LZ4_VERSION" -a ! -f lz4-$LZ4_VERSION-done ] ; then echo "Downloading, building, and installing lz4:" @@ -1685,6 +1721,18 @@ install_all() { uninstall_snappy -r fi + if [ ! -z "$installed_libxml2_version" -a \ + "$installed_libxml2_version" != "$LIBXML2_VERSION" ] ; then + echo "Installed libxml2 version is $installed_libxml2_version" + if [ -z "$LIBXML2_VERSION" ] ; then + echo "libxml2 is not requested" + else + echo "Requested libxml2 version is $LIBXML2_VERSION" + fi + uninstall_libxml2 -r + fi + + if [ ! -z "$installed_sbc_version" -a \ "$installed_sbc_version" != "$SBC_VERSION" ] ; then echo "Installed SBC version is $installed_sbc_version" @@ -2060,6 +2108,8 @@ install_all() { install_snappy + install_libxml2 + install_lz4 install_sbc @@ -2099,6 +2149,8 @@ uninstall_all() { uninstall_snappy + uninstall_libxml2 + uninstall_lz4 uninstall_sbc @@ -2250,6 +2302,7 @@ then installed_lua_version=`ls lua-*-done 2>/dev/null | sed 's/lua-\(.*\)-done/\1/'` installed_portaudio_version=`ls portaudio-*-done 2>/dev/null | sed 's/portaudio-\(.*\)-done/\1/'` installed_snappy_version=`ls snappy-*-done 2>/dev/null | sed 's/snappy-\(.*\)-done/\1/'` + installed_libxml2_version=`ls libxml2-*-done 2>/dev/null | sed 's/libxml2-\(.*\)-done/\1/'` installed_lz4_version=`ls lz4-*-done 2>/dev/null | sed 's/lz4-\(.*\)-done/\1/'` installed_sbc_version=`ls sbc-*-done 2>/dev/null | sed 's/sbc-\(.*\)-done/\1/'` installed_geoip_version=`ls geoip-*-done 2>/dev/null | sed 's/geoip-\(.*\)-done/\1/'` diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt index 9c78f088bb..19628ef344 100644 --- a/packaging/nsis/CMakeLists.txt +++ b/packaging/nsis/CMakeLists.txt @@ -132,7 +132,7 @@ set(_all_manifest_contents "# Files required for all sections. Generated by CMak foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} - ${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} + ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ) set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n") endforeach() diff --git a/packaging/rpm/SPECS/wireshark.spec.in b/packaging/rpm/SPECS/wireshark.spec.in index 0e86bad483..48a295d9c7 100644 --- a/packaging/rpm/SPECS/wireshark.spec.in +++ b/packaging/rpm/SPECS/wireshark.spec.in @@ -13,6 +13,7 @@ %global with_c_ares 1 %global with_portaudio 0 %global with_spandsp 0 +%global with_libxml2 1 %global with_nghttp2 1 %global with_extcap 1 @@ -240,6 +241,10 @@ Requires: portaudio BuildRequires: spandsp-devel Requires: spandsp %endif +%if %{with_libxml2} +BuildRequires: libxml2-devel +Requires: libxml2 +%endif # Uncomment these if you want to be sure you get them... #BuildRequires: GeoIP-devel @@ -277,6 +282,11 @@ This package contains the GTK+ Wireshark GUI and desktop integration files. %if %{with_spandsp} --with-spandsp \ %endif +%if %{with_libxml2} + --with-libxml2 \ +%else + --without-libxml2 \ +%endif %if %{with_extcap} --with-extcap \ %else @@ -476,6 +486,9 @@ fi %endif %changelog +* Tue Apr 4 2017 Ahmad Fatoum +- Added libxml2 (as an option, defaulting to required). + * Tue Dec 20 2016 Anders Broman - Add with extcap (as an option, defaulting to yes). diff --git a/packaging/wix/CMakeLists.txt b/packaging/wix/CMakeLists.txt index ca37d94ed6..49691d3f4b 100644 --- a/packaging/wix/CMakeLists.txt +++ b/packaging/wix/CMakeLists.txt @@ -124,7 +124,7 @@ SET(unique_component "") foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} - ${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} + ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ) #ensure uniqueness of files IF(NOT "${unique_component}" MATCHES "(^|;)${_dll}(;|$)") @@ -149,7 +149,7 @@ SET(unique_file "") foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL} ${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL} ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL} - ${SPANDSP_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} + ${SPANDSP_DLL} ${LIBXML2_DLL} ${WINSPARKLE_DLL} ${ZLIB_DLL} ) #ensure uniqueness of files IF(NOT "${unique_file}" MATCHES "(^|;)${_dll}(;|$)") diff --git a/tools/debian-setup.sh b/tools/debian-setup.sh index 932aa78fc6..5118f61f4a 100755 --- a/tools/debian-setup.sh +++ b/tools/debian-setup.sh @@ -41,7 +41,7 @@ ADDITIONAL_LIST="libnl-3-dev qttools5-dev qttools5-dev-tools libgtk-3-dev \ portaudio19-dev asciidoc libgcrypt-dev libsbc-dev libgeoip-dev \ qtmultimedia5-dev liblua5.2-dev libnl-cli-3-dev \ libparse-yapp-perl qt5-default cmake libcap-dev \ - liblz4-dev libsnappy-dev libspandsp-dev" + liblz4-dev libsnappy-dev libspandsp-dev libxml2-dev" # Adds package $2 to list variable $1 if the package is found add_package() { diff --git a/tools/macos-setup-brew.sh b/tools/macos-setup-brew.sh index ca1aacd18c..0d898a0761 100755 --- a/tools/macos-setup-brew.sh +++ b/tools/macos-setup-brew.sh @@ -24,8 +24,8 @@ #Update to last brew release brew update -#install some lib need by Wireshark -brew install c-ares glib libgcrypt gnutls lua cmake nghttp2 snappy lz4 +#install some libs needed by Wireshark +brew install c-ares glib libgcrypt gnutls lua cmake nghttp2 snappy lz4 libxml2 #install Qt5 brew install qt5 diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1 index 56f735365d..d5de17df01 100644 --- a/tools/win-setup.ps1 +++ b/tools/win-setup.ps1 @@ -99,8 +99,8 @@ Param( # trouble instead of trying to catch exceptions everywhere. $ErrorActionPreference = "Stop" -$Win64CurrentTag = "2017-04-14" -$Win32CurrentTag = "2017-04-14" +$Win64CurrentTag = "2017-04-18" +$Win32CurrentTag = "2017-04-18" # Archive file / subdir. $Win64Archives = @{ @@ -113,6 +113,7 @@ $Win64Archives = @{ "libgcrypt-1.7.6-win64ws.zip" = ""; "libsmi-svn-40773-win64ws.zip" = ""; "libssh-0.7.3-1-win64ws.zip" = ""; + "libxml2-2.9.4-win64ws.zip" = ""; "lua-5.2.4_Win64_dllw4_lib.zip" = "lua5.2.4"; "lz4-r131-1-win64ws.zip" = ""; "nasm-2.09.08-win32.zip" = ""; @@ -137,6 +138,7 @@ $Win32Archives = @{ "libgcrypt-1.7.6-win32ws.zip" = ""; "libsmi-svn-40773-win32ws.zip" = ""; "libssh-0.7.3-1-win32ws.zip" = ""; + "libxml2-2.9.4-win32ws.zip" = ""; "lua-5.2.4_Win32_dllw4_lib.zip" = "lua5.2.4"; "lz4-r131-1-win32ws.zip" = ""; "nasm-2.09.08-win32.zip" = ""; @@ -188,6 +190,7 @@ $CleanupItems = @( "libsmi-0.4.8" "libsmi-svn-40773-win??ws" "libssh-0.7.?-win??ws" + "libxml2-*-win??ws" "lua5.1.4" "lua5.2.?" "lz4-r131-win??ws"