From 9e9830a214b9d8e2033c9e80e72eae3cac28fcda Mon Sep 17 00:00:00 2001 From: Songlx516 Date: Sat, 5 Sep 2026 20:11:55 +0800 Subject: [PATCH] fix(build-elf.sh): include assets/* and gen-asset-module.py in change check The step 6 needs-rebuild loop only watched src/*.c, Makefile, and minizip/zlib headers. Frontend assets (assets/main.js, assets/index.html, lang-*.js) feed gen/*.c via gen-asset-module.py, so v1.8.3 (which touched no backend, only assets/) was silently classified as "no source change" and make was skipped. The ELF sha256 stayed at the v1.8.2 build. Fix: also iterate assets/* and gen-asset-module.py. Anyone changing a frontend file (and nothing else) will now correctly trigger a rebuild. This is the script-side sidekick to commit 687ef6b (v1.8.3 hotfix), which fixed the actual user-visible bug; this commit fixes the build pipeline so future frontend-only changes produce a new ELF. Note: .build/build-elf.sh on Windows is the canonical source. The WSL-side /home/song/build-elf.sh needs to be re-copied from it before the next build (re-run "cp /home/song/ps5-web-file-manager/.build/build-elf.sh /home/song/build-elf.sh"). --- .build/build-elf.sh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.build/build-elf.sh b/.build/build-elf.sh index 86ab42e..0b01622 100644 --- a/.build/build-elf.sh +++ b/.build/build-elf.sh @@ -148,10 +148,14 @@ echo "[6/7] make all (增量编译, 复用第三方 obj)..." cd "$PROJ" export PS5_PAYLOAD_SDK="/opt/ps5-payload-sdk" # 仅当二进制缺失或源码变更才全量重编 +# 重要: 必须包含 assets/* 和 gen-asset-module.py —— 它们经 gen-asset-module.py +# 生成 gen/*.c 进而影响 ELF, 不在列表里就会跳过 make 产生伪"无变更"(v1.8.3 +# 被这个 bug 坑过, ELF sha256 没变)。 if [ -f web-file-mgr.elf ]; then echo " 已存在 web-file-mgr.elf, 检查源码变更..." NEEDS_REBUILD="" - for src in src/*.c Makefile third_party/minizip-ng/include/*.h third_party/zlib/include/*.h; do + for src in src/*.c Makefile assets/* gen-asset-module.py \ + third_party/minizip-ng/include/*.h third_party/zlib/include/*.h; do [ -e "$src" ] || continue if [ "$src" -nt web-file-mgr.elf ]; then NEEDS_REBUILD="$src"