34 lines
1.2 KiB
PowerShell
34 lines
1.2 KiB
PowerShell
# Build script for Windows
|
|
# This script builds Geek-life for different Windows architectures
|
|
|
|
Write-Host "Building Geek-life for Windows..." -ForegroundColor Green
|
|
|
|
# Create builds directory if it doesn't exist
|
|
if (!(Test-Path "builds")) {
|
|
New-Item -ItemType Directory -Path "builds"
|
|
}
|
|
|
|
# Build for Windows AMD64 (64-bit)
|
|
Write-Host "Building for Windows AMD64..." -ForegroundColor Yellow
|
|
$env:GOOS="windows"
|
|
$env:GOARCH="amd64"
|
|
go build -ldflags="-s -w" -o builds/geek-life_windows-amd64.exe ./app
|
|
|
|
# Build for Windows 386 (32-bit)
|
|
Write-Host "Building for Windows 386..." -ForegroundColor Yellow
|
|
$env:GOOS="windows"
|
|
$env:GOARCH="386"
|
|
go build -ldflags="-s -w" -o builds/geek-life_windows-386.exe ./app
|
|
|
|
# Build for Windows ARM64
|
|
Write-Host "Building for Windows ARM64..." -ForegroundColor Yellow
|
|
$env:GOOS="windows"
|
|
$env:GOARCH="arm64"
|
|
go build -ldflags="-s -w" -o builds/geek-life_windows-arm64.exe ./app
|
|
|
|
Write-Host "Build completed!" -ForegroundColor Green
|
|
Write-Host "Generated files:" -ForegroundColor Cyan
|
|
Get-ChildItem builds/geek-life_windows*.exe | Select-Object Name, Length | Format-Table -AutoSize
|
|
|
|
Write-Host "`nTo run the application:" -ForegroundColor Yellow
|
|
Write-Host " .\builds\geek-life_windows-amd64.exe" -ForegroundColor White |