# SPEEDBIRD one-line installer for Windows 10/11 x64 (SpeedBird-WIN) # # irm https://speedbird.io/install.ps1 | iex # # Downloads the latest SPEEDBIRD-Setup-.exe, verifies its SHA-256 and runs it. # The installer is per-user and needs no administrator rights. # Optional: $env:SPEEDBIRD_DRY_RUN = "1" to download and verify only. # Source and checksums: https://speedbird.io/downloads/ & { $ErrorActionPreference = 'Stop' $ProgressPreference = 'SilentlyContinue' # Invoke-WebRequest is much faster without the progress bar $Base = if ($env:SPEEDBIRD_BASE) { $env:SPEEDBIRD_BASE } else { 'https://speedbird.io' } function Say($m) { Write-Host '==> ' -ForegroundColor DarkYellow -NoNewline; Write-Host $m } function Ok($m) { Write-Host ' OK ' -ForegroundColor Green -NoNewline; Write-Host $m } function Fail($m) { Write-Host "error: $m" -ForegroundColor Red; throw "SPEEDBIRD install failed: $m" } Write-Host '' Write-Host ' SPEEDBIRD installer' -NoNewline; Write-Host " ยท $Base" -ForegroundColor DarkGray Write-Host '' if ($PSVersionTable.PSEdition -eq 'Core' -and -not $IsWindows) { Fail "this installer is for Windows. On Linux or Raspberry Pi use: curl -fsSL $Base/install.sh | sudo bash" } if (-not [Environment]::Is64BitOperatingSystem) { Fail 'SPEEDBIRD needs 64-bit Windows 10 or 11.' } $build = [Environment]::OSVersion.Version.Build if ([Environment]::OSVersion.Version.Major -lt 10) { Fail 'SPEEDBIRD needs Windows 10 or 11.' } Ok ("Windows {0} (build {1}), x64 -> SpeedBird-WIN" -f $(if ($build -ge 22000) { '11' } else { '10' }), $build) try { [Net.ServicePointManager]::SecurityProtocol = [Net.ServicePointManager]::SecurityProtocol -bor [Net.SecurityProtocolType]::Tls12 } catch {} Say 'fetching release list' try { $m = Invoke-RestMethod -UseBasicParsing "$Base/downloads/latest.json" } catch { Fail "couldn't download $Base/downloads/latest.json" } $f = $m.files | Where-Object { $_.kind -eq 'win' } | Select-Object -First 1 if (-not $f) { Fail "no Windows release is published yet. See $Base/downloads/" } Ok "SPEEDBIRD $($f.version) ($($f.name))" $dir = Join-Path ([IO.Path]::GetTempPath()) ('speedbird-' + [guid]::NewGuid().ToString('N').Substring(0, 8)) New-Item -ItemType Directory -Path $dir | Out-Null $exe = Join-Path $dir $f.name try { Say 'downloading' Invoke-WebRequest -UseBasicParsing -Uri $f.url -OutFile $exe $hash = (Get-FileHash -Algorithm SHA256 $exe).Hash.ToLower() if ($hash -ne $f.sha256.ToLower()) { Fail "SHA-256 mismatch for $($f.name) - not installing" } Ok 'SHA-256 verified' if ($env:SPEEDBIRD_DRY_RUN -eq '1') { Ok "dry run: verified $($f.name), nothing installed"; return } Unblock-File $exe -ErrorAction SilentlyContinue Say 'starting the SPEEDBIRD setup wizard' $p = Start-Process -FilePath $exe -Wait -PassThru if ($p.ExitCode -ne 0) { Fail "setup exited with code $($p.ExitCode)" } } finally { Remove-Item -Recurse -Force $dir -ErrorAction SilentlyContinue } Write-Host '' Write-Host "SPEEDBIRD $($f.version) is installed." -ForegroundColor Green Write-Host '' Write-Host ' 1. Start "SPEEDBIRD Modem" from the Start menu.' Write-Host ' 2. Set station.callsign in %APPDATA%\SPEEDBIRD\speedbird.yaml, then restart it.' Write-Host " 3. Windows guide: $Base/docs/windows/" Write-Host '' }