Browse Source

chatgui: always deploy non-Qt DLLs (FFmpeg, mingw-runtime) next to vibechat.exe

proxy
evgeny 2 weeks ago
parent
commit
a5047c29f7
  1. 47
      tools/chatgui/build.sh

47
tools/chatgui/build.sh

@ -50,29 +50,34 @@ if [ -x "$WINDEPLOYQT" ]; then
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 " Resolving dependencies recursively..." fi
todo="$BUILD_DIR/vibechat.exe"
while [ -n "$todo" ]; do # Резолвим НЕ-Qt зависимости (FFmpeg, mingw-runtime) всегда: windeployqt копирует только Qt.
next_todo="" FFMPEG_BIN="$SRC_DIR/ffmpeg/ffmpeg_build/install/bin"
for src in $todo; do log " Resolving non-Qt dependencies recursively..."
for dep in $(objdump -p "$src" 2>/dev/null | grep "DLL Name:" | awk '{print $3}'); do todo="$BUILD_DIR/vibechat.exe"
case "$dep" in while [ -n "$todo" ]; do
KERNEL32.dll|msvcrt.dll|USER32.dll|GDI32.dll|SHELL32.dll|ADVAPI32.dll|\ next_todo=""
WS2_32.dll|ole32.dll|OLEAUT32.dll|IPHLPAPI.DLL|BCRYPT.dll|dbghelp.dll|\ for src in $todo; do
api-ms-win-*) for dep in $(objdump -p "$src" 2>/dev/null | grep "DLL Name:" | awk '{print $3}'); do
continue ;; case "$dep" in
esac KERNEL32.dll|msvcrt.dll|USER32.dll|GDI32.dll|SHELL32.dll|ADVAPI32.dll|\
[ -f "$BUILD_DIR/$dep" ] && continue WS2_32.dll|ole32.dll|OLEAUT32.dll|IPHLPAPI.DLL|BCRYPT.dll|dbghelp.dll|\
if cp "/ucrt64/bin/$dep" "$BUILD_DIR/" 2>/dev/null; then api-ms-win-*)
log " OK: $dep"; next_todo="$next_todo $BUILD_DIR/$dep" continue ;;
elif cp "/mingw64/bin/$dep" "$BUILD_DIR/" 2>/dev/null; then esac
log " OK: $dep (mingw64)"; next_todo="$next_todo $BUILD_DIR/$dep" [ -f "$BUILD_DIR/$dep" ] && continue
fi if cp "/ucrt64/bin/$dep" "$BUILD_DIR/" 2>/dev/null; then
done log " OK: $dep"; next_todo="$next_todo $BUILD_DIR/$dep"
elif cp "/mingw64/bin/$dep" "$BUILD_DIR/" 2>/dev/null; then
log " OK: $dep (mingw64)"; next_todo="$next_todo $BUILD_DIR/$dep"
elif [ -d "$FFMPEG_BIN" ] && cp "$FFMPEG_BIN/$dep" "$BUILD_DIR/" 2>/dev/null; then
log " OK: $dep (ffmpeg)"; next_todo="$next_todo $BUILD_DIR/$dep"
fi
done done
todo="$next_todo"
done done
fi todo="$next_todo"
done
# Qt platform plugin (loaded dynamically, not in import table) # Qt platform plugin (loaded dynamically, not in import table)
mkdir -p "$BUILD_DIR/platforms" mkdir -p "$BUILD_DIR/platforms"
for d in /ucrt64/share/qt5/plugins /ucrt64/lib/qt5/plugins; do for d in /ucrt64/share/qt5/plugins /ucrt64/lib/qt5/plugins; do

Loading…
Cancel
Save