aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPascal Quantin <pascal.quantin@gmail.com>2016-10-22 18:15:51 +0200
committerAnders Broman <a.broman58@gmail.com>2016-10-22 17:35:54 +0000
commit28bbd565917d59b20458e5de783096bc332c1965 (patch)
treed8fcd14b2eabbafe0f2fd0b63450e0e33f37bbd9
parenta2d49125a52e0eb21215368a7e1f248b6d4a6c06 (diff)
Add SBC decoding support to Windows
Change-Id: Ibef872dff26c22e2834e958c496c33a5695bb131 Reviewed-on: https://code.wireshark.org/review/18394 Reviewed-by: Pascal Quantin <pascal.quantin@gmail.com> Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com> Tested-by: Petri Dish Buildbot <buildbot-no-reply@wireshark.org> Reviewed-by: Anders Broman <a.broman58@gmail.com>
-rw-r--r--CMakeLists.txt7
-rw-r--r--cmake/modules/FindSBC.cmake17
-rw-r--r--packaging/nsis/CMakeLists.txt2
-rw-r--r--packaging/wix/CMakeLists.txt4
-rw-r--r--tools/win-setup.ps17
5 files changed, 31 insertions, 6 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index d050a51861..5438b8e7c9 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1586,6 +1586,13 @@ if(WIN32)
"${_dll_output_dir}"
)
endif(NGHTTP2_FOUND)
+ if (SBC_FOUND)
+ add_custom_command(TARGET copy_cli_dlls PRE_BUILD
+ COMMAND ${CMAKE_COMMAND} -E copy_if_different
+ "${SBC_DLL_DIR}/${SBC_DLL}"
+ "${_dll_output_dir}"
+ )
+ endif(SBC_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/cmake/modules/FindSBC.cmake b/cmake/modules/FindSBC.cmake
index 00ed88d66e..f361226a08 100644
--- a/cmake/modules/FindSBC.cmake
+++ b/cmake/modules/FindSBC.cmake
@@ -3,9 +3,11 @@
# SBC_INCLUDE_DIRS - where to find sbc.h
# SBC_LIBRARIES - List of libraries when using SBC
# SBC_FOUND - True if SBC found
+# SBC_DLL_DIR - (Windows) Path to the SBC DLL
+# SBC_DLL - (Windows) Name of the SBC DLL
include( FindWSWinLibs )
-FindWSWinLibs( "sbc" "SBC_HINTS" )
+FindWSWinLibs( "sbc-.*" "SBC_HINTS" )
find_path( SBC_INCLUDE_DIR
NAMES
@@ -27,6 +29,19 @@ find_package_handle_standard_args( SBC DEFAULT_MSG SBC_INCLUDE_DIR SBC_LIBRARY )
if( SBC_FOUND )
set( SBC_INCLUDE_DIRS ${SBC_INCLUDE_DIR} )
set( SBC_LIBRARIES ${SBC_LIBRARY} )
+ if (WIN32)
+ set ( SBC_DLL_DIR "${SBC_HINTS}/bin"
+ CACHE PATH "Path to SBC DLL"
+ )
+ file( GLOB _sbc_dll RELATIVE "${SBC_DLL_DIR}"
+ "${SBC_DLL_DIR}/libsbc-*.dll"
+ )
+ set ( SBC_DLL ${_sbc_dll}
+ # We're storing filenames only. Should we use STRING instead?
+ CACHE FILEPATH "SBC DLL file name"
+ )
+ mark_as_advanced( SBC_DLL_DIR SBC_DLL )
+ endif()
else()
set( SBC_INCLUDE_DIRS )
set( SBC_LIBRARIES )
diff --git a/packaging/nsis/CMakeLists.txt b/packaging/nsis/CMakeLists.txt
index 1fcec3f496..1fe07dfd1d 100644
--- a/packaging/nsis/CMakeLists.txt
+++ b/packaging/nsis/CMakeLists.txt
@@ -131,7 +131,7 @@ set(_all_manifest "${CMAKE_CURRENT_BINARY_DIR}/all-manifest.nsh")
set(_all_manifest_contents "# Files required for all sections. Generated by CMake.\n")
foreach(_dll ${GLIB2_DLLS} ${CARES_DLL} ${GCRYPT_DLLS} ${GEOIP_DLL}
${GNUTLS_DLLS} ${KERBEROS_DLLS} ${LIBSSH_DLL} ${LUA_DLL}
- ${LZ4_DLL} ${NGHTTP2_DLL} ${SMI_DLL} ${SNAPPY_DLL}
+ ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${WINSPARKLE_DLL} ${ZLIB_DLL}
)
set(_all_manifest_contents "${_all_manifest_contents}File \"\${STAGING_DIR}\\${_dll}\"\n")
diff --git a/packaging/wix/CMakeLists.txt b/packaging/wix/CMakeLists.txt
index 99b3ecdea1..56893a78fd 100644
--- a/packaging/wix/CMakeLists.txt
+++ b/packaging/wix/CMakeLists.txt
@@ -123,7 +123,7 @@ file(APPEND "${_all_manifest_wix}" " <DirectoryRef Id=\"INSTALLFOLDER\">\n")
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} ${SMI_DLL} ${SNAPPY_DLL}
+ ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${WINSPARKLE_DLL} ${ZLIB_DLL}
)
#ensure uniqueness of files
@@ -148,7 +148,7 @@ file(APPEND "${_all_manifest_wix}" " <ComponentGroup Id=\"CG.RequiredDependen
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} ${SMI_DLL} ${SNAPPY_DLL}
+ ${LZ4_DLL} ${NGHTTP2_DLL} ${SBC_DLL} ${SMI_DLL} ${SNAPPY_DLL}
${WINSPARKLE_DLL} ${ZLIB_DLL}
)
#ensure uniqueness of files
diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1
index d205a48cff..63e57325bf 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 = "2016-10-17"
-$Win32CurrentTag = "2016-10-17"
+$Win64CurrentTag = "2016-10-22"
+$Win32CurrentTag = "2016-10-22"
# Archive file / subdir.
$Win64Archives = @{
@@ -117,6 +117,7 @@ $Win64Archives = @{
"nasm-2.09.08-win32.zip" = "";
"nghttp2-1.14.0-win64ws.zip" = "";
"portaudio_v19_2.zip" = "";
+ "sbc-1.3-win64ws.zip" = "";
"snappy-1.1.3-win64ws.zip" = "";
"upx303w.zip" = "";
"WinSparkle-0.3-44-g2c8d9d3-win64ws.zip" = "";
@@ -138,6 +139,7 @@ $Win32Archives = @{
"nasm-2.09.08-win32.zip" = "";
"nghttp2-1.14.0-win32ws.zip" = "";
"portaudio_v19_2.zip" = "";
+ "sbc-1.3-win32ws.zip" = "";
"snappy-1.1.3-win32ws.zip" = "";
"upx303w.zip" = "";
"WinSparkle-0.3-44-g2c8d9d3-win32ws.zip" = "";
@@ -187,6 +189,7 @@ $CleanupItems = @(
"nghttp2-*-win??ws"
"portaudio_v19"
"portaudio_v19_2"
+ "sbc-1.3-win??ws"
"snappy-1.1.3-win??ws"
"upx301w"
"upx303w"