mirror of
https://github.com/ZoiteChat/zoitechat.git
synced 2026-03-10 07:50:19 +00:00
Refactor Windows ARM64 MSYS2 workflow for better handling
This commit is contained in:
committed by
GitHub
parent
b22eeeb3e5
commit
8c8b20664a
29
.github/workflows/windows-arm64-msys2.yml
vendored
29
.github/workflows/windows-arm64-msys2.yml
vendored
@@ -84,27 +84,38 @@ jobs:
|
|||||||
export PATH="/clangarm64/bin:$PATH"
|
export PATH="/clangarm64/bin:$PATH"
|
||||||
shopt -s nullglob
|
shopt -s nullglob
|
||||||
|
|
||||||
# Find installed EXEs and plugin DLLs no matter where prefix placed them
|
# Find installed EXEs and plugin DLLs
|
||||||
mapfile -t targets < <(find dist -type f \( -name 'zoitechat*.exe' -o -path '*/plugins/*.dll' \))
|
mapfile -t targets < <(find dist -type f \( -iname 'zoitechat*.exe' -o -ipath '*/plugins/*.dll' \) || true)
|
||||||
|
|
||||||
# If nothing found, don't fail the job, just skip
|
|
||||||
if [ "${#targets[@]}" -eq 0 ]; then
|
if [ "${#targets[@]}" -eq 0 ]; then
|
||||||
echo "No installed binaries/plugins found under dist/ (skipping dep harvest)"
|
echo "No installed binaries/plugins found under dist/ (skipping dep harvest)"
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Put runtime DLLs beside the executables (common Windows expectation)
|
# Prefer the directory that contains zoitechat.exe; otherwise fallback to dist/bin
|
||||||
# Prefer dist/**/bin if it exists, otherwise create dist/bin
|
mainexe="$(printf '%s\n' "${targets[@]}" | grep -iE '/zoitechat\.exe$' | head -n1 || true)"
|
||||||
bindir="$(find dist -type d -name bin | head -n1 || true)"
|
if [ -n "$mainexe" ]; then
|
||||||
if [ -z "$bindir" ]; then
|
bindir="$(dirname "$mainexe")"
|
||||||
|
else
|
||||||
bindir="dist/bin"
|
bindir="dist/bin"
|
||||||
mkdir -p "$bindir"
|
mkdir -p "$bindir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
echo "Using bindir: $bindir"
|
||||||
|
printf '%s\n' "${targets[@]}"
|
||||||
|
|
||||||
for f in "${targets[@]}"; do
|
for f in "${targets[@]}"; do
|
||||||
ntldd -R "$f" | tr '\\' '/' | grep -E '^/clangarm64/bin/.*\.dll$' | while read -r dll; do
|
# ntldd can return non-zero; and grep can return 1 when no matches.
|
||||||
|
while IFS= read -r dll; do
|
||||||
|
[ -n "$dll" ] || continue
|
||||||
cp -n "$dll" "$bindir/" || true
|
cp -n "$dll" "$bindir/" || true
|
||||||
done
|
done < <(
|
||||||
|
ntldd -R "$f" 2>/dev/null \
|
||||||
|
| tr '\\' '/' \
|
||||||
|
| awk '{print $1}' \
|
||||||
|
| grep -E '^/clangarm64/(bin|lib)/.*\.dll$' \
|
||||||
|
|| true
|
||||||
|
)
|
||||||
done
|
done
|
||||||
|
|
||||||
- name: Install Inno Setup
|
- name: Install Inno Setup
|
||||||
|
|||||||
Reference in New Issue
Block a user