40 lines
1.4 KiB
PowerShell
40 lines
1.4 KiB
PowerShell
# OverCode Shell PowerShell Launcher
|
|
$Host.UI.RawUI.WindowTitle = "OverCode Shell v2.0"
|
|
|
|
Write-Host "================================================" -ForegroundColor Cyan
|
|
Write-Host " OverCode Shell - Launching..." -ForegroundColor Green
|
|
Write-Host "================================================" -ForegroundColor Cyan
|
|
|
|
# Change to script directory
|
|
Set-Location -Path $PSScriptRoot
|
|
|
|
try {
|
|
# Check if Python is available
|
|
$pythonVersion = python --version 2>$null
|
|
if (-not $pythonVersion) {
|
|
Write-Host "ERROR: Python is not installed or not in PATH!" -ForegroundColor Red
|
|
Write-Host "Please install Python from https://python.org" -ForegroundColor Yellow
|
|
Read-Host "Press Enter to exit"
|
|
exit 1
|
|
}
|
|
|
|
Write-Host "Found Python: $pythonVersion" -ForegroundColor Green
|
|
|
|
# Create virtual environment if it doesn't exist
|
|
if (-not (Test-Path "venv")) {
|
|
Write-Host "Setting up virtual environment..." -ForegroundColor Yellow
|
|
python -m venv venv
|
|
& "venv\Scripts\Activate.ps1"
|
|
pip install -r requirements.txt
|
|
} else {
|
|
& "venv\Scripts\Activate.ps1"
|
|
}
|
|
|
|
# Launch OverCode Shell
|
|
Write-Host "Starting OverCode Shell..." -ForegroundColor Green
|
|
python overshell.py
|
|
}
|
|
catch {
|
|
Write-Host "Error occurred: $($_.Exception.Message)" -ForegroundColor Red
|
|
Read-Host "Press Enter to exit"
|
|
} |