Something went wrong. Try again.
A fast, lightweight, read-only Markdown viewer.
markdown go markdown-reader markdown-viewer desktop-app
Something went wrong. Try again.
12345678910111213141516171819202122232425262728293031323334#!/usr/bin/env bash# scripts/render-icons.sh: render the canonical sheaf mark (packaging/linux/# sheaf.svg) into the hicolor PNG size set under build/icons/, plus the master# build/appicon.png and the Windows .ico. Single source of truth: edit the# SVG, re-run this. Requires rsvg-convert (librsvg) and ImageMagick.## bash scripts/render-icons.shset -euo pipefail
REPO_ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"SVG="$REPO_ROOT/packaging/linux/sheaf.svg"ICON_NAME="com.doubledecimal.sheaf" # reverse-DNS; matches the .desktop + app-idSIZES=(16 32 48 64 128 256 512 1024)
command -v rsvg-convert >/dev/null || { echo "need rsvg-convert (librsvg)" >&2; exit 1; }command -v magick >/dev/null || { echo "need ImageMagick (magick)" >&2; exit 1; }
# per-size PNGs for hicolor ($size x $size/apps/<icon-name>.png)for s in "${SIZES[@]}"; do out="$REPO_ROOT/build/icons/${s}x${s}" mkdir -p "$out" rsvg-convert -w "$s" -h "$s" "$SVG" -o "$out/${ICON_NAME}.png"done
# master PNG that Wails embeds (Linux runtime icon) and uses for packagingrsvg-convert -w 1024 -h 1024 "$SVG" -o "$REPO_ROOT/build/appicon.png"
# Windows icon resourcemagick "$REPO_ROOT/build/appicon.png" \ -define icon:auto-resize=256,128,96,64,48,32,16 \ "$REPO_ROOT/build/windows/icon.ico"
echo "rendered icons from $(basename "$SVG") -> build/icons/ (${ICON_NAME}.png), build/appicon.png, build/windows/icon.ico"