mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-19 02:17:46 +00:00
29 lines
852 B
PowerShell
29 lines
852 B
PowerShell
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
function Get-RepoRoot {
|
|
return (Resolve-Path (Join-Path $PSScriptRoot "..\\..")).Path
|
|
}
|
|
|
|
$repoRoot = Get-RepoRoot
|
|
|
|
& (Join-Path $repoRoot "scripts\\windows\\build-cliproxytray.ps1")
|
|
|
|
$distDir = Join-Path $repoRoot "dist\\ProxyPilot"
|
|
if (Test-Path -LiteralPath $distDir) {
|
|
Remove-Item -Recurse -Force -LiteralPath $distDir
|
|
}
|
|
New-Item -ItemType Directory -Path $distDir | Out-Null
|
|
|
|
$exeSrc = Join-Path $repoRoot "bin\\ProxyPilot.exe"
|
|
$exeDst = Join-Path $distDir "ProxyPilot.exe"
|
|
Copy-Item -Force -LiteralPath $exeSrc -Destination $exeDst
|
|
|
|
$zipPath = Join-Path $repoRoot "dist\\ProxyPilot.zip"
|
|
if (Test-Path -LiteralPath $zipPath) { Remove-Item -Force -LiteralPath $zipPath }
|
|
|
|
Compress-Archive -Path $distDir\\* -DestinationPath $zipPath
|
|
|
|
Write-Host "Packaged:"
|
|
Write-Host " $zipPath"
|