mirror of
https://github.com/got-feedBack/feedBack-desktop.git
synced 2026-08-11 03:09:56 +00:00
build: bundle starter content + fix diagnostic sloppak name skew (#78)
Copy core's content/starter/*.feedpak into the bundle so
server._seed_builtin_starter_content() can seed it into the library on first
run of packaged builds. Also fix a rename skew: the builtin diagnostic copy
looked for docs/diagnostics/slopsmith-diagnostic-basic-guitar.sloppak, but core
renamed it to feedBack-diagnostic-basic-guitar.sloppak — so the diagnostic
seeding was silently skipped in packaged builds ("not found" warning). Point at
the feedBack-* name to match server.py's _BUILTIN_DIAGNOSTIC_SOURCES.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.8
parent
8083fc2b2c
commit
336cbda8ef
@@ -64,8 +64,9 @@ rm -rf "$BUNDLE_DIR/static/art" "$BUNDLE_DIR/static/sloppak_cache"
|
||||
find "$BUNDLE_DIR/static" -maxdepth 1 -name 'audio_*.mp3' -delete
|
||||
|
||||
# Builtin diagnostic sloppak — server._seed_builtin_diagnostic_sloppaks() copies
|
||||
# this into DLC_DIR/diagnostics-builtin/ on library scan startup.
|
||||
DIAG_SLOPPAK="$SLOPSMITH_DIR/docs/diagnostics/slopsmith-diagnostic-basic-guitar.sloppak"
|
||||
# this into DLC_DIR/diagnostics-builtin/ on library scan startup. The source path
|
||||
# must match server.py's _BUILTIN_DIAGNOSTIC_SOURCES (feedBack-*, not slopsmith-*).
|
||||
DIAG_SLOPPAK="$SLOPSMITH_DIR/docs/diagnostics/feedBack-diagnostic-basic-guitar.sloppak"
|
||||
if [ -f "$DIAG_SLOPPAK" ]; then
|
||||
mkdir -p "$BUNDLE_DIR/docs/diagnostics"
|
||||
cp "$DIAG_SLOPPAK" "$BUNDLE_DIR/docs/diagnostics/"
|
||||
@@ -73,6 +74,26 @@ else
|
||||
echo "WARNING: diagnostic sloppak not found at $DIAG_SLOPPAK — builtin seeding will skip in packaged builds" >&2
|
||||
fi
|
||||
|
||||
# Builtin starter content — server._seed_builtin_starter_content() copies these
|
||||
# into DLC_DIR/starter/ once on first run so a fresh install ships a playable
|
||||
# library. Source path must match server.py's _BUILTIN_STARTER_SOURCES.
|
||||
STARTER_SRC="$SLOPSMITH_DIR/content/starter"
|
||||
if [ -d "$STARTER_SRC" ]; then
|
||||
# Explicit no-match detection ([ -e ]) instead of relying on cp failing —
|
||||
# so a real cp error (unreadable source, disk full) still aborts under
|
||||
# `set -e` rather than being swallowed as "no starter feedpaks".
|
||||
starter_paks=("$STARTER_SRC"/*.feedpak)
|
||||
if [ -e "${starter_paks[0]:-}" ]; then
|
||||
mkdir -p "$BUNDLE_DIR/content/starter"
|
||||
cp "${starter_paks[@]}" "$BUNDLE_DIR/content/starter/"
|
||||
echo " Bundled starter content: ${#starter_paks[@]} feedpak(s)"
|
||||
else
|
||||
echo "WARNING: no starter feedpaks in $STARTER_SRC — starter seeding will skip in packaged builds" >&2
|
||||
fi
|
||||
else
|
||||
echo "WARNING: content/starter not found — starter seeding will skip in packaged builds" >&2
|
||||
fi
|
||||
|
||||
# Cross-platform "cp -r minus .git" — Git Bash on Windows doesn't ship
|
||||
# rsync, so we can't rely on `rsync --exclude=.git`. Plain `cp -r`
|
||||
# followed by stripping any nested `.git/` directories works on
|
||||
|
||||
Reference in New Issue
Block a user