-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathlaunch_gui.ps1
More file actions
75 lines (60 loc) · 1.95 KB
/
Copy pathlaunch_gui.ps1
File metadata and controls
75 lines (60 loc) · 1.95 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
65
66
67
68
69
70
71
72
73
74
75
# Axonyx Revolt - GUI Launcher
param(
[switch]$Backend,
[switch]$GUI,
[switch]$Both
)
function Start-Backend {
Write-Host "Starting Backend API Server..." -ForegroundColor Cyan
Write-Host ""
Set-Location $PSScriptRoot
& .\.venv\Scripts\Activate.ps1
Write-Host "Backend URL: http://localhost:8000" -ForegroundColor Green
Write-Host "API Docs: http://localhost:8000/docs" -ForegroundColor Green
Write-Host ""
python src/api_server.py
}
function Start-GUI {
Write-Host "Starting Flutter GUI..." -ForegroundColor Cyan
Write-Host ""
Set-Location "$PSScriptRoot\axonyx_gui"
Write-Host "Launching Axonyx Revolt GUI..." -ForegroundColor Green
Write-Host ""
flutter run -d windows --release
}
function Start-Both {
Write-Host "Starting Both Backend and GUI..." -ForegroundColor Cyan
Write-Host ""
# Start backend in new terminal
Start-Process powershell -ArgumentList "-NoExit", "-Command", "& '$PSScriptRoot\launch_gui.ps1' -Backend"
# Wait a bit for backend to start
Start-Sleep -Seconds 3
# Start GUI in current terminal
Start-GUI
}
# Main logic
if ($Backend) {
Start-Backend
}
elseif ($GUI) {
Start-GUI
}
elseif ($Both) {
Start-Both
}
else {
Write-Host "Axonyx Revolt - GUI Launcher" -ForegroundColor Cyan
Write-Host ("=" * 50) -ForegroundColor Gray
Write-Host ""
Write-Host "Usage:" -ForegroundColor Yellow
Write-Host " .\launch_gui.ps1 -Backend # Start backend API only" -ForegroundColor White
Write-Host " .\launch_gui.ps1 -GUI # Start GUI only" -ForegroundColor White
Write-Host " .\launch_gui.ps1 -Both # Start both (recommended)" -ForegroundColor White
Write-Host ""
Write-Host "Recommended: Run with -Both flag" -ForegroundColor Cyan
Write-Host ""
$choice = Read-Host "Start both? (y/n)"
if ($choice -eq 'y' -or $choice -eq 'Y') {
Start-Both
}
}