# Setup script for humblemuzzu/dumbtv on Windows (PowerShell), from https://gitmanual.com/humblemuzzu/dumbtv # Read it before you run it: the commands come from the repo's own README and files. # Run: powershell -ExecutionPolicy Bypass -File .\setup.ps1 $ErrorActionPreference = "Stop" function Write-Step($t) { Write-Host "`n==> $t" -ForegroundColor Cyan } # Windows ships a python that only opens the Microsoft Store; it doesn't count. function Have($c) { $cmd = Get-Command $c -ErrorAction SilentlyContinue; [bool]$cmd -and $cmd.Source -notlike '*\WindowsApps\*' } # New installs change PATH; pick it up without opening a new window. function Update-Path { $env:Path = [Environment]::GetEnvironmentVariable("Path", "Machine") + ";" + [Environment]::GetEnvironmentVariable("Path", "User") } # Stop when a program fails, like bash's set -e. Dot-sourced, so cd and venv activation carry on to the next step. function Invoke-Step([scriptblock]$Block) { $global:LASTEXITCODE = 0; . $Block; if ($LASTEXITCODE) { throw "Failed with exit code $LASTEXITCODE" } } Write-Step '1/4 Clone the repository' if (-not (Test-Path 'dumbtv')) { Invoke-Step { git clone https://github.com/humblemuzzu/dumbtv.git } } Set-Location 'dumbtv' Write-Step '2/4 Install the required tools' # adb (Android platform-tools) Invoke-Step { winget install Google.PlatformTools -e --accept-source-agreements --accept-package-agreements } Write-Step '3/4 Follow the README: Quick start' # Run these in Git Bash (installed with Git) or WSL — not PowerShell. Do the README instructions above first. # (fill in your own values, then run it) adb connect :5555 # press Allow on the TV # (needs Git Bash or WSL on Windows) ./scripts/preflight.sh # what the TV is and what would change; changes nothing # (needs Git Bash or WSL on Windows) ./scripts/configure.sh # a few questions # (needs Git Bash or WSL on Windows) ./scripts/all.sh # asks before each step, reboots the TV twice # (needs Git Bash or WSL on Windows) ./scripts/verify.sh # checks the result Write-Step '4/4 To undo it later: Undo' # From the README. # (only to undo the setup) ./scripts/restore.sh Write-Host 'Set up humblemuzzu/dumbtv.' Write-Host 'Compare yours with the README''s “Tested on” list above before installing anything.' Write-Host 'Manual: https://gitmanual.com/humblemuzzu/dumbtv'