Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 13 additions & 1 deletion script/windows/bootstrap.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ function Show-BootstrapPreview {
Write-Output 'It will:'
Write-Output ' - Check for Git for Windows.'
Write-Output ' - Install Rust if cargo is unavailable.'
Write-Output ' - Install Visual Studio Build Tools, jq, CMake, InnoSetup, and gcloud as needed.'
Write-Output ' - Install Visual Studio Build Tools, jq, CMake, InnoSetup, protoc, LLVM, and gcloud as needed.'
Write-Output ' - Install Cargo test dependencies.'

if (-not $InstallCommonSkills) {
Expand Down Expand Up @@ -157,6 +157,18 @@ winget install -e --id Kitware.CMake
# We use InnoSetup to build our release bundle installer.
winget install -e --id JRSoftware.InnoSetup

# protoc (Protocol Buffers compiler) is required by prost-build.
winget install -e --id Google.Protobuf
if (-not (Get-Command -Name protoc -Type Application -ErrorAction SilentlyContinue)) {
$env:PATH += ";$env:LOCALAPPDATA\Microsoft\WinGet\Links"
}

# LLVM provides libclang, which is required by bindgen.
winget install -e --id LLVM.LLVM
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ [IMPORTANT] LLVM.LLVM installs LLVM, but the silent WinGet install does not guarantee C:\Program Files\LLVM\bin is available to this PowerShell session, so bindgen can still fail to load libclang after bootstrap. Append the LLVM bin directory to $env:PATH or set LIBCLANG_PATH after installation.

if (-not (Get-Command -Name clang -Type Application -ErrorAction SilentlyContinue)) {
$env:PATH += ";$env:ProgramFiles\LLVM\bin"
}

# If we don't see gcloud command, try adding the install location to the PATH.
if (-not (Get-Command -Name gcloud -Type Application -ErrorAction SilentlyContinue)) {
$env:PATH += ";$env:LOCALAPPDATA\Google\Cloud SDK\google-cloud-sdk\bin"
Expand Down