-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathgo.ps1
More file actions
64 lines (54 loc) · 2.03 KB
/
Copy pathgo.ps1
File metadata and controls
64 lines (54 loc) · 2.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
# Ushadow Quick Start - Windows PowerShell
#
# This is the Windows equivalent of ./go.sh
# It runs the Python-based startup script.
#
# Usage:
# .\go.ps1
$ErrorActionPreference = "Stop"
Write-Host ""
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host " Ushadow Quick Start (Windows)" -ForegroundColor Cyan
Write-Host "==========================================" -ForegroundColor Cyan
Write-Host ""
# Check for Python
$pythonCmd = $null
if (Get-Command python -ErrorAction SilentlyContinue) {
$pyVersion = python --version 2>&1
if ($pyVersion -match "Python 3") {
$pythonCmd = "python"
}
}
if (-not $pythonCmd -and (Get-Command python3 -ErrorAction SilentlyContinue)) {
$pythonCmd = "python3"
}
if (-not $pythonCmd) {
Write-Host "[ERROR] Python 3 is required but not found" -ForegroundColor Red
Write-Host ""
Write-Host "Please install Python 3.10 or later from:" -ForegroundColor Yellow
Write-Host " https://www.python.org/downloads/windows/" -ForegroundColor White
Write-Host ""
Write-Host "Or install via winget:" -ForegroundColor Yellow
Write-Host " winget install Python.Python.3.12" -ForegroundColor White
Write-Host ""
exit 1
}
Write-Host "[OK] Using $pythonCmd" -ForegroundColor Green
Write-Host ""
# Check for Docker
if (-not (Get-Command docker -ErrorAction SilentlyContinue)) {
Write-Host "[ERROR] Docker is required but not found" -ForegroundColor Red
Write-Host ""
Write-Host "Please install Docker Desktop from:" -ForegroundColor Yellow
Write-Host " https://docs.docker.com/desktop/install/windows-install/" -ForegroundColor White
Write-Host ""
Write-Host "Or install via winget:" -ForegroundColor Yellow
Write-Host " winget install Docker.DockerDesktop" -ForegroundColor White
Write-Host ""
exit 1
}
# Make sure we're in the project directory
$scriptDir = Split-Path -Parent $MyInvocation.MyCommand.Path
Set-Location $scriptDir
# Run the Python startup script
& $pythonCmd setup/run.py --quick --prod --no-admin