fix: use Verstak brand icon in desktop builds

This commit is contained in:
2026-07-15 19:17:13 +08:00
parent 6eeebd39ad
commit bf965e8bf3
10 changed files with 109 additions and 1 deletions
+2
View File
@@ -35,6 +35,8 @@ fi
cd "$ROOT"
echo "=== verstak desktop Windows amd64 build ==="
"$ROOT/scripts/generate-brand-icons.sh"
if [[ ! -d "$ROOT/frontend/node_modules" ]]; then
if [[ -f "$ROOT/frontend/package-lock.json" ]]; then
(cd "$ROOT/frontend" && npm ci --no-audit --no-fund)
+2
View File
@@ -6,6 +6,8 @@ ROOT="$(cd "$(dirname "$0")/.." && pwd)"
echo "=== verstak-desktop build ==="
echo ""
"$ROOT/scripts/generate-brand-icons.sh"
# ── Dependency checks ──
echo "[deps]"
if ! command -v go &>/dev/null; then
+48
View File
@@ -0,0 +1,48 @@
#!/usr/bin/env bash
set -euo pipefail
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
MAGICK="${MAGICK_BIN:-magick}"
SOURCE="$ROOT/packaging/linux/verstak.svg"
if ! command -v "$MAGICK" >/dev/null; then
echo "ImageMagick is required to generate Verstak application icons: $MAGICK not found" >&2
exit 1
fi
if [[ ! -f "$SOURCE" ]]; then
echo "Verstak SVG icon source is missing: $SOURCE" >&2
exit 1
fi
render_png() {
local size="$1"
local target="$2"
mkdir -p "$(dirname "$target")"
"$MAGICK" -background none "$SOURCE" -resize "${size}x${size}" "PNG32:$target"
}
render_ico() {
local target="$1"
shift
local temporary
temporary="$(mktemp -d)"
local images=()
for size in "$@"; do
local image="$temporary/${size}.png"
render_png "$size" "$image"
images+=("$image")
done
mkdir -p "$(dirname "$target")"
"$MAGICK" "${images[@]}" "$target"
rm -rf "$temporary"
}
render_png 256 "$ROOT/internal/shell/tray/verstak.png"
render_ico "$ROOT/internal/shell/tray/verstak.ico" 16 20 24 32 48 256
# Wails consumes this PNG while it prepares the Windows executable resources.
# Both files are generated build inputs and therefore deliberately ignored by Git.
render_png 1024 "$ROOT/build/appicon.png"
render_ico "$ROOT/build/windows/icon.ico" 16 32 48 64 128 256
echo "generated Verstak tray and application icons from $SOURCE"
+2
View File
@@ -53,6 +53,8 @@ grep -Fq 'LinkId=2124701' "$ROOT/README.md"
grep -Fq 'WebView2 Runtime' "$ROOT/README.md"
grep -Fq 'package-deb.sh' "$ROOT/scripts/release.sh"
grep -Fq 'package-appimage.sh' "$ROOT/scripts/release.sh"
grep -Fq 'generate-brand-icons.sh' "$ROOT/scripts/build.sh"
grep -Fq 'generate-brand-icons.sh' "$ROOT/scripts/build-windows.sh"
grep -Fq 'package-windows-portable.sh' "$ROOT/scripts/release.sh"
git -C "$ROOT" check-ignore -q verstak-desktop-res.syso
grep -Fq 'chmod -R a+rX' "$ROOT/scripts/build-linux-bundle.sh"