From 52aa39e792a4830817f257e9f312b155a0382d7c Mon Sep 17 00:00:00 2001 From: Carl Kittelberger Date: Mon, 22 Jan 2024 02:17:17 +0100 Subject: [PATCH] Implement calls to xwin to download Windows SDK. --- icedreammusic/compile-win.sh | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/icedreammusic/compile-win.sh b/icedreammusic/compile-win.sh index 69548a4..6f716b1 100644 --- a/icedreammusic/compile-win.sh +++ b/icedreammusic/compile-win.sh @@ -25,6 +25,19 @@ export CPATH="$thirdparty_includes:$thirdparty_includes/winfsp:$thirdparty_inclu # export PATH="$GOBIN:$PATH" export CGO_ENABLED=1 +if [ ! -d "$thirdparty_includes/windows/splat/sdk/Include/${winsdk_version}" ]; then + if command -v xwin 2>/dev/null >/dev/null; then + xwin splat --preserve-ms-arch-notation --output="$thirdparty_includes/windows/splat" + else + echo "ERROR: xwin not found and $thirdparty_includes/windows/splat does not exist. Please install the xwin tool from https://github.com/Jake-Shadle/xwin." >&2 + exit 1 + fi + + # patch pragma error + srcdir="$(pwd)" + (cd "$thirdparty_includes/windows/splat/sdk/Include/${winsdk_version}/winrt" && patch -u -p1 -N -i "$srcdir/winrt.1.patch") +fi + mkdir -p "$thirdparty_includes" if [ ! -d "$thirdparty_includes/libnp" ]; then wget -q -O libnp.zip https://github.com/delthas/libnp/archive/291aeb5d56d5b90f89ef8a271d0803a698488ca6.zip