feat: add ProcessDock process and port manager

This commit is contained in:
王鹏
2026-07-17 09:14:45 +08:00
commit 13bb37585f
22 changed files with 2201 additions and 0 deletions

28
build_exe.ps1 Normal file
View File

@@ -0,0 +1,28 @@
$ErrorActionPreference = "Stop"
Set-Location -LiteralPath $PSScriptRoot
Write-Host "[1/4] Installing build dependencies..."
python -m pip install -r requirements-build.txt
if ($LASTEXITCODE -ne 0) { throw "Dependency installation failed." }
Write-Host "[2/4] Generating application icon..."
python tools\generate_icon.py
if ($LASTEXITCODE -ne 0) { throw "Icon generation failed." }
Write-Host "[3/4] Running tests..."
python -m unittest discover -s tests -v
if ($LASTEXITCODE -ne 0) { throw "Tests failed." }
Write-Host "[4/4] Building single-file executable..."
python -m PyInstaller --noconfirm --clean ProcessDock.spec
if ($LASTEXITCODE -ne 0) { throw "PyInstaller build failed." }
$exe = Join-Path $PSScriptRoot "dist\ProcessDock.exe"
if (-not (Test-Path -LiteralPath $exe)) { throw "Build completed without an executable." }
$file = Get-Item -LiteralPath $exe
$hash = Get-FileHash -LiteralPath $exe -Algorithm SHA256
Write-Host ""
Write-Host "Build succeeded: $($file.FullName)"
Write-Host "Size: $([math]::Round($file.Length / 1MB, 1)) MB"
Write-Host "SHA256: $($hash.Hash)"