diff --git a/README.md b/README.md index a8f1d58..7ecaac1 100644 --- a/README.md +++ b/README.md @@ -172,13 +172,17 @@ chmod +x setup.sh podcli ./setup.sh ``` -**Windows (PowerShell)** +**Windows** ```powershell git clone https://github.com/nmbrthirteen/podcli.git cd podcli -# If scripts are blocked: Set-ExecutionPolicy -Scope Process -ExecutionPolicy Bypass -.\setup.ps1 +``` + +Then double-click **`install.cmd`** (or run it in a terminal). It installs everything and keeps the window open so you can see the result. To launch the studio afterwards: + +```powershell +powershell -ExecutionPolicy Bypass -File setup.ps1 -Ui ``` This will: diff --git a/install.cmd b/install.cmd new file mode 100644 index 0000000..81166cd --- /dev/null +++ b/install.cmd @@ -0,0 +1,19 @@ +@echo off +setlocal +cd /d "%~dp0" + +echo Installing podcli - this can take a few minutes (downloads Whisper, Python and Node packages)... +echo. + +powershell -NoProfile -ExecutionPolicy Bypass -File "%~dp0setup.ps1" -Install +set "RC=%ERRORLEVEL%" + +echo. +if not "%RC%"=="0" ( + echo Install failed with code %RC%. Review the messages above. +) else ( + echo Install complete. To open the studio, run: powershell -ExecutionPolicy Bypass -File setup.ps1 -Ui +) +echo. +pause +exit /b %RC% diff --git a/setup.ps1 b/setup.ps1 index 7665e58..28a8ffc 100644 --- a/setup.ps1 +++ b/setup.ps1 @@ -202,17 +202,28 @@ function Show-Mcp { Write-Host "" } -Write-Banner - -if ($Mcp) { - Show-Mcp -} elseif ($Ui) { - Invoke-LaunchUi -} elseif ($Install) { - Invoke-Install -} else { - Invoke-Install - Write-Host "----------------------------------------" +try { + Write-Banner + + if ($Mcp) { + Show-Mcp + } elseif ($Ui) { + Invoke-LaunchUi + } elseif ($Install) { + Invoke-Install + } else { + Invoke-Install + Write-Host "----------------------------------------" + Write-Host "" + Invoke-LaunchUi + } +} catch { Write-Host "" - Invoke-LaunchUi + Write-Host " Setup failed: $($_.Exception.Message)" + Write-Host " Fix the issue above and re-run .\setup.ps1" + Write-Host "" + if ($Host.Name -eq "ConsoleHost") { + Read-Host " Press Enter to close" + } + exit 1 } diff --git a/setup.sh b/setup.sh index fd3b37f..6b9cb0e 100755 --- a/setup.sh +++ b/setup.sh @@ -4,6 +4,17 @@ set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$SCRIPT_DIR" +case "$(uname -s 2>/dev/null)" in + MINGW*|MSYS*|CYGWIN*|Windows_NT) + echo "" + echo " This is the macOS/Linux installer. On Windows, use:" + echo " install.cmd (double-click, or run in a terminal)" + echo " or: powershell -ExecutionPolicy Bypass -File setup.ps1" + echo "" + exit 1 + ;; +esac + # ============================================================ # podcli — Install & Launch # Usage: