mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-27 20:16:50 -06:00
- apps/slidecraft-web: SlideApp in the browser via eframe's web runner (trunk; WebGPU with WebGL2 fallback). Opens the sample deck (?blank for empty, ?show to present, ?webgl to force WebGL2). Open/Insert use the browser file picker through Services::open_async + inbox; Save/Export download; dropped files are read asynchronously. - ui-egui: native-only synchronous drop handling (wasm uses the inbox), real clock on wasm (js_sys::Date::now), About shows build commit/date when SLIDECRAFT_BUILD_SHA/DATE are set. - .github/workflows/release.yml (push to `release` / workflow_dispatch): macOS universal signed+notarized dmg, Windows x64/x86 signed msi + portable zip, Linux AppImage/deb/rpm/tar.gz (x86_64, aarch64), Flatpak bundle, FreeBSD tar.gz (vmactions), web zip; draft GitHub Release "SlideCraft v<version>" from [workspace.package] version. Same secret names as DesignCraft. - freebsd.yml and packaging-lint.yml CI, ported from DesignCraft. - packaging/: macOS (Info.plist, entitlements, cert import), Windows (WiX with new UpgradeCode, .slidecraft ProgId, Open-with for pptx), Linux (.desktop, AppStream, MIME, nfpm, Flatpak), FreeBSD and web scripts; shared setup in packaging/common.sh. - apps/slidecraft/build.rs embeds icon + VERSIONINFO on Windows; slidecraft.icns/.ico generated from the committed PNGs by packaging/icons.sh. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
49 lines
1.7 KiB
Bash
Executable File
49 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
||
# Regenerate the platform app icons from the committed PNGs in assets/app-icon/:
|
||
#
|
||
# assets/app-icon/slidecraft.ico Windows (16–256 px, from hicolor/*)
|
||
# assets/app-icon/slidecraft.icns macOS (16–1024 px, from slidecraft-1024.png; needs sips + iconutil)
|
||
#
|
||
# The PNGs themselves are rendered by SlideCraft from assets/app-icon/icon-source.slidecraft.
|
||
# The outputs are committed, so builds and packaging never need these tools; package scripts
|
||
# call this only when an output is missing.
|
||
#
|
||
# packaging/icons.sh [ico] [icns] (default: both)
|
||
set -euo pipefail
|
||
ROOT="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
||
DIR="$ROOT/assets/app-icon"
|
||
ID="ai.storyteller.slidecraft"
|
||
SRC="$DIR/slidecraft-1024.png"
|
||
WANT="${*:-ico icns}"
|
||
TMP="$(mktemp -d)"
|
||
trap 'rm -rf "$TMP"' EXIT
|
||
|
||
case " $WANT " in
|
||
*" ico "*)
|
||
ICO_PNGS=()
|
||
for s in 16 24 32 48 64 128 256; do
|
||
ICO_PNGS+=("$DIR/hicolor/${s}x${s}/apps/$ID.png")
|
||
done
|
||
(cd "$ROOT" && cargo run -q -p xtask -- ico "$DIR/slidecraft.ico" "${ICO_PNGS[@]}")
|
||
echo "wrote $DIR/slidecraft.ico"
|
||
;;
|
||
esac
|
||
|
||
case " $WANT " in
|
||
*" icns "*)
|
||
if command -v iconutil >/dev/null && command -v sips >/dev/null; then
|
||
SET="$TMP/slidecraft.iconset"
|
||
mkdir -p "$SET"
|
||
for s in 16 32 128 256 512; do
|
||
sips -z "$s" "$s" "$SRC" --out "$SET/icon_${s}x${s}.png" >/dev/null
|
||
d=$((s * 2))
|
||
sips -z "$d" "$d" "$SRC" --out "$SET/icon_${s}x${s}@2x.png" >/dev/null
|
||
done
|
||
iconutil -c icns -o "$DIR/slidecraft.icns" "$SET"
|
||
echo "wrote $DIR/slidecraft.icns"
|
||
else
|
||
echo "warning: sips/iconutil not found (macOS only); slidecraft.icns not regenerated" >&2
|
||
fi
|
||
;;
|
||
esac
|