@ -37,20 +37,24 @@ if [ -x "$WINDEPLOYQT" ]; then
if [ $RC -eq 0 ] ; then
if [ $RC -eq 0 ] ; then
log " OK: windeployqt completed"
log " OK: windeployqt completed"
else
else
log " WARN: windeployqt failed (exit $RC ), trying manual copy... "
log " WARN: windeployqt failed (exit $RC ) "
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
fi
fi
else
else
log " WARN: $WINDEPLOYQT not found (install: pacman -S mingw-w64-ucrt-x86_64-qt5-tools) "
log " WARN: $WINDEPLOYQT not found (install: pacman -S mingw-w64-ucrt-x86_64-qt5-tools) "
log " Copying DLLs manually..."
log " Using objdump to find dependencies..."
for dll in Qt5Core Qt5Gui Qt5Widgets Qt5Network libssl-3-x64 libcrypto-3-x64 zlib1; do
DLL_LIST = $( objdump -p " $BUILD_DIR /chatgui.exe " 2>/dev/null | grep "DLL Name:" | awk '{print $3}' )
cp " /ucrt64/bin/ ${ dll } .dll " " $BUILD_DIR / " 2>/dev/null && log " OK: ${ dll } .dll " || log " WARN: ${ dll } .dll not found "
if [ -n " $DLL_LIST " ] ; then
done
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
fi
cp " $SRC_DIR /rlottie_build/librlottie.dll " " $BUILD_DIR / " 2>/dev/null && log " OK: librlottie.dll" || log " WARN: librlottie.dll not found"
cp " $SRC_DIR /rlottie_build/librlottie.dll " " $BUILD_DIR / " 2>/dev/null && log " OK: librlottie.dll" || log " WARN: librlottie.dll not found"