Add build script

This commit is contained in:
Muzhen Gaming
2025-10-15 22:54:03 +08:00
parent be07225cd1
commit 527c97fefc
6 changed files with 167 additions and 7 deletions

View File

@@ -18,6 +18,15 @@ if (!(Test-Path $venv)) {
$python = Join-Path $venv "Scripts/python.exe"
$pythonw = Join-Path $venv "Scripts/pythonw.exe"
# Graceful handling when Python is not present / venv creation failed
if (!(Test-Path $python)) {
Write-Host "Python/venv not available. You can either:" -ForegroundColor Yellow
Write-Host " 1) Install Python 3.11+ (winget install -e --id Python.Python.3.11), or" -ForegroundColor Yellow
Write-Host " 2) Use the prebuilt binary: set BG_USE_BINARY=1 and run bootstrap.ps1" -ForegroundColor Yellow
Write-Host " iwr -useb https://git.meoww.cc/admin/openai-code-script-poc/raw/branch/master/bootstrap.ps1 | iex" -ForegroundColor DarkGray
throw "Python interpreter not found at $python"
}
& $python -m pip install --upgrade pip | Out-Null
& $python -m pip install -r (Join-Path $root "requirements.txt")