Use objdump -p for smart DLL dependency discovery as windeployqt fallback
This commit is contained in:
1 parent
f5ff446ea1
commit
2bbb1ab034
1 file changed
+15
-11
+15
-11
@@ -37,20 +37,24 @@ if [ -x "$WINDEPLOYQT" ]; then
|
||||
if [ $RC -eq 0 ]; then
|
||||
log " OK: windeployqt completed"
|
||||
else
|
||||
log " WARN: windeployqt failed (exit $RC), trying manual copy..."
|
||||
for dll in Qt5Core Qt5Gui Qt5Widgets Qt5Network; do
|
||||
cp "/ucrt64/bin/${dll}.dll" "$BUILD_DIR/" 2>/dev/null && log " OK: ${dll}.dll" || log " WARN: ${dll}.dll not found"
|
||||
done
|
||||
for dll in libssl-3-x64 libcrypto-3-x64 zlib1; do
|
||||
cp "/ucrt64/bin/${dll}.dll" "$BUILD_DIR/" 2>/dev/null || true
|
||||
done
|
||||
log " WARN: windeployqt failed (exit $RC)"
|
||||
fi
|
||||
else
|
||||
log " WARN: $WINDEPLOYQT not found (install: pacman -S mingw-w64-ucrt-x86_64-qt5-tools)"
|
||||
log " Copying DLLs manually..."
|
||||
for dll in Qt5Core Qt5Gui Qt5Widgets Qt5Network libssl-3-x64 libcrypto-3-x64 zlib1; do
|
||||
cp "/ucrt64/bin/${dll}.dll" "$BUILD_DIR/" 2>/dev/null && log " OK: ${dll}.dll" || log " WARN: ${dll}.dll not found"
|
||||
done
|
||||
log " Using objdump to find dependencies..."
|
||||
DLL_LIST=$(objdump -p "$BUILD_DIR/chatgui.exe" 2>/dev/null | grep "DLL Name:" | awk '{print $3}')
|
||||
if [ -n "$DLL_LIST" ]; then
|
||||
for dll in $DLL_LIST; do
|
||||
# skip system DLLs
|
||||
case "$dll" in KERNEL32.dll|msvcrt.dll|USER32.dll|GDI32.dll|SHELL32.dll|ADVAPI32.dll|WS2_32.dll|ole32.dll|OLEAUT32.dll|IPHLPAPI.DLL|BCRYPT.dll|dbghelp.dll) continue ;; esac
|
||||
cp "/ucrt64/bin/$dll" "$BUILD_DIR/" 2>/dev/null && log " OK: $dll" || \
|
||||
cp "/mingw64/bin/$dll" "$BUILD_DIR/" 2>/dev/null || \
|
||||
log " WARN: $dll not found"
|
||||
done
|
||||
else
|
||||
log " FAIL: objdump failed, cannot determine dependencies"
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
cp "$SRC_DIR/rlottie_build/librlottie.dll" "$BUILD_DIR/" 2>/dev/null && log " OK: librlottie.dll" || log " WARN: librlottie.dll not found"
|
||||
|
||||
|
||||
Reference in new issue
Block a user