Initial commit
This commit is contained in:
57
build_app.sh
Normal file
57
build_app.sh
Normal file
@@ -0,0 +1,57 @@
|
||||
#!/bin/bash
|
||||
|
||||
# 1. Pfad-Fix für Go-Tools (damit 'fyne' gefunden wird)
|
||||
export PATH=$PATH:$(go env GOPATH)/bin
|
||||
|
||||
# 2. Variablen definieren
|
||||
APP_NAME="Countdown Pro"
|
||||
APP_ID="com.thomas.countdown.pro"
|
||||
VERSION="1.0.5"
|
||||
AUTHOR="Thomas Krampe"
|
||||
COPYRIGHT="© 2026 $AUTHOR. Alle Rechte vorbehalten."
|
||||
DMG_NAME="Countdown-Pro-Installer.dmg"
|
||||
|
||||
echo "🚀 Phase 1: Aufräumen..."
|
||||
rm -rf "$APP_NAME.app"
|
||||
rm -f "$DMG_NAME"
|
||||
|
||||
echo "🔨 Phase 2: Paketieren mit Fyne..."
|
||||
# Wir nutzen -app-version und -name
|
||||
fyne package -id "$APP_ID" -icon icon.png -app-version "$VERSION" -name "$APP_NAME"
|
||||
|
||||
echo "📝 Phase 3: Metadaten und Copyright injizieren..."
|
||||
PLIST="$APP_NAME.app/Contents/Info.plist"
|
||||
if [ -f "$PLIST" ]; then
|
||||
# Setzt Copyright und stellt sicher, dass der Anzeigename stimmt
|
||||
defaults write "$(pwd)/$PLIST" NSHumanReadableCopyright "$COPYRIGHT"
|
||||
defaults write "$(pwd)/$PLIST" CFBundleDisplayName "$APP_NAME"
|
||||
defaults write "$(pwd)/$PLIST" CFBundleName "$APP_NAME"
|
||||
plutil -convert xml1 "$PLIST"
|
||||
echo "✅ Metadaten in Info.plist aktualisiert."
|
||||
else
|
||||
echo "❌ Fehler: Info.plist nicht gefunden!"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
echo "📦 Phase 4: DMG Installer erstellen..."
|
||||
# Prüfen, ob create-dmg installiert ist
|
||||
if ! command -v create-dmg &> /dev/null; then
|
||||
echo "⚠️ 'create-dmg' nicht gefunden. Installiere es mit: brew install create-dmg"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
create-dmg \
|
||||
--volname "$APP_NAME Setup" \
|
||||
--window-pos 200 120 \
|
||||
--window-size 600 400 \
|
||||
--icon-size 100 \
|
||||
--icon "$APP_NAME.app" 150 190 \
|
||||
--hide-extension "$APP_NAME.app" \
|
||||
--app-drop-link 450 185 \
|
||||
"$DMG_NAME" \
|
||||
"$APP_NAME.app"
|
||||
|
||||
echo "--------------------------------------------------"
|
||||
echo "🎉 FERTIG! Deine App ist bereit zum Verschicken."
|
||||
echo "📂 Datei: $DMG_NAME"
|
||||
echo "--------------------------------------------------"
|
||||
Reference in New Issue
Block a user