428ede1f31
Fix the Windows release binary failing to start due to missing libiconv-2.dll. The root cause was the sed workaround using .dll.a files (import libraries for dynamic linking) instead of .a files (static libraries). Changes: - Fix sed command in configure-win.sh to use static libraries (.a) instead of dynamic import libraries (.dll.a) for libiconv/libintl - Add bundle-win-dlls.sh script that detects and copies any missing DLLs as a safety net (reports none needed with proper static linking) Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
35 lines
1.1 KiB
Bash
Executable File
35 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
set -euo pipefail
|
|
|
|
TARGET=${TARGET:-xtensa-softmmu}
|
|
VERSION=${VERSION:-dev}
|
|
|
|
echo DBG
|
|
./configure --help
|
|
|
|
./configure \
|
|
--bindir=bin \
|
|
--datadir=share/qemu \
|
|
--enable-gcrypt \
|
|
--enable-sdl \
|
|
--enable-pixman \
|
|
--enable-slirp \
|
|
--enable-stack-protector \
|
|
--extra-cflags=-Werror \
|
|
--prefix=${PWD}/install/qemu \
|
|
--static \
|
|
--target-list=${TARGET} \
|
|
--with-pkgversion="${VERSION}" \
|
|
--with-suffix="" \
|
|
--without-default-features \
|
|
|| { cat meson-logs/meson-log.txt && false; }
|
|
|
|
|
|
# Fix: pkg-config for libgcrypt outputs incorrect paths for libiconv and libintl:
|
|
# - Unix-style paths (/mingw64/lib/...) instead of Windows paths (D:/a/_temp/msys64/mingw64/lib/...)
|
|
# - Dynamic import libraries (.dll.a) instead of static libraries (.a)
|
|
# We need to fix both issues in build.ninja for the static build to work correctly.
|
|
MSYS_BASE=$(cygpath -w / | sed 's/\\/\//g')
|
|
sed -i "s|/mingw64/lib/libintl.dll.a|${MSYS_BASE}/mingw64/lib/libintl.a|g; s|/mingw64/lib/libiconv.dll.a|${MSYS_BASE}/mingw64/lib/libiconv.a|g" build/build.ninja
|