fix: add Antigravity prereq check to all setup scripts (#7)

All three setup scripts (Linux, macOS, Windows) now verify that the
Antigravity app is installed and the LS binary exists before proceeding.
Fails early with a clear error message and suggestions instead of a
cryptic runtime crash.

Closes #5
This commit is contained in:
Louie
2026-02-18 13:17:31 -06:00
committed by GitHub
parent 4966d8f648
commit 6fd7cf6618
3 changed files with 76 additions and 10 deletions

View File

@@ -19,7 +19,26 @@ $DataDir = Join-Path $env:TEMP "zerogravity-standalone"
New-Item -ItemType Directory -Force -Path $DataDir | Out-Null
Write-Host " $DataDir"
# ── 3. Build ──
# ── 3. Prerequisite check: Antigravity must be installed ──
Write-Host "→ Checking for Antigravity installation…"
$LsBinary = Join-Path $env:LOCALAPPDATA "Programs\Antigravity\resources\app\extensions\antigravity\bin\language_server_windows_x64.exe"
if (-not (Test-Path $LsBinary)) {
Write-Host ""
Write-Host "✗ Antigravity is not installed (or the LS binary is missing)." -ForegroundColor Red
Write-Host " ZeroGravity requires a working Antigravity installation."
Write-Host " The Language Server binary is bundled with the Antigravity app"
Write-Host " and cannot be downloaded separately."
Write-Host ""
Write-Host " Expected path:"
Write-Host " $LsBinary"
Write-Host ""
Write-Host " Install Antigravity first, then re-run this script."
Write-Host " Alternatively, set ZEROGRAVITY_LS_PATH to a custom LS binary location."
exit 1
}
Write-Host " Found: $LsBinary"
# ── 4. Build ──
Write-Host "→ Building release binary…"
Push-Location $ProjectDir
cargo build --release
@@ -32,7 +51,7 @@ if (-not (Test-Path $Binary)) {
}
Write-Host " Built: $Binary"
# ── 4. Scheduled task (optional) ──
# ── 5. Scheduled task (optional) ──
$TaskName = "ZeroGravity Proxy"
$Existing = Get-ScheduledTask -TaskName $TaskName -ErrorAction SilentlyContinue