- Fixed exit and manual chain: optional user/pass fields with URL merge and redaction in UI/logs - config: split_proxy_for_edit, merge_proxy_credentials, redact_proxy_url, IPv6-style host bracketing - Live tab: UILogHandler to stream proxy_chain_manager logs; Verbose toggle; Clear log; httpx quiet - service/validator/fetcher: structured INFO/DEBUG for pool, GOST, validation, fetches - setup_and_build.ps1: pip upgrade, deps, PyInstaller, desktop copy + shortcut; build_exe.bat delegates - README: clone/pull to one-script desktop build flow Made-with: Cursor
64 lines
2.2 KiB
PowerShell
64 lines
2.2 KiB
PowerShell
#Requires -Version 5.1
|
|
<#
|
|
.SYNOPSIS
|
|
After git pull: upgrade pip, install deps, build ProxyChainManager.exe, copy to Desktop, create "Proxy God.lnk".
|
|
|
|
.DESCRIPTION
|
|
Requires Python 3.10+ on PATH (python.exe) or the Windows py launcher (py -3).
|
|
Does not auto-install Python; see README for winget one-liner if needed.
|
|
#>
|
|
$ErrorActionPreference = "Stop"
|
|
$root = Split-Path -Parent (Split-Path -Parent $MyInvocation.MyCommand.Path)
|
|
Set-Location $root
|
|
|
|
function Resolve-PythonExe {
|
|
if (Get-Command py -ErrorAction SilentlyContinue) {
|
|
try {
|
|
$out = (& py -3 -c "import sys; print(sys.executable)" 2>$null).Trim()
|
|
if ($out -and (Test-Path -LiteralPath $out)) { return $out }
|
|
} catch { }
|
|
}
|
|
$p = Get-Command python.exe -ErrorAction SilentlyContinue
|
|
if ($p) { return $p.Source }
|
|
throw (
|
|
"Python 3.10+ not found (tried 'py -3' and 'python'). Install, then re-run:`n" +
|
|
" winget install Python.Python.3.12 --accept-package-agreements --accept-source-agreements`n" +
|
|
"Or https://www.python.org/downloads/ (enable 'Add python.exe to PATH')."
|
|
)
|
|
}
|
|
|
|
$py = Resolve-PythonExe
|
|
Write-Host "Using: $py"
|
|
& $py -c "import sys; assert sys.version_info >= (3, 10), 'Need Python 3.10+'; print(sys.version)"
|
|
|
|
Write-Host "`n== pip (upgrade) =="
|
|
& $py -m pip install --upgrade pip
|
|
|
|
Write-Host "`n== dependencies + PyInstaller =="
|
|
& $py -m pip install -r "$root\requirements.txt"
|
|
& $py -m pip install pyinstaller
|
|
|
|
Write-Host "`n== PyInstaller =="
|
|
& $py -m PyInstaller --noconfirm --clean `
|
|
--onefile --windowed `
|
|
--uac-admin `
|
|
--name ProxyChainManager `
|
|
--collect-all customtkinter `
|
|
--hidden-import pystray._win32 `
|
|
"$root\run.py"
|
|
|
|
$distExe = Join-Path $root "dist\ProxyChainManager.exe"
|
|
if (-not (Test-Path $distExe)) {
|
|
throw "Build failed: missing $distExe"
|
|
}
|
|
|
|
$desk = [Environment]::GetFolderPath("Desktop")
|
|
$deskExe = Join-Path $desk "ProxyChainManager.exe"
|
|
Copy-Item -LiteralPath $distExe -Destination $deskExe -Force
|
|
Write-Host "Copied: $deskExe"
|
|
|
|
Write-Host "`n== Desktop shortcut =="
|
|
& powershell -NoProfile -ExecutionPolicy Bypass -File "$root\scripts\create_desktop_shortcut.ps1"
|
|
|
|
Write-Host "`nDone. Launch from Desktop: Proxy God.lnk (or ProxyChainManager.exe)"
|