claude-desktop/scripts/gen-icon.sh
Eddy 29cce7fbd8
All checks were successful
Build AppImage / build (push) Successful in 6m37s
[appimage] UI-Polish: Icon, Stop-Button dezent, Chat-Queue, Update-Safety
- Neues Icon-Set (SVG-Quelle + gen-icon.sh): 32/64/128/256/512+@2x in depth=8
  (Tauri-Tray erwartet 8-bit-RGBA, depth=16 crashte den Tray-Setup)
- StopButton: Icon-only (⏹), Position Titlebar rechts, nur sichtbar wenn
  isProcessing aktiv. Kein full-width roter Balken im Footer mehr.
- .footer.active-Farbwechsel entfernt — Footer bleibt neutral
- Version-Badge in der Titlebar (v<APP_VERSION>)
- Chat-Input-Queue: Single-Slot-Puffer. Beim Senden waehrend Processing wird
  die Nachricht gepuffert, Pill "Nachricht wartet..." erscheint, nach Ende
  der aktuellen Antwort wird automatisch abgeschickt.
- Stop verwirft den gepufferten Slot (bewusster Abbruch).
- apply_update: ELF-Header-Smoke-Test vor Rename. Kaputter Download oder
  falsche Architektur liefert Fehlerdialog statt zerschossene Installation.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-20 11:52:43 +02:00

48 lines
1.6 KiB
Bash
Raw Permalink Blame History

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/usr/bin/env bash
# Erzeugt alle Icon-Groessen fuer Tauri aus scripts/icon.svg.
# Braucht ImageMagick (auf Nix: via nix-shell automatisch verfuegbar).
#
# Aufruf: ./scripts/gen-icon.sh
# Ergebnis: src-tauri/icons/{icon.png, 32x32.png, 128x128.png, 128x128@2x.png}
set -euo pipefail
cd "$(dirname "$0")/.."
SVG="scripts/icon.svg"
OUT="src-tauri/icons"
if [ ! -f "$SVG" ]; then
echo "$SVG nicht gefunden" >&2; exit 1
fi
mkdir -p "$OUT"
# ImageMagick aus Nix ziehen falls nicht vorhanden
if ! command -v magick >/dev/null && ! command -v convert >/dev/null; then
echo " ImageMagick fehlt — ziehe aus nixpkgs"
IM=$(nix-build '<nixpkgs>' -A imagemagick --no-out-link 2>/dev/null || true)
[ -n "$IM" ] && export PATH="$IM/bin:$PATH" || { echo "❌ ImageMagick nicht bezogen"; exit 1; }
fi
# Moderne ImageMagick nutzt `magick`, aeltere `convert`
if command -v magick >/dev/null; then IM_CMD="magick"; else IM_CMD="convert"; fi
echo "Generiere Icons aus $SVG mit $IM_CMD..."
# WICHTIG: -depth 8 erzwingen — sonst erzeugt ImageMagick aus hoher SVG-Density
# 16-bit-RGBA-PNGs. Tauris Tray-Icon-Crate erwartet 8-bit RGBA (4 Byte/Pixel).
for size in 32 64 128 256 512; do
$IM_CMD -background none -density 400 "$SVG" -resize "${size}x${size}" -depth 8 "$OUT/${size}x${size}.png"
echo "$OUT/${size}x${size}.png"
done
# Retina-Variante (Tauri-Konvention)
$IM_CMD -background none -density 400 "$SVG" -resize 256x256 -depth 8 "$OUT/128x128@2x.png"
echo "$OUT/128x128@2x.png"
# Haupt-Icon
cp "$OUT/512x512.png" "$OUT/icon.png"
echo "$OUT/icon.png (Haupt-Icon 512x512)"
echo
echo "✅ Fertig. Icons in $OUT/:"
ls -l "$OUT"/*.png