# Poke@home quick start. Generated 2026-09-15 21:12:18Z by the box. # Read this before running it: https://franksriracha.zip/start.ps1 # # Clones https://github.com/HughMungis/poke-at-home into .\poke-at-home, checks your Python # and your ROM, and prints the command to start contributing. No admin rights, nothing # installed system-wide, and it does not start donating on its own. $ErrorActionPreference = 'Stop' Write-Host '' Write-Host " Poke@home - setting up in $((Get-Location).Path)\poke-at-home" Write-Host '' $py = $null foreach ($c in @('python','python3','py')) { $cmd = Get-Command $c -ErrorAction SilentlyContinue if ($cmd) { $v = & $c -c 'import sys; print(1 if sys.version_info[:2] >= (3,9) else 0)' 2>$null if ($v -eq '1') { $py = $c; break } } } if (-not $py) { Write-Host ' Python 3.9+ is required and was not found. Install it and re-run.' -Foreground Red exit 1 } Write-Host " python: $(& $py -V 2>&1)" if (-not (Get-Command git -ErrorAction SilentlyContinue)) { Write-Host ' git is required and was not found.' -Foreground Red exit 1 } if (Test-Path 'poke-at-home\.git') { Write-Host ' updating the existing checkout...' git -C 'poke-at-home' pull --ff-only } else { Write-Host ' cloning https://github.com/HughMungis/poke-at-home ...' git clone --depth 1 'https://github.com/HughMungis/poke-at-home.git' 'poke-at-home' } Set-Location 'poke-at-home' # The ROM is yours and is never distributed. Checked by hash: a wrong revision scores # perfectly normally and measures a different game. $rom = $null foreach ($p in @('PokemonRed.gb','repo\PokemonRed.gb')) { if (Test-Path $p) { $rom = $p; break } } if (-not $rom) { Write-Host '' Write-Host ' NEXT STEP - you need to supply a Pokemon Red ROM.' -Foreground Yellow Write-Host ' None is included here and none ever will be; it is copyrighted. Dump your own' Write-Host ' cartridge, then put the file at:' Write-Host " $((Get-Location).Path)\PokemonRed.gb" Write-Host ' It must be 1,048,576 bytes, SHA1 ea9bcae617fdf159b045185467ae58b2e4a48b9a' Write-Host '' Write-Host ' Then re-run this command and it will finish the setup.' exit 0 } Write-Host " rom: $rom" Write-Host '' Write-Host ' checking this client is current...' & $py contrib\worker.py --check Write-Host '' # !! NO `cd` HERE, unlike start.sh. `iex (irm ...)` runs in the CALLER's scope, so the # Set-Location above really did move this session into poke-at-home -- telling them to cd # again would fail with a path error on the very first command they type. The sh version # runs in a subshell (curl | sh), the parent shell never moves, and its `cd` IS correct. Write-Host " Setup done. You are now in $((Get-Location).Path)" Write-Host ' To contribute one unit and see how it goes:' Write-Host '' Write-Host " $py contrib\worker.py eval --once" Write-Host '' Write-Host ' That takes a single job, reports numbers, and stops. Nothing runs in the' Write-Host ' background, and nothing was registered on your behalf.' Write-Host ''