mirror of
https://github.com/Finesssee/ProxyPilot.git
synced 2026-11-19 02:17:46 +00:00
28 lines
651 B
PowerShell
28 lines
651 B
PowerShell
Set-StrictMode -Version Latest
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
function Get-RepoRoot {
|
|
return (Resolve-Path (Join-Path $PSScriptRoot "..\\..")).Path
|
|
}
|
|
|
|
$repoRoot = Get-RepoRoot
|
|
$outDir = Join-Path $repoRoot "bin"
|
|
if (-not (Test-Path -LiteralPath $outDir)) {
|
|
New-Item -ItemType Directory -Path $outDir | Out-Null
|
|
}
|
|
|
|
$outPath = Join-Path $outDir "ProxyPilot.exe"
|
|
|
|
Write-Host "Building ProxyPilot (tray)..."
|
|
Write-Host " out: $outPath"
|
|
|
|
Push-Location $repoRoot
|
|
try {
|
|
# -H windowsgui => no console window when launched normally.
|
|
go build -ldflags "-H windowsgui" -o $outPath .\\cmd\\cliproxytray
|
|
} finally {
|
|
Pop-Location
|
|
}
|
|
|
|
Write-Host "Done."
|