From 00d77b7cf69e495214bf37e3223e71b510a95a4e Mon Sep 17 00:00:00 2001 From: Ofek Shaked Date: Thu, 29 Aug 2024 11:19:51 +0300 Subject: [PATCH 1/2] Add release for Wireshark 4.4.0 Disable newly added minizipng for github actions builds because it requires bcrypt which is not found and seems to be a hassle to install. This has no effect on the built plugins. --- .github/actions/install-wireshark-headers-windows/action.yml | 2 +- .github/workflows/pr.yml | 2 +- .github/workflows/release.yml | 2 +- scripts/cmake.bat | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/actions/install-wireshark-headers-windows/action.yml b/.github/actions/install-wireshark-headers-windows/action.yml index 3c6d8f6..5bbd633 100644 --- a/.github/actions/install-wireshark-headers-windows/action.yml +++ b/.github/actions/install-wireshark-headers-windows/action.yml @@ -8,7 +8,7 @@ runs: cd build set WIRESHARK_BASE_DIR=..\ set WIRESHARK_QT6_PREFIX_PATH=$QT_ROOT_DIR - cmake -G "Visual Studio 17 2022" -A x64 ..\wireshark + cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_MINIZIPNG=Off ..\wireshark shell: cmd - name: Install headers run: | diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index 0f456fd..bb09f59 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -11,7 +11,7 @@ jobs: matrix: # macos-14 is ARM64, macos-13 is x86-64 os: [ubuntu-latest, macos-14, macos-13, windows-latest] - wireshark_version: [wireshark-4.2.6] + wireshark_version: [wireshark-4.2.6, wireshark-4.4.0] include: # Ubuntu 22.04 Wireshark package version - os: ubuntu-latest diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 357fde4..0f3cb24 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -36,7 +36,7 @@ jobs: matrix: # macos-14 is ARM64, macos-13 is x86-64 os: [ubuntu-latest, macos-14, macos-13, windows-latest] - wireshark_version: [wireshark-4.2.6] + wireshark_version: [wireshark-4.2.6, wireshark-4.4.0] include: # Ubuntu 22.04 Wireshark package version - os: ubuntu-latest diff --git a/scripts/cmake.bat b/scripts/cmake.bat index e3fd110..28ba3dd 100644 --- a/scripts/cmake.bat +++ b/scripts/cmake.bat @@ -15,9 +15,9 @@ pushd build rem Wireshark changed DISABLE_WERROR to ENABLE_WERROR at some point. Use both for compatibility (even though it causes a cmake warning to be thrown) if "%WERROR%"=="y" ( - cmake -G "Visual Studio 17 2022" -A x64 -DTRACEESHARK_VERSION=%TRACEESHARK_VERSION% -DENABLE_CCACHE=Yes -DENABLE_WERROR=ON -DDISABLE_WERROR=OFF ..\wireshark + cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_MINIZIPNG=Off -DTRACEESHARK_VERSION=%TRACEESHARK_VERSION% -DENABLE_CCACHE=Yes -DENABLE_WERROR=ON -DDISABLE_WERROR=OFF ..\wireshark ) else ( - cmake -G "Visual Studio 17 2022" -A x64 -DTRACEESHARK_VERSION=%TRACEESHARK_VERSION% -DENABLE_CCACHE=Yes -DENABLE_WERROR=OFF -DDISABLE_WERROR=OFF ..\wireshark + cmake -G "Visual Studio 17 2022" -A x64 -DENABLE_MINIZIPNG=Off -DTRACEESHARK_VERSION=%TRACEESHARK_VERSION% -DENABLE_CCACHE=Yes -DENABLE_WERROR=OFF -DDISABLE_WERROR=OFF ..\wireshark ) popd From 02bb708b091913cb9b993594bd7dabb2fbaa7c31 Mon Sep 17 00:00:00 2001 From: Ofek Shaked Date: Thu, 29 Aug 2024 16:37:26 +0300 Subject: [PATCH 2/2] Fix: Windows install script used incorrect install path logic There was a brief period in Wireshark 4.3 (development version) where they abolished the versioned plugin folders. This problemtatic logic accounted for this even though they got rid of this change. --- dist/install.ps1 | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) diff --git a/dist/install.ps1 b/dist/install.ps1 index d30f071..9876922 100644 --- a/dist/install.ps1 +++ b/dist/install.ps1 @@ -1,26 +1,3 @@ -function Version-LessThan { - param ( - [string]$version1, - [string]$version2 - ) - - $version1Parts = $version1.Split('.') - $version2Parts = $version2.Split('.') - - $major1 = [int]$version1Parts[0] - $minor1 = [int]$version1Parts[1] - - $major2 = [int]$version2Parts[0] - $minor2 = [int]$version2Parts[1] - - if ($major1 -lt $major2 -or ($major1 -eq $major2 -and $minor1 -lt $minor2)) { - return $true - } - else { - return $false - } -} - $wsVersionWanted = (Get-Content -Path "ws_version.txt" | Select-String -Pattern "\d+\.\d+\.\d+" -AllMatches).Matches.Value if (Get-Command "wireshark" -ErrorAction SilentlyContinue) { @@ -59,12 +36,7 @@ New-Item -Path "$wsPersonalDir\profiles" -ItemType Directory -Force | Out-Null Copy-Item -Path "profiles\Tracee" -Destination "$wsPersonalDir\profiles" -Recurse -Force Write-Output "[*] Installed profile to $wsPersonalDir\profiles\Tracee" -if (Version-LessThan -version1 $wsShortVersion -version2 "4.3") { - $wsPluginsDir = "$wsPersonalDir\plugins\$wsShortVersion" -} -else { - $wsPluginsDir = "$wsPersonalDir\plugins" -} +$wsPluginsDir = "$wsPersonalDir\plugins\$wsShortVersion" New-Item -Path "$wsPluginsDir\epan" -ItemType Directory -Force | Out-Null Copy-Item "tracee-event.dll" "$wsPluginsDir\epan" -Force