# SeismoGlobe Standalone Desktop Installer for Windows 10/11 # Usage: irm https://www.clearfaultlegal.com/downloads/install-seismoglobe-desktop.ps1 | iex $ErrorActionPreference = "Stop" $SiteUrl = "https://www.clearfaultlegal.com" $ZipUrl = "$SiteUrl/downloads/seismoglobe-desktop-widget-v1.0.0.zip" $InstallDir = Join-Path $env:LOCALAPPDATA "SeismoGlobeWidget" $ZipPath = Join-Path $env:TEMP "seismoglobe-desktop-widget.zip" $DesktopDir = [Environment]::GetFolderPath("Desktop") $StartDir = Join-Path $env:APPDATA "Microsoft\Windows\Start Menu\Programs" Write-Host "" Write-Host "=====================================================" -ForegroundColor Cyan Write-Host " SeismoGlobe 3D Desktop Widget - Standalone Setup " -ForegroundColor Cyan Write-Host " https://www.clearfaultlegal.com " -ForegroundColor DarkCyan Write-Host "=====================================================" -ForegroundColor Cyan Write-Host "" New-Item -ItemType Directory -Force -Path $InstallDir | Out-Null Write-Host "[1/3] Downloading SeismoGlobe Desktop Widget package..." -ForegroundColor White Invoke-WebRequest -Uri $ZipUrl -OutFile $ZipPath -UseBasicParsing Write-Host "[2/3] Extracting to $InstallDir..." -ForegroundColor White Expand-Archive -Path $ZipPath -DestinationPath $InstallDir -Force Remove-Item -Path $ZipPath -Force -ErrorAction SilentlyContinue $HasNode = $null -ne (Get-Command npm -ErrorAction SilentlyContinue) $WshShell = New-Object -ComObject WScript.Shell $IconPath = Join-Path $InstallDir "build\icon.ico" if ($HasNode) { Write-Host "[3/3] Installing Electron widget runtime via npm..." -ForegroundColor White Push-Location $InstallDir try { npm install --no-audit --no-fund } finally { Pop-Location } $LauncherCmd = Join-Path $InstallDir "Launch-SeismoGlobe.vbs" $VbsContent = @" Set WshShell = CreateObject("WScript.Shell") WshShell.CurrentDirectory = "$InstallDir" WshShell.Run "cmd /c npm start", 0, False "@ Set-Content -Path $LauncherCmd -Value $VbsContent -Encoding ASCII foreach ($TargetDir in @($DesktopDir, $StartDir)) { $Shortcut = $WshShell.CreateShortcut((Join-Path $TargetDir "SeismoGlobe Widget.lnk")) $Shortcut.TargetPath = "wscript.exe" $Shortcut.Arguments = "`"$LauncherCmd`"" $Shortcut.WorkingDirectory = $InstallDir if (Test-Path $IconPath) { $Shortcut.IconLocation = $IconPath } $Shortcut.Description = "SeismoGlobe Floating 3D Earthquake & Tsunami Desktop Widget" $Shortcut.Save() } Write-Host "" Write-Host "Installed SeismoGlobe Floating 3D Desktop Widget!" -ForegroundColor Green Write-Host "Shortcuts added to Desktop and Start Menu. Launching now..." -ForegroundColor Green Start-Process "wscript.exe" -ArgumentList "`"$LauncherCmd`"" } else { Write-Host "[3/3] Node.js not found - creating zero-dependency Standalone Desktop App shortcut..." -ForegroundColor Yellow $BrowserExe = @( "${env:ProgramFiles(x86)}\Microsoft\Edge\Application\msedge.exe", "${env:ProgramFiles}\Microsoft\Edge\Application\msedge.exe", "${env:ProgramFiles}\Google\Chrome\Application\chrome.exe", "${env:ProgramFiles(x86)}\Google\Chrome\Application\chrome.exe" ) | Where-Object { Test-Path $_ } | Select-Object -First 1 if ($BrowserExe) { foreach ($TargetDir in @($DesktopDir, $StartDir)) { $Shortcut = $WshShell.CreateShortcut((Join-Path $TargetDir "SeismoGlobe Observatory.lnk")) $Shortcut.TargetPath = $BrowserExe $Shortcut.Arguments = "--app=$SiteUrl/?utm_source=windows-standalone" if (Test-Path $IconPath) { $Shortcut.IconLocation = $IconPath } $Shortcut.Description = "SeismoGlobe Live 3D Earthquake & Tsunami Monitor" $Shortcut.Save() } Write-Host "Installed SeismoGlobe Standalone App shortcut on Desktop & Start Menu!" -ForegroundColor Green Write-Host "(Tip: Install Node.js 20+ and re-run this script anytime for the floating transparent Orb widget.)" -ForegroundColor DarkGray Start-Process $BrowserExe -ArgumentList "--app=$SiteUrl/?utm_source=windows-standalone" } else { Write-Host "Extracted widget source to $InstallDir. Install Node.js 20+ and run 'npm install && npm start' inside that folder." -ForegroundColor Yellow } }