16 lines
521 B
PowerShell
16 lines
521 B
PowerShell
$ErrorActionPreference = "Stop"
|
|
|
|
$projectRoot = Split-Path -Parent $MyInvocation.MyCommand.Path
|
|
Set-Location -LiteralPath $projectRoot
|
|
|
|
if (-not (Get-Command py -ErrorAction SilentlyContinue)) {
|
|
throw "Python 3.11 or newer is required. Install Python from python.org, then run this script again."
|
|
}
|
|
|
|
if (-not (Test-Path -LiteralPath ".venv\Scripts\python.exe")) {
|
|
& py -3 -m venv .venv
|
|
}
|
|
|
|
& .venv\Scripts\python.exe -m pip install --disable-pip-version-check -r requirements.txt
|
|
& .venv\Scripts\python.exe app.py
|