-
-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathbuild-gui.ps1
More file actions
31 lines (26 loc) · 1.08 KB
/
build-gui.ps1
File metadata and controls
31 lines (26 loc) · 1.08 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
# Build script for MremoteGO (GUI + CLI combined)
Write-Host "Building MremoteGO..." -ForegroundColor Green
# Create bin directory if it doesn't exist
if (!(Test-Path -Path "bin")) {
New-Item -ItemType Directory -Path "bin" | Out-Null
}
# Build the application
# Using -H windowsgui to hide console window on Windows
if ($IsWindows -or $env:OS -match "Windows") {
go build -ldflags "-H windowsgui" -o mremotego.exe cmd/mremotego-gui/main.go cmd/mremotego-gui/theme.go
$outputFile = "mremotego.exe"
} else {
go build -o mremotego cmd/mremotego-gui/main.go cmd/mremotego-gui/theme.go
$outputFile = "mremotego"
}
if ($LASTEXITCODE -eq 0) {
Write-Host "✓ Build successful: $outputFile" -ForegroundColor Green
Write-Host " Run GUI: ./$outputFile" -ForegroundColor Cyan
Write-Host " Run CLI: ./$outputFile --help" -ForegroundColor Cyan
# Show file size
$fileSize = (Get-Item $outputFile).Length / 1MB
Write-Host "File size: $([math]::Round($fileSize, 2)) MB" -ForegroundColor Gray
} else {
Write-Host "✗ Build failed" -ForegroundColor Red
exit 1
}