Add repo-local GUI runner scripts
This commit is contained in:
parent
66595cafe5
commit
7cc958a008
4 changed files with 99 additions and 0 deletions
25
scripts/run_gui.ps1
Normal file
25
scripts/run_gui.ps1
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
param(
|
||||
[string]$BindHost = "127.0.0.1",
|
||||
[int]$Port = 8000,
|
||||
[switch]$Reload
|
||||
)
|
||||
|
||||
$ErrorActionPreference = "Stop"
|
||||
|
||||
$repoRoot = Split-Path -Parent $PSScriptRoot
|
||||
$python = Join-Path $repoRoot ".venv\Scripts\python.exe"
|
||||
if (-not (Test-Path $python)) {
|
||||
$python = "python"
|
||||
}
|
||||
|
||||
$args = @(
|
||||
(Join-Path $repoRoot "scripts\run_gui.py"),
|
||||
"--host", $BindHost,
|
||||
"--port", $Port
|
||||
)
|
||||
|
||||
if ($Reload) {
|
||||
$args += "--reload"
|
||||
}
|
||||
|
||||
& $python @args
|
||||
Loading…
Reference in a new issue