From 3e82eeeb4b5a89eaf961a7b5084d1e25bbc3b014 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 1 Dec 2025 16:33:05 +0900 Subject: [PATCH] Add extraction steps for WinDivert and Android Platform Tools Introduces extraction and installation logic for WinDivert and Android Platform Tools components in postInstall.ps1. Also updates log messages for consistency and clarity. --- postInstall.ps1 | 38 ++++++++++++++++++++++++++++++++++---- 1 file changed, 34 insertions(+), 4 deletions(-) diff --git a/postInstall.ps1 b/postInstall.ps1 index ce31576..f7a639d 100644 --- a/postInstall.ps1 +++ b/postInstall.ps1 @@ -557,11 +557,11 @@ try { Download-File -Url $url -DestinationPath $WinDivertCompressed } else { - Write-Host "[*] windivert URL not available. Skipping download." + Write-Host "[*] WinDivert URL not available. Skipping download." } } else { - Write-Host "[*] windivert component not selected. Skipping download." + Write-Host "[*] WinDivert component not selected. Skipping download." } # Android Platform Tools (component: android_platform_tools) @@ -571,11 +571,11 @@ try { Download-File -Url $url -DestinationPath $AndroidPlatformToolsCompressed } else { - Write-Host "[*] android_platform_tools URL not available. Skipping download." + Write-Host "[*] Android Platform Tools URL not available. Skipping download." } } else { - Write-Host "[*] android_platform_tools component not selected. Skipping download." + Write-Host "[*] Android Platform Tools component not selected. Skipping download." } } catch { @@ -810,6 +810,36 @@ try { else { Write-Host "[*] nmap component not selected. Skipping Npcap/Nmap installation." } + + # windivert (component: windivert) + if (Test-ComponentSelected -Name "windivert") { + if (Test-Path $WinDivertCompressed) { + Extract-CompressedFile ` + -CompressedPath $WinDivertCompressed ` + -DestinationDirectory (Join-Path $TargetDir "windivert") + } + else { + Write-Host "[WARN] WinDivert archive not found. Skipping installation." + } + } + else { + Write-Host "[*] WinDivert component not selected. Skipping installation." + } + + # Android Platform Tools (component: android_platform_tools) + if (Test-ComponentSelected -Name "android_platform_tools") { + if (Test-Path $WinDivertCompressed) { + Extract-CompressedFile ` + -CompressedPath $AndroidPlatformToolsCompressed ` + -DestinationDirectory (Join-Path $TargetDir "android_platform_tools") + } + else { + Write-Host "[WARN] Android Platform Tools archive not found. Skipping installation." + } + } + else { + Write-Host "[*] Android Platform Tools component not selected. Skipping installation." + } } catch { Write-Host "[FATAL] Extraction/installation phase failed."