Former/build-windows.sh

21 lines
764 B
Bash
Executable File

#!/bin/bash
# Cross-compile Former for Windows (amd64) from macOS/Linux
set -e
# Generate app icon (needs CGO on macOS for native SVG rendering)
echo "Generating app icon..."
if [[ "$OSTYPE" == darwin* ]]; then
SDKROOT=$(xcrun --show-sdk-path) CC=/usr/bin/clang CGO_ENABLED=1 \
go run ./cmd/genicon 2>/dev/null && echo "Icon generated." || echo "Icon generation skipped."
else
CGO_ENABLED=0 go run ./cmd/genicon 2>/dev/null && echo "Icon generated." || echo "Icon generation skipped."
fi
WAILS=$(command -v wails || echo "$HOME/go/bin/wails")
echo "Building Former for Windows (amd64)..."
CGO_ENABLED=0 "$WAILS" build -skipbindings -platform windows/amd64
echo ""
ls -lh build/bin/Former.exe 2>/dev/null && echo "Done." || echo "Build failed."