Introduce gen_icons.sh to regenerate UI icons from a manifest file using the FreeInk SDK's Lucide icon set. Add icons.manifest mapping UI icons to Lucide names. Refactor vertical swipe list scrolling into a reusable wasListScroll() helper method used by both reader chapter selection and settings activities. Add static assertion to ensure ThemeMetrics scaling stays in sync with struct changes.
27 lines
1001 B
Bash
Executable File
27 lines
1001 B
Bash
Executable File
#!/usr/bin/env bash
|
|
# Regenerate src/components/icons/generated_icons.h from icons.manifest, using the
|
|
# FreeInk SDK icon generator and its vendored Lucide submodule. generated_icons.h is
|
|
# a committed build product of these inputs — re-run this after editing the manifest.
|
|
#
|
|
# Requires: rsvg-convert (librsvg) + Pillow, and the Lucide submodule fetched
|
|
# (git submodule update --init in the SDK).
|
|
set -euo pipefail
|
|
|
|
ROOT="$(cd "$(dirname "$0")/.." && pwd)"
|
|
SDK="$ROOT/freeink-sdk"
|
|
SVGDIR="$SDK/libs/assets/Icons/lucide/icons"
|
|
|
|
if [ ! -d "$SVGDIR" ]; then
|
|
echo "Lucide SVGs not found at $SVGDIR" >&2
|
|
echo "Fetch the submodule: git -C \"$SDK\" submodule update --init libs/assets/Icons/lucide" >&2
|
|
exit 1
|
|
fi
|
|
|
|
python3 "$SDK/libs/assets/Icons/tools/gen_icons.py" \
|
|
--manifest "$ROOT/src/components/icons/icons.manifest" \
|
|
--svgdir "$SVGDIR" \
|
|
--sizes 24,32,40,48 \
|
|
--out "$ROOT/src/components/icons/generated_icons.h"
|
|
|
|
echo "Regenerated src/components/icons/generated_icons.h"
|