From ff4fd37cdc07386f0cce8e2866efec8d17e41ba5 Mon Sep 17 00:00:00 2001 From: niklascfw Date: Wed, 15 Jul 2026 23:02:43 +0200 Subject: [PATCH] Fix exosphere build after checkout path rename. Clean stale absolute dependency paths when the tree moved, and fail the script instead of copying an old binary. --- build-exosphere.sh | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/build-exosphere.sh b/build-exosphere.sh index 1a2f557d..c7d6340f 100755 --- a/build-exosphere.sh +++ b/build-exosphere.sh @@ -41,9 +41,25 @@ cp -v "$EXO_SRC/secmon_memory_layout.hpp" "$LIBEXO_DEST/" echo echo "*** Compiling exosphere ***" cd "$ATMOSPHERE_DIR/exosphere" || exit 1 -make -j"$CORES" + +# .d files store absolute source paths. If this checkout moved (e.g. renamed +# Horizon-OC -> Horizon-OC-pro), those deps point at a dead tree and make fails. +if grep -Rql --include='*.d' '/Desktop/Horizon-OC/' "$ATMOSPHERE_DIR" 2>/dev/null; then + echo "*** Cleaning stale build deps (old Horizon-OC absolute paths) ***" + make clean || true +fi + +make -j"$CORES" || { + echo "*** Build failed ***" >&2 + exit 1 +} cd "$ROOT_DIR" || exit 1 +if [ ! -f "$EXO_OUT" ]; then + echo "*** Missing output: $EXO_OUT ***" >&2 + exit 1 +fi + mkdir -p "$DIST_DIR/atmosphere" cp -v "$EXO_OUT" "$DIST_DIR/atmosphere/exosphere.bin"