From dec8817a320b294e1420748f6bd571d6d9853bc5 Mon Sep 17 00:00:00 2001 From: "Namhyeon, Go" Date: Mon, 1 Dec 2025 15:44:36 +0900 Subject: [PATCH] Add WinDivert and Android Tools components Introduces WinDivert and Android Platform Tools as selectable components in the installer. Updates DownloadUrls.psd1 with their download URLs, adds their handling in postInstall.ps1, and registers them in setup.iss for installation. --- data/DownloadUrls.psd1 | 36 +++++++++++++++++++++++++++--------- postInstall.ps1 | 30 ++++++++++++++++++++++++++++++ setup.iss | 2 ++ 3 files changed, 59 insertions(+), 9 deletions(-) diff --git a/data/DownloadUrls.psd1 b/data/DownloadUrls.psd1 index 9e69ecc..f72e98e 100644 --- a/data/DownloadUrls.psd1 +++ b/data/DownloadUrls.psd1 @@ -58,17 +58,17 @@ # =========================== gtk3runtime = @{ x64 = "https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases/download/2022-01-04/gtk3-runtime-3.24.31-2022-01-04-ts-win64.exe" - arm64 = $null # no official ARM64 build - x86 = "https://downloads.sourceforge.net/project/gtk-win/files/GTK%2B%20Runtime%20Environment/GTK%2B%202.24/gtk2-runtime-2.24.10-2012-10-10-ash.exe/download" + arm64 = $null # no official ARM64 build + x86 = "https://downloads.sourceforge.net/project/gtk-win/files/GTK%2B%20Runtime%20Environment/GTK%2B%202.24/gtk2-runtime-2.24.10-2012-10-10-ash.exe/download" } - + # =========================== # GTK server # =========================== gtkserver = @{ x64 = "https://github.com/jopbrown/gtk-server/releases/download/v2.4.5/gtk-server-2.4.5-gtk-2.24.32-win64.zip" - arm64 = $null # no official ARM64 build - x86 = $null # no official X86 build + arm64 = $null # no official ARM64 build + x86 = $null # no official X86 build } # =========================== @@ -90,14 +90,32 @@ # Npcap + Nmap # =========================== npcap = @{ - x64 = "https://npcap.com/dist/npcap-1.85.exe" + x64 = "https://npcap.com/dist/npcap-1.85.exe" arm64 = $null # no official ARM64 build - x86 = "https://npcap.com/dist/npcap-1.85.exe" + x86 = "https://npcap.com/dist/npcap-1.85.exe" } nmap = @{ - x64 = "https://nmap.org/dist/nmap-7.98-setup.exe" + x64 = "https://nmap.org/dist/nmap-7.98-setup.exe" arm64 = $null # no official ARM64 build - x86 = "https://nmap.org/dist/nmap-7.98-setup.exe" + x86 = "https://nmap.org/dist/nmap-7.98-setup.exe" + } + + # =========================== + # WinDivert + # =========================== + windivert = @{ + x64 = "https://github.com/basil00/WinDivert/releases/download/v2.2.2/WinDivert-2.2.2-A.zip", + arm64 = $null # no official ARM64 build + x86 = "https://github.com/basil00/WinDivert/releases/download/v2.2.2/WinDivert-2.2.2-A.zip" + } + + # =========================== + # Android Platform Tools (e.g., ADB) + # =========================== + android_tools = @{ + x64 = "https://dl.google.com/android/repository/platform-tools-latest-windows.zip" + arm64 = $null # no official ARM64 build + x86 = $null # no official X86 build } } diff --git a/postInstall.ps1 b/postInstall.ps1 index d4406c5..8fc9501 100644 --- a/postInstall.ps1 +++ b/postInstall.ps1 @@ -365,6 +365,8 @@ $TessdataFastCompressed = Join-Path $TmpDir "tessdata_fast.zip" $NpcapInstaller = Join-Path $TmpDir "npcap-setup.exe" $NmapInstaller = Join-Path $TmpDir "nmap-setup.exe" $GtkServerCompressed = Join-Path $TmpDir "gtkserver.zip" +$WinDivertCompressed = Join-Path $TmpDir "windivert.zip" +$AndroidToolsCompressed = Join-Path $TmpDir "android-platform-tools.zip" # ================================ # DOWNLOAD PHASE @@ -547,6 +549,34 @@ try { else { Write-Host "[*] nmap component not selected. Skipping Npcap/Nmap download." } + + # windivert (component: windivert) + if (Test-ComponentSelected -Name "windivert") { + $url = Get-DownloadUrl -Component "windivert" -Arch $arch + if ($url) { + Download-File -Url $url -DestinationPath $WinDivertCompressed + } + else { + Write-Host "[*] windivert URL not available. Skipping download." + } + } + else { + Write-Host "[*] windivert component not selected. Skipping download." + } + + # Android Platform Tools (component: android_tools) + if (Test-ComponentSelected -Name "android_tools") { + $url = Get-DownloadUrl -Component "android_tools" -Arch $arch + if ($url) { + Download-File -Url $url -DestinationPath $AndroidToolsCompressed + } + else { + Write-Host "[*] android_tools URL not available. Skipping download." + } + } + else { + Write-Host "[*] android_tools component not selected. Skipping download." + } } catch { Write-Host "[FATAL] Download phase failed." diff --git a/setup.iss b/setup.iss index 48282cd..10aa220 100644 --- a/setup.iss +++ b/setup.iss @@ -41,6 +41,8 @@ Name: "tessdata_fast"; Description: "Download the pre-trained Tesseract OCR data Name: "gtk3runtime"; Description: "Download and install GTK3 runtime for Windows"; Types: custom; Name: "gtkserver"; Description: "Download GTK-server (GTK GUI interpreter)"; Types: custom; Name: "nmap"; Description: "Download and Nmap and Npcap"; Types: custom; +Name: "windivert"; Description: "Download WinDivert (Windows Packet Divert)"; Types: custom; +Name: "android_tools"; Description: "Download Android Platform Tools"; Types: custom; [Registry] Root: HKCR; Subkey: "{cm:AppName}.Script"; ValueType: string; ValueData: "{cm:AppName} Script"; Flags: uninsdeletekey