mirror of
https://github.com/storytold/deckcraft.git
synced 2026-10-24 18:46:57 -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>
40 lines
1.6 KiB
Bash
Executable File
40 lines
1.6 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the browser version and zip it: $DIST/slidecraft-web-<version>.zip
|
|
#
|
|
# Usage: packaging/web/package.sh [--skip-build]
|
|
#
|
|
# Needs: trunk (brew install trunk / cargo install trunk --locked) and the wasm32-unknown-unknown
|
|
# target. The zip holds a self-contained static site in slidecraft-web-<version>/ that works
|
|
# from any URL path and inside an <iframe>. Hosting notes: packaging/web/README.md.
|
|
set -euo pipefail
|
|
# shellcheck source=../common.sh
|
|
. "$(dirname "${BASH_SOURCE[0]}")/../common.sh"
|
|
HERE="$ROOT/packaging/web"
|
|
|
|
if [ "${1:-}" != "--skip-build" ]; then
|
|
command -v trunk >/dev/null || { echo "error: trunk not found (cargo install trunk --locked)" >&2; exit 1; }
|
|
(cd "$ROOT/apps/slidecraft-web" && trunk build --release)
|
|
fi
|
|
|
|
SITE="$ROOT/dist/web"
|
|
[ -f "$SITE/index.html" ] || { echo "error: $SITE/index.html missing; run without --skip-build" >&2; exit 1; }
|
|
# Paths must be relative so the site works under any prefix (public_url = "./" in Trunk.toml).
|
|
if grep -Eq '(src|href)="/[^/]' "$SITE/index.html"; then
|
|
echo "error: $SITE/index.html has root-absolute URLs; it would break when served from a sub-path" >&2
|
|
exit 1
|
|
fi
|
|
|
|
NAME="slidecraft-web-$VERSION"
|
|
WORK="$CARGO_TARGET_DIR/web-package"
|
|
rm -rf "$WORK"
|
|
mkdir -p "$WORK/$NAME"
|
|
cp -R "$SITE/." "$WORK/$NAME/"
|
|
# Sample server configs (MIME type, caching, compression); harmless where unused.
|
|
cp "$HERE/_headers" "$HERE/.htaccess" "$WORK/$NAME/"
|
|
cp "$HERE/README.md" "$WORK/$NAME/HOSTING.md"
|
|
copy_docs "$WORK/$NAME"
|
|
rm -f "$DIST/$NAME.zip"
|
|
(cd "$WORK" && zip -qr9 "$DIST/$NAME.zip" "$NAME")
|
|
echo "wrote $DIST/$NAME.zip"
|
|
ls -lh "$DIST/$NAME.zip"
|