-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathagave.ps1
More file actions
56 lines (54 loc) · 1.82 KB
/
agave.ps1
File metadata and controls
56 lines (54 loc) · 1.82 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
param(
[string]$Command = ""
)
function Show-Help {
Write-Host ""
Write-Host "Agave Project Tasks (PowerShell)"
Write-Host "-------------------------------"
Write-Host "install-stuff Install cargo-wasi"
Write-Host "build Build the project"
Write-Host "build-app-terminal Build the terminal app (WASM)"
Write-Host "run Run the project build"
Write-Host "run-qemu Run QEMU BIOS"
Write-Host "run-all Build terminal app and run QEMU"
Write-Host "qemu Launch QEMU with custom options"
Write-Host ""
Write-Host "Usage: .\agave.ps1 <command>"
Write-Host "Example: .\agave.ps1 build-app-terminal"
}
switch ($Command) {
"install-stuff" {
Write-Host "Installing cargo-wasi..."
cargo install cargo-wasi
}
"build" {
Write-Host "Building project..."
cargo run --release build
}
"build-app-terminal" {
Write-Host "Building terminal app (WASM)..."
Push-Location apps/terminal
cargo build --release --target wasm32-wasip1
Pop-Location
}
"run" {
Write-Host "Running project build..."
cargo run --release build
}
"run-qemu" {
Write-Host "Running QEMU BIOS..."
cargo run --release --bin qemu-bios
}
"run-all" {
Write-Host "Building terminal app and running QEMU..."
& .\agave.ps1 build-app-terminal
& .\agave.ps1 run-qemu
}
"qemu" {
Write-Host "Launching QEMU with custom options..."
qemu-system-x86_64 -nodefaults -m 2G -smp 2 -device virtio-mouse-pci -device virtio-keyboard-pci -nic user,model=virtio-net-pci -device virtio-vga-gl -display sdl,gl=on -serial stdio -drive format=raw,file=./target/release/uefi.img -bios ovmf
}
Default {
Show-Help
}
}