Files
sshtermy/tools/icon/pack.py
T
Claude 57bb8e67ff App-Icon „Phosphor“ für Windows, macOS, Linux und die Webseite
- assets/icon: grünes >_ mit Matrix-Regen, alle Größen als PNG, .ico, .icns;
  16–64 px als vereinfachte Fassung, damit sie lesbar bleibt
- Windows: Icon als Ressource in sshtermy.exe (rsrc_windows_*.syso, eigenes
  Werkzeug tools/icon/winres ohne Fremdabhängigkeit)
- macOS: sshTermy.app bekommt das Icon; das Programm legt es selbst in die
  .app, so erhalten auch bestehende Installationen es nach dem Update
- Linux: .deb mit hicolor-Icons und Startmenü-Eintrag
- Webseite: Favicon, Apple-Touch-Icon, Logo in der Kopfzeile; README
- make icon erzeugt alles neu

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018i4GUhyZeAnaXMQzGXmQU3
2026-11-09 07:49:34 +00:00

25 lines
1.2 KiB
Python
Raw Blame History

This file contains ambiguous Unicode characters
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 python3
"""PNGs → sshtermy.ico (Windows) und sshtermy.icns (macOS), braucht Pillow."""
import os
from PIL import Image
D = os.path.join(os.path.dirname(__file__), "..", "..", "assets", "icon")
img = lambda n: Image.open(os.path.join(D, n)).convert("RGBA")
# .ico: jede Größe aus ihrer eigenen PNG (16–64 kleine Fassung)
sizes = [16, 24, 32, 48, 64, 128, 256]
# Pillow nimmt nur Größen ≤ erstes Bild, darum die größte zuerst
first, rest = img(f"sshtermy-{sizes[-1]}.png"), [img(f"sshtermy-{s}.png") for s in sizes[:-1]]
first.save(os.path.join(D, "sshtermy.ico"), sizes=[(s, s) for s in sizes], append_images=rest)
# .icns: Mac-Fassung, Pillow erzeugt alle Retina-Stufen aus 1024
img("mac-1024.png").save(os.path.join(D, "sshtermy.icns"))
print("sshtermy.ico sshtermy.icns")
# Webseite (site/ wird so wie es ist auf GitHub Pages kopiert)
S = os.path.join(os.path.dirname(__file__), "..", "..", "site")
img("sshtermy-32.png").save(os.path.join(S, "favicon.png"))
img("sshtermy-64.png").save(os.path.join(S, "logo.png"))
img("sshtermy-1024.png").resize((180, 180), Image.LANCZOS).save(os.path.join(S, "apple-touch-icon.png"))
print("site/favicon.png site/logo.png site/apple-touch-icon.png")