build: bootstrap JD Windows cross toolchain

This commit is contained in:
冰朔 2026-07-17 19:11:01 +08:00
parent 31640e7149
commit 1ec9563842

View File

@ -19,9 +19,19 @@ if command -v apt-get >/dev/null 2>&1; then
fi
command -v node >/dev/null || { echo "Node.js is required." >&2; exit 2; }
command -v cargo >/dev/null || { echo "Rust is required." >&2; exit 2; }
if ! command -v cargo >/dev/null 2>&1; then
command -v curl >/dev/null || { echo "curl is required to install Rust." >&2; exit 2; }
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --profile minimal
fi
export PATH="$HOME/.cargo/bin:$PATH"
if ! command -v corepack >/dev/null 2>&1; then
npm install --global corepack
fi
corepack enable 2>/dev/null || true
corepack prepare pnpm@10.25.0 --activate
rustup target add "$target"
command -v cargo-xwin >/dev/null || cargo install cargo-xwin --locked