#!/bin/bash set -e SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)" cd "$SCRIPT_DIR" VERSION="2.0.$(cat last-release)" echo "=== Building Tick's Tales v${VERSION} ===" echo "" echo "=== Cleaning ===" rm -rf target/windows target/linux target/osx target/osx-arm64 2>/dev/null || true echo "=== Building uberjar ===" LEIN_SNAPSHOTS_IN_RELEASE=true lein with-profile steam do clean, compile, uberjar 2>&1 | tail -5 echo "" echo "=== Building Windows x64 ===" java -jar packr.jar build-windows.json # Note: Windows icon embedding requires rcedit on Windows or wine # The icon folder will be present for manual setup echo "" echo "=== Building Linux x64 ===" java -jar packr.jar build-linux-64.json cp tickstales.desktop target/linux/amd64/ mkdir -p target/linux/amd64/icons cp resources/icon/icon_128x128.png target/linux/amd64/icons/tickstales.png echo "" echo "=== Building macOS x64 ===" java -jar packr.jar build-osx.json cp icons.icns "target/osx/Tick's Tales.app/Contents/Resources/" sed -i "s/1.0/${VERSION}/" "target/osx/Tick's Tales.app/Contents/Info.plist" echo "" echo "=== Building macOS ARM64 ===" java -jar packr.jar build-osx-arm64.json cp icons.icns "target/osx-arm64/Tick's Tales.app/Contents/Resources/" sed -i "s/1.0/${VERSION}/" "target/osx-arm64/Tick's Tales.app/Contents/Info.plist" echo "" echo "=== Build Complete ===" echo "" echo "Sizes:" du -sh target/windows target/linux/amd64 "target/osx/Tick's Tales.app" "target/osx-arm64/Tick's Tales.app" echo "" echo "Artifacts:" echo " Windows: target/windows/TicksTales.exe" echo " Linux: target/linux/amd64/Tick's Tales" echo " macOS: target/osx/Tick's Tales.app" echo " macOS ARM: target/osx-arm64/Tick's Tales.app"