From a5e0be51df50e0e8a8f3091413aa036847282369 Mon Sep 17 00:00:00 2001 From: Gerald Combs Date: Fri, 10 Nov 2023 11:59:32 -0800 Subject: [PATCH] Windows: Upgrade Minizip to 1.3 --- CMakeLists.txt | 10 +++++++--- cmake/modules/FindMinizip.cmake | 22 ++++++++++++++++++++++ tools/win-setup.ps1 | 4 ++-- 3 files changed, 31 insertions(+), 5 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ef3e9a435e..6a7906dd61 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -2210,9 +2210,10 @@ if(USE_REPOSITORY) list (APPEND THIRD_PARTY_DLLS "${LZ4_DLL_DIR}/${LZ4_DLL}") list (APPEND THIRD_PARTY_PDBS "${LZ4_DLL_DIR}/${LZ4_PDB}") endif(LZ4_FOUND) - if (ZSTD_FOUND) - list (APPEND THIRD_PARTY_DLLS "${ZSTD_DLL_DIR}/${ZSTD_DLL}") - endif(ZSTD_FOUND) + if (MINIZIP_FOUND) + list (APPEND THIRD_PARTY_DLLS "${MINIZIP_DLL_DIR}/${MINIZIP_DLL}") + list (APPEND THIRD_PARTY_PDBS "${MINIZIP_DLL_DIR}/${MINIZIP_PDB}") + endif() if (NGHTTP2_FOUND) list (APPEND THIRD_PARTY_DLLS "${NGHTTP2_DLL_DIR}/${NGHTTP2_DLL}") list (APPEND THIRD_PARTY_PDBS "${NGHTTP2_DLL_DIR}/${NGHTTP2_PDB}") @@ -2306,6 +2307,9 @@ if(USE_REPOSITORY) if (SPEEXDSP_FOUND) list (APPEND THIRD_PARTY_DLLS "${SPEEXDSP_DLL_DIR}/${SPEEXDSP_DLL}") endif() + if (ZSTD_FOUND) + list (APPEND THIRD_PARTY_DLLS "${ZSTD_DLL_DIR}/${ZSTD_DLL}") + endif() # With libs downloaded to c:/wireshark-x64-libs this currently # (early 2018) expands to about 1900 characters. diff --git a/cmake/modules/FindMinizip.cmake b/cmake/modules/FindMinizip.cmake index 9cfa28e581..b6d9c8673c 100644 --- a/cmake/modules/FindMinizip.cmake +++ b/cmake/modules/FindMinizip.cmake @@ -4,6 +4,8 @@ # MINIZIP_INCLUDE_DIRS - where to find minizip headers. # MINIZIP_LIBRARIES - List of libraries when using minizip. # MINIZIP_FOUND - True if minizip is found. +# MINIZIP_DLL_DIR - (Windows) Path to the minizip DLL. +# MINIZIP_DLL - (Windows) Name of the minizip DLL. FindWSWinLibs( "minizip-*" "MINIZIP_HINTS" ) @@ -50,9 +52,29 @@ if(MINIZIP_FOUND) # for renamed struct members to avoid an endless game of whack-a-mole. include(CheckStructHasMember) check_struct_has_member("zip_fileinfo" "dos_date" "minizip/zip.h" HAVE_MZCOMPAT_DOS_DATE) + if (WIN32) + set ( MINIZIP_DLL_DIR "${MINIZIP_HINTS}/bin" + CACHE PATH "Path to Minizip DLL" + ) + file( GLOB _minizip_dll RELATIVE "${MINIZIP_DLL_DIR}" + "${MINIZIP_DLL_DIR}/minizip.dll" + ) + set ( MINIZIP_DLL ${_minizip_dll} + CACHE FILEPATH "Minizip DLL file name" + ) + file( GLOB _minizip_pdb RELATIVE "${MINIZIP_DLL_DIR}" + "${MINIZIP_DLL_DIR}/minizip.pdb" + ) + set ( MINIZIP_PDB ${_minizip_pdb} + CACHE FILEPATH "Minizip PDB file name" + ) + mark_as_advanced( MINIZIP_DLL_DIR MINIZIP_DLL MINIZIP_PDB ) + endif() else() set(MINIZIP_LIBRARIES) set(MINIZIP_INCLUDE_DIRS) + SET( MINIZIP_DLL_DIR ) + SET( MINIZIP_DLL ) endif() mark_as_advanced(MINIZIP_LIBRARIES MINIZIP_INCLUDE_DIRS) diff --git a/tools/win-setup.ps1 b/tools/win-setup.ps1 index a3c059502a..3f729fb8ad 100644 --- a/tools/win-setup.ps1 +++ b/tools/win-setup.ps1 @@ -85,7 +85,7 @@ $X64Archives = @{ "libssh/libssh-0.10.5-1-x64-mingw-dynamic-ws.zip" = "9c1410d1033a540d118e17938905144956291b4c6ca7a9b7af6959b2632a1aaa"; "lua/lua-5.2.4-unicode-win64-vc14.zip" = "e8968d2c7871ce1ea82cbd29ac1b3a2c59d3dec25e483c5e12de85df66f5d928"; "lz4/lz4-1.9.3-1-win64ws.zip" = "7129515893ffdc439f4ffe9673c4bc43f9042e910bb2607e68dde6b99a1ab058"; - "minizip/minizip-1.2.11-4-win64ws.zip" = "dd6bf24e2d946465ad19aa4f8c38e0db91da6585887935de68011982cd6fb2cb"; + "minizip/minizip-1.3-1-x64-windows-ws.zip" = "eb0bb5fffda5328e192d0d7951ff0254e64dcd736d46909fde7db792c1c53bcc"; "nghttp2/nghttp2-1.57.0-1-x64-windows-ws.zip" = "94afb12d63d0830dc25e5605c30a6a91fe1f7284c1e6ddfff177d961d5b52bbd"; "nghttp3/nghttp3-1.0.0-1-x64-windows-ws.zip" = "219a0024b79627c00fa1c134085678edbfac72b7b5eaf45db84f36e2553e1638"; "opus/opus-1.3.1-3-win64ws.zip" = "1f7a55a6d2d7215dffa4a43bca8ca05024bd4ba1ac3d0d0c405fd38b09cc2205"; @@ -112,7 +112,7 @@ $Arm64Archives = @{ "libssh/libssh-0.10.5-1-arm64-mingw-dynamic-ws.zip" = "b99c9573d9a30ba2898ce6ac131b23b1699009761d5dbe351a1a958cca0f85ca"; "lua/lua-5.2.4-unicode-arm64-windows-vc17.zip" = "5848e23352e35b69f4cdabaca3754c2c5fb11e5461bb92b71e059e558e4b2d12"; "lz4/lz4-1.9.4-1-win64armws.zip" = "59a3ed3f9161be7614a89afd2ca21c43f26dd916afd4aa7bfdc4b148fb10d485"; - "minizip/minizip-1.2.13-1-win64armws.zip" = "b1e79d8feb01b89cebc1e9fed7765d29f5eb412d11bfcf07217fb645863deb2c"; + "minizip/minizip-1.3-1-arm64-windows-ws.zip" = "e5b35d064ff10f1ab1ee9193a0965fd1eb3d1e16eab5a905ab3fea9b14fb5afe"; "nghttp2/nghttp2-1.57.0-1-arm64-windows-ws.zip" = "3f264dc0ccb48850e07ec136dede5b0ad0e39e31ff2d2e6ab215348ce2d9e570"; "nghttp3/nghttp3-1.0.0-1-arm64-windows-ws.zip" = "cf53090b514d3193d75b81562235ae1e7a8a9d462e37f515f9a9a29c6b469236"; "opus/opus-1.4-1-win64armws.zip" = "51d10381360d5691b2022dde5b284266d9b0ce9a3c9bd7e86f9a4ff1a4f7d904";