Commit 28bbd565 authored by Pascal Quantin's avatar Pascal Quantin Committed by Anders Broman

Add SBC decoding support to Windows

Change-Id: Ibef872dff26c22e2834e958c496c33a5695bb131
Reviewed-on: https://code.wireshark.org/review/18394Reviewed-by: 's avatarPascal Quantin <pascal.quantin@gmail.com>
Petri-Dish: Pascal Quantin <pascal.quantin@gmail.com>
Tested-by: 's avatarPetri Dish Buildbot <buildbot-no-reply@wireshark.org>
Reviewed-by: 's avatarAnders Broman <a.broman58@gmail.com>
parent a2d49125
......@@ -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)
......
......@@ -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 )
......
......@@ -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")
......
......@@ -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
......
......@@ -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"
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment