# ============================================================================== # RapnssZ v5.7 - Universal PowerShell Web Installer # Usage: irm https://framework.rapnss.in/install.ps1 | iex # ============================================================================== $ErrorActionPreference = "Stop" function Write-RapnssBanner { Write-Host @" ██████╗ █████╗ ██████╗ ███╗ ██╗███████╗███████╗███████╗ ██╔══██╗██╔══██╗██╔══██╗████╗ ██║██╔════╝██╔════╝╚══███╔╝ ██████╔╝███████║██████╔╝██╔██╗ ██║███████╗███████╗ ███╔╝ ██╔══██╗██╔══██║██╔═══╝ ██║╚██╗██║╚════██║╚════██║ ███╔╝ ██║ ██║██║ ██║██║ ██║ ╚████║███████║███████║███████╗ ╚═╝ ╚═╝╚═╝ ╚═╝╚═╝ ╚═╝ ╚═══╝╚══════╝╚══════╝╚══════╝ Autonomous Multi-Agent & Local Intelligence OS (v5.7) ═══════════════════════════════════════════════════════════════ "@ -ForegroundColor Cyan } Write-RapnssBanner Write-Host ">>> Initializing RapnssZ Quick Installer..." -ForegroundColor Yellow $InstallDir = "$env:LOCALAPPDATA\RapnssZ" $BinDir = "$InstallDir\bin" $SufyServerUrl = "https://framework.rapnss.in/dist/v5.7/RapnssZ-v5.7.0-Windows.zip" Write-Host "[1/5] Setting up installation directories: $InstallDir" -ForegroundColor White New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null New-Item -ItemType Directory -Force -Path $BinDir | Out-Null $ZipFile = "$env:TEMP\RapnssZ_v5.7.zip" Write-Host "[2/5] Downloading RapnssZ release payload from Sufy Server..." -ForegroundColor White try { Invoke-WebRequest -Uri $SufyServerUrl -OutFile $ZipFile -UseBasicParsing Write-Host " -> Download complete." -ForegroundColor Green } catch { Write-Host " -> Sufy primary mirror unreachable. Fetching local repository fallback..." -ForegroundColor Yellow if (Test-Path "$PSScriptRoot\..\dist\RapnssZ-v5.5.0-Source") { Copy-Item -Recurse -Force "$PSScriptRoot\..\dist\RapnssZ-v5.5.0-Source\*" $InstallDir } } if (Test-Path $ZipFile) { Write-Host "[3/5] Extracting RapnssZ payload..." -ForegroundColor White Expand-Archive -Path $ZipFile -DestinationPath $InstallDir -Force Remove-Item -Force $ZipFile } # Purge any legacy hollow binaries to ensure v5.7 python core is executed if (Test-Path "$BinDir\rapnssz.exe") { Remove-Item -Force "$BinDir\rapnssz.exe" -ErrorAction SilentlyContinue } if (Test-Path "$InstallDir\rapnssz.exe") { Remove-Item -Force "$InstallDir\rapnssz.exe" -ErrorAction SilentlyContinue } if (Test-Path "$env:LOCALAPPDATA\Rapnss") { Remove-Item -Recurse -Force "$env:LOCALAPPDATA\Rapnss" -ErrorAction SilentlyContinue } Write-Host "[4/5] Configuring environment and PATH..." -ForegroundColor White $UserPath = [Environment]::GetEnvironmentVariable("Path", "User") $CleanPaths = ($UserPath -split ';' | Where-Object { $_ -and $_ -ne "$env:LOCALAPPDATA\Rapnss" -and $_ -ne "$env:LOCALAPPDATA\RapnssZ" -and $_ -ne "$BinDir" }) -join ';' $NewUserPath = "$BinDir;$InstallDir;$CleanPaths" [Environment]::SetEnvironmentVariable("Path", $NewUserPath, "User") $env:Path = "$BinDir;$InstallDir;$env:Path" Write-Host " -> Added RapnssZ v5.7 to User PATH (highest priority)." -ForegroundColor Green # Create launcher shim batch scripts in BinDir, InstallDir and legacy folders $BatchShimContent = @" @echo off python "$InstallDir\main.py" %* "@ Set-Content -Path "$BinDir\rapnssz.bat" -Value $BatchShimContent -Force Set-Content -Path "$InstallDir\rapnssz.bat" -Value $BatchShimContent -Force Set-Content -Path "$BinDir\rapnss.bat" -Value $BatchShimContent -Force if (Test-Path "$env:LOCALAPPDATA\Rapnss") { Set-Content -Path "$env:LOCALAPPDATA\Rapnss\rapnssz.bat" -Value $BatchShimContent -Force } Write-Host "[5/5] Creating Desktop & Start Menu Shortcuts..." -ForegroundColor White $WshShell = New-Object -ComObject WScript.Shell $DesktopShortcut = $WshShell.CreateShortcut("$env:USERPROFILE\Desktop\RapnssZ.lnk") $DesktopShortcut.TargetPath = "$BinDir\rapnssz.bat" $DesktopShortcut.WorkingDirectory = "$InstallDir" $DesktopShortcut.Description = "RapnssZ Autonomous AI OS" $DesktopShortcut.Save() Write-Host "`n===============================================================" -ForegroundColor Green Write-Host " [SUCCESS] RapnssZ v5.7 installed successfully!" -ForegroundColor Green Write-Host " Type 'rapnssz' in any terminal or launch from your Desktop." -ForegroundColor Cyan Write-Host "===============================================================`n" -ForegroundColor Green