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.