-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-all.ps1
More file actions
33 lines (26 loc) · 1.13 KB
/
Copy pathbuild-all.ps1
File metadata and controls
33 lines (26 loc) · 1.13 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
$ReleaseDir = "target/release"
# Build headless version without default features
Write-Host "`nBuilding Capsense-headless..." -ForegroundColor Green
cargo build --release --no-default-features
if ($LASTEXITCODE -ne 0) {
Write-Host "Error building headless version!" -ForegroundColor Red
exit 1
}
# Rename headless version
$HeadlessExe = "$ReleaseDir/Capsense.exe"
$HeadlessTarget = "$ReleaseDir/Capsense-headless.exe"
if (Test-Path $HeadlessExe) {
Move-Item -Path $HeadlessExe -Destination $HeadlessTarget -Force
Write-Host "Renamed headless version to Capsense-headless.exe" -ForegroundColor Gray
}
# Build GUI version with default features
Write-Host "Building Capsense (with GUI)..." -ForegroundColor Green
cargo build --release
if ($LASTEXITCODE -ne 0) {
Write-Host "Error building GUI version!" -ForegroundColor Red
exit 1
}
Write-Host "Both versions built successfully!" -ForegroundColor Green
Write-Host "Output files:" -ForegroundColor Cyan
Write-Host " - GUI version: target/release/Capsense.exe" -ForegroundColor Yellow
Write-Host " - Headless version: target/release/Capsense-headless.exe" -ForegroundColor Yellow