Files
wadamesh/tanmatsu/fetch-deps.sh
T
Kaj SchittecatandClaude Opus 4.8 492d0886ec touch: beta_25 (test) — contacts-list refresh, advertise-on-boot, Tanmatsu SD tiles + persistence
- Contacts list rebuilds on advert (force past the count-cache) + a count-delta safety
  net, so a node discovered off-tab or added by the phone app shows immediately (#73)
- New "Advertise on boot" toggle in the Advertise app, off by default (#76)
- Tanmatsu: cache Wi-Fi map tiles on microSD (the P4's internal FFat metadata layer is
  broken — f_getfree/f_stat lie); read tiles via open() not the misreporting exists()/size()
- Tanmatsu: persist contacts/channels/chat on microSD (DataStore secondary FS + chat
  history) so they survive reboot; identity/prefs stay on the (working) internal FFat
- Tanmatsu: boot fix (drop Serial.begin re-init of USB-Serial-JTAG), MQTT disabled, popups
  fit + scroll, keyboard-nav scoped to the open popup, 2000 contacts, Large UI default
- Emoji/quick-reply Esc/red-X closes the popup not the chat; lock-screen unlock after msg-wake

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-01 23:28:13 +02:00

61 lines
3.4 KiB
Bash
Executable File

#!/usr/bin/env bash
# Populate tanmatsu/components/ with the MeshCore core + the Arduino libraries wadamesh needs,
# sourced from PlatformIO's already-resolved libdeps. Run an S3 build first to populate them:
# /Users/kaj/Library/Python/3.9/bin/pio run -e LilyGo_TDeck_companion_radio_touch
# Vendored payloads are gitignored (regenerate with this script); the committed component
# wrappers (components/meshcore/CMakeLists.txt, components/ardlibs/CMakeLists.txt, the
# esp_hosted override) are tracked.
set -euo pipefail
cd "$(dirname "$0")"
LIBDEPS="../.pio/libdeps/LilyGo_TDeck_companion_radio_touch"
[ -d "$LIBDEPS/MeshCore" ] || { echo "!! $LIBDEPS/MeshCore missing — run an S3 'pio run' first"; exit 1; }
mkdir -p components
# --- MeshCore core: copy src/ + variants/ under the committed meshcore wrapper ---
rm -rf components/meshcore/core
mkdir -p components/meshcore/core
cp -R "$LIBDEPS/MeshCore/src" components/meshcore/core/src
cp -R "$LIBDEPS/MeshCore/variants" components/meshcore/core/variants 2>/dev/null || true
mkdir -p components/meshcore/core/lib
cp -R "$LIBDEPS/MeshCore/lib/ed25519" components/meshcore/core/lib/ed25519 # bundled C ed25519 (Identity.cpp)
echo "vendored: meshcore core ($(find components/meshcore/core/src -name '*.cpp' | wc -l | tr -d ' ') cpp)"
# --- LVGL 8.4 (own component; big; uses the repo's include/lv_conf.h) ---
rm -rf components/lvgl/upstream
mkdir -p components/lvgl
cp -R "$LIBDEPS/lvgl" components/lvgl/upstream
echo "vendored: lvgl ($(find components/lvgl/upstream/src -name '*.c' | wc -l | tr -d ' ') c)"
# --- Arduino libraries: ALL go into ONE 'ardlibs' component so inter-library #includes
# resolve without per-lib REQUIRES (e.g. RTClib -> Adafruit BusIO). Payload gitignored. ---
rm -rf components/ardlibs/upstream
mkdir -p components/ardlibs/upstream
vend() { # vend <libdeps-subdir>
local src="$1"; local dst="${src// /_}" # spaces in dir names break IDF component-req matching
[ -d "$LIBDEPS/$src" ] || { echo " skip ($src not in libdeps)"; return; }
cp -R "$LIBDEPS/$src" "components/ardlibs/upstream/$dst"
echo " + $src -> $dst"
}
# the core's own lib_deps (minus RadioLib — replaced by the TanmatsuLoraRadio bridge) + their deps:
vend "Crypto"
vend "RTClib"
vend "Adafruit BusIO" # RTClib + RV3028 need Adafruit_I2CDevice.h
vend "Adafruit Unified Sensor"
vend "Melopero RV3028"
vend "CayenneLPP"
vend "ArduinoJson" # header-only; some core/app files include it
vend "base64" # base64.hpp (companion / QR code paths)
# app-layer libs (validate they build on P4; used once wadamesh_app is wired):
vend "MicroNMEA" # GPS NMEA parsing
vend "AsyncTCP" # the core's ESP32Board HTTP-OTA + companion-over-IP transport
vend "ESPAsyncWebServer" # WebSocket/HTTP companion server (needs the task WDT on — sdkconfigs/wadamesh)
vend "AsyncElegantOTA" # OTA web UI (the core's ESP32Board HTTP-OTA)
# NOTE: PubSubClient is deliberately NOT vended — the MQTT bridge is compiled out on the Tanmatsu
# (HAS_TANMATSU no-op stub in MqttBridge.h); the P4's esp-hosted Wi-Fi isn't wired for it and it
# crashed the app at boot. Re-add this vend if MQTT is ever brought up on the P4.
# Bump the component CMakeLists so the next build re-globs (IDF component scripts can't use
# file(GLOB CONFIGURE_DEPENDS) — they run in script mode during requirement expansion).
touch components/meshcore/CMakeLists.txt components/ardlibs/CMakeLists.txt 2>/dev/null || true
echo "done."