From c36e7038cb8fb87c81f7a792924fca43be2dcc15 Mon Sep 17 00:00:00 2001 From: faumaray Date: Wed, 28 Oct 2026 00:41:39 +0300 Subject: [PATCH] windows: the MSVC CRT fetched first in the release build, retried The 0.3.0-pre.1 build failed on cargo-xwin's download of the MSVC CRT from Microsoft's CDN (a TLS connection cut mid-way, four times): this line cuts some of that CDN's connections now and then. package.sh now fetches it with cargo xwin cache xwin first, up to six times with growing pauses; what came whole stays cached for the next try. Co-Authored-By: Claude Opus 5.5 --- windows/tools/package.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/windows/tools/package.sh b/windows/tools/package.sh index c7794db..73b723f 100755 --- a/windows/tools/package.sh +++ b/windows/tools/package.sh @@ -28,6 +28,15 @@ target/release/proxy-suite-service stage-components --to "$DIST/components" --ca rm -rf "$DIST"/components/*.old "$DIST"/components/*.staging echo "== programs" +# The MSVC CRT and Windows SDK, which cargo-xwin fetches from Microsoft's CDN: this line cuts +# some of its connections mid-way now and then (a release build failed on it). Fetched first, +# again until it takes; what came whole stays in the cache. +for try in 1 2 3 4 5 6; do + cargo xwin cache xwin && break + [ "$try" -lt 6 ] || { echo "the MSVC CRT could not be fetched" >&2; exit 1; } + echo "fetching the MSVC CRT again in $((try * 30)) s" >&2 + sleep $((try * 30)) +done cargo xwin build -q --release -p ps-service -p ps-ctl --target x86_64-pc-windows-msvc # The app on its own, so its crates' features do not change the service's (Cargo unifies them # within one build). Its shaders are compiled by Microsoft's fxc.exe under Wine.