#!/usr/bin/env bash # Probe what this checkout can actually build with, before planning asset work. # Prints a short report; never downloads anything, never fails the caller. set -uo pipefail repo_root="$(cd "$(dirname "${BASH_SOURCE[0]}")/../../.." && pwd)" cd "$repo_root" || exit 0 say() { printf '%s\n' "$*"; } hr() { printf -- '---\n'; } say "Makepad game asset probe" say "repo: $repo_root" hr # --- toolchain ------------------------------------------------------------- if command -v cargo >/dev/null 2>&1; then say "cargo: $(cargo --version 2>/dev/null)" say "rustc: $(rustc --version 2>/dev/null)" else say "cargo: MISSING - nothing in this pack can be verified without it" fi command -v ffmpeg >/dev/null 2>&1 \ && say "ffmpeg: present (download_assets.sh --transcode available)" \ || say "ffmpeg: absent (ogg->wav transcode unavailable; decoder still works)" hr # --- game crates ----------------------------------------------------------- say "game crates present:" for c in render gen blocks audio script net session coedit pkg assets; do if [ -f "libs/game/$c/Cargo.toml" ]; then say " ok libs/game/$c" else say " MISSING libs/game/$c" fi done [ -f "libs/sim/Cargo.toml" ] && say " ok libs/sim" || say " MISSING libs/sim" [ -f "libs/sim/math/Cargo.toml" ] && say " ok libs/sim/math" || say " MISSING libs/sim/math" [ -f "apps/arcade/Cargo.toml" ] && say " ok apps/arcade" || say " MISSING apps/arcade" hr # --- asset library --------------------------------------------------------- res="apps/arcade/resources" if [ -d "$res" ]; then say "resources dir: $res" [ -f "$res/MIRROR.toml" ] && say " MIRROR.toml present ($(grep -c '^\[' "$res/MIRROR.toml" 2>/dev/null || echo '?') entries)" [ -f "$res/CREDITS.toml" ] && say " CREDITS.toml present" else say "resources dir: absent" fi found_assets=0 for d in "$res/assets" "$res/models" "$res/packs" apps/arcade/assets; do if [ -d "$d" ]; then n_glb=$(find "$d" -type f \( -name '*.glb' -o -name '*.gltf' \) 2>/dev/null | wc -l | tr -d ' ') n_aud=$(find "$d" -type f \( -name '*.ogg' -o -name '*.wav' \) 2>/dev/null | wc -l | tr -d ' ') say " $d: $n_glb models, $n_aud sounds" found_assets=$((found_assets + n_glb + n_aud)) fi done if [ "$found_assets" -eq 0 ]; then say "" say "NO ASSETS DOWNLOADED." say "The game still runs on primitives and asset-dependent tests skip." say "For real geometry, fetch once:" say " ./apps/arcade/download_assets.sh # core, ~75 MB" say " ./apps/arcade/download_assets.sh --packs=all # full, ~185 MB" say "Or generate procedurally with makepad-game-gen (no download needed)." else say "" say "Assets present. Search by DESCRIPTION via makepad-game-assets (find_model /" say "find_cast), never by filename. Ids look like kenney/racing/vehicle-truck-yellow." fi hr # --- fetch script ---------------------------------------------------------- if [ -x "apps/arcade/download_assets.sh" ]; then say "download_assets.sh: executable" elif [ -f "apps/arcade/download_assets.sh" ]; then say "download_assets.sh: present, not executable (run: chmod +x apps/arcade/download_assets.sh)" else say "download_assets.sh: absent" fi say "" say "No paid API key is required by this pack. Library is CC0; gaps are filled" say "procedurally with makepad-game-gen." exit 0