build: fix Windows packaging to produce the NSIS installer
The bundling loop ran under set -euo pipefail; once no new /mingw64 deps
remained, grep exited 1 and aborted the script before makensis ran, so no
Setup.exe was produced. Disable strict mode in that subshell and collect
deps before copying. Anchor all installer source paths to the script dir
via ${__FILEDIR__} and switch the File glob to "\*" so extensionless files
and plugin subfolders are included.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
parent
7a4f3f312b
commit
83a26ef0cf
2 changed files with 18 additions and 9 deletions
|
|
@ -62,14 +62,17 @@ echo "==> Bundling MinGW runtime + transitive dependencies"
|
|||
# repeat a few passes so transitive deps (incl. those of the deployed plugins)
|
||||
# are all picked up.
|
||||
( cd "$DIST_DIR"
|
||||
# Disable strict mode here: once everything is copied, grep finds no new
|
||||
# /mingw64 deps and returns 1, which would otherwise abort the whole script.
|
||||
set +e +o pipefail
|
||||
for _ in $(seq 1 6); do
|
||||
find . \( -name '*.exe' -o -name '*.dll' \) -print0 \
|
||||
deps="$(find . \( -name '*.exe' -o -name '*.dll' \) -print0 \
|
||||
| xargs -0 -I{} ldd "{}" 2>/dev/null \
|
||||
| grep -io '/mingw64/bin/[^ ]*\.dll' \
|
||||
| sort -u \
|
||||
| while read -r f; do
|
||||
[ -e "./$(basename "$f")" ] || cp "$f" .
|
||||
done
|
||||
| sort -u)"
|
||||
for f in $deps; do
|
||||
[ -e "./$(basename "$f")" ] || cp "$f" .
|
||||
done
|
||||
done
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue