From eaa0e54a938efe0f7fa8d3394975cba147644bee Mon Sep 17 00:00:00 2001 From: greepar Date: Sat, 20 Jun 2026 21:05:15 +0800 Subject: [PATCH] Fix ANGLE platform toolchain dependencies --- .github/workflows/nuget-static-graphics.yml | 2 +- scripts/build-windows-static-graphics.ps1 | 18 ++++++++++++++++++ 2 files changed, 19 insertions(+), 1 deletion(-) diff --git a/.github/workflows/nuget-static-graphics.yml b/.github/workflows/nuget-static-graphics.yml index 7d56100..30924f6 100644 --- a/.github/workflows/nuget-static-graphics.yml +++ b/.github/workflows/nuget-static-graphics.yml @@ -35,7 +35,7 @@ jobs: - name: Install native build dependencies run: | sudo apt-get update - sudo apt-get install -y clang lld llvm g++ ninja-build pkg-config libfontconfig1-dev libglib2.0-dev libx11-dev libxcb1-dev + sudo apt-get install -y clang lld llvm g++ ninja-build pkg-config libfontconfig1-dev libglib2.0-dev libpci-dev libx11-dev libxcb1-dev - name: Build Linux static graphics libraries env: diff --git a/scripts/build-windows-static-graphics.ps1 b/scripts/build-windows-static-graphics.ps1 index 1007ab1..3b5b7b1 100644 --- a/scripts/build-windows-static-graphics.ps1 +++ b/scripts/build-windows-static-graphics.ps1 @@ -19,6 +19,24 @@ $SkiaDepsRetries = if ($env:SKIA_DEPS_RETRIES) { [int]$env:SKIA_DEPS_RETRIES } e if (-not $env:DEPOT_TOOLS_WIN_TOOLCHAIN) { $env:DEPOT_TOOLS_WIN_TOOLCHAIN = "0" } +if ($env:DEPOT_TOOLS_WIN_TOOLCHAIN -eq "0") { + if (-not $env:GYP_MSVS_VERSION) { + $env:GYP_MSVS_VERSION = "2022" + } + if (-not $env:GYP_MSVS_OVERRIDE_PATH) { + if ($env:VSINSTALLDIR) { + $env:GYP_MSVS_OVERRIDE_PATH = $env:VSINSTALLDIR.TrimEnd("\", "/") + } else { + $vswhere = Join-Path ${env:ProgramFiles(x86)} "Microsoft Visual Studio\Installer\vswhere.exe" + if (Test-Path $vswhere) { + $vsPath = & $vswhere -latest -products * -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath + if ($vsPath) { + $env:GYP_MSVS_OVERRIDE_PATH = $vsPath.TrimEnd("\", "/") + } + } + } + } +} function Require-Command($Name) { if (-not (Get-Command $Name -ErrorAction SilentlyContinue)) {