Files
zed/script/install-rustup.ps1
Mohamad Khani b9819977a5 logiguard fork v3: full patch set on verified 8c74db0 tree
Includes prior-session patches (carry forward so the app compiles):
  - crates/gpui/build.rs: cross-compile manifest fix
  - crates/gpui/src/platform.rs: PlatformWindow::activate_with_token trait method
  - crates/gpui/src/window.rs: Window::activate_with_token public API
  - crates/gpui_linux/src/linux/wayland/window.rs: WaylandWindow::activate_with_token + activate() keyboard-serial fix

Plus the focus-serial fix:
  - serial.rs: SerialKind::KeyboardEnter
  - client.rs: store wl_keyboard.enter serial; latest_serial_of()

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
2026-07-14 01:52:12 +03:30

40 lines
1.3 KiB
PowerShell

# Checks if cargo is in the user's path or in default install path
# If not, download with rustup-installer (which respects CARGO_HOME / RUSTUP_HOME)
# Like 'set -e' in bash
$ErrorActionPreference = "Stop"
$cargoHome = if ($env:CARGO_HOME) { $env:CARGO_HOME } else { "$env:USERPROFILE\.cargo" }
$rustupPath = "$cargoHome\bin\rustup.exe"
$cargoPath = "$cargoHome\bin\cargo.exe"
# Check if cargo is already available in path
if (Get-Command cargo -ErrorAction SilentlyContinue)
{
cargo --version
exit
}
# Check if rustup and cargo are available in CARGO_HOME
elseif (-not ((Test-Path $rustupPath) -and (Test-Path $cargoPath))) {
Write-Output "Rustup or Cargo not found in $cargoHome, installing..."
$tempDir = [System.IO.Path]::GetTempPath()
# Download and install rustup
$RustupInitPath = "$tempDir\rustup-init.exe"
Write-Output "Downloading rustup installer..."
Invoke-WebRequest `
-OutFile $RustupInitPath `
-Uri https://static.rust-lang.org/rustup/dist/i686-pc-windows-gnu/rustup-init.exe
Write-Output "Installing rustup..."
& $RustupInitPath -y --default-toolchain none
Remove-Item -Force $RustupInitPath
Write-Output "Rust installation complete."
# This is necessary
}
& $rustupPath --version
& $cargoPath --version