From 178ed4977264294f46506af5ed4b3c36bf9a00e1 Mon Sep 17 00:00:00 2001 From: greepar Date: Sat, 20 Jun 2026 18:33:51 +0800 Subject: [PATCH] Enable long paths for Windows native builds --- .github/workflows/nuget-static-graphics.yml | 4 +++- scripts/build-windows-static-graphics.ps1 | 5 +++-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/nuget-static-graphics.yml b/.github/workflows/nuget-static-graphics.yml index 70c5074..f30263a 100644 --- a/.github/workflows/nuget-static-graphics.yml +++ b/.github/workflows/nuget-static-graphics.yml @@ -73,7 +73,9 @@ jobs: - name: Install native build dependencies shell: pwsh - run: choco install ninja llvm -y + run: | + git config --global core.longpaths true + choco install ninja llvm -y - name: Build Windows static graphics libraries shell: pwsh diff --git a/scripts/build-windows-static-graphics.ps1 b/scripts/build-windows-static-graphics.ps1 index 434f425..fcfb882 100644 --- a/scripts/build-windows-static-graphics.ps1 +++ b/scripts/build-windows-static-graphics.ps1 @@ -25,6 +25,7 @@ function Ensure-Tools { Require-Command git Require-Command python Require-Command ninja + git config --global core.longpaths true } function Ensure-DepotTools { @@ -51,7 +52,7 @@ function Copy-FirstExisting($Destination, [string[]]$Candidates) { function Sync-SkiaSharp { $src = Join-Path $WorkDir "SkiaSharp-$SkiaSharpVersion" if (-not (Test-Path (Join-Path $src ".git"))) { - git clone --depth 1 --branch "release/$SkiaSharpVersion" https://github.com/mono/SkiaSharp.git $src + git -c core.longpaths=true clone --depth 1 --branch "release/$SkiaSharpVersion" https://github.com/mono/SkiaSharp.git $src } else { git -C $src fetch --depth 1 origin "release/$SkiaSharpVersion" git -C $src checkout -q FETCH_HEAD @@ -116,7 +117,7 @@ extra_cflags_cc = [ "/GR" ] function Sync-Angle { $src = Join-Path $WorkDir "ANGLE-$AngleBranch" if (-not (Test-Path (Join-Path $src ".git"))) { - git clone --depth 1 --branch "chromium/$AngleBranch" https://github.com/google/angle.git $src + git -c core.longpaths=true clone --depth 1 --branch "chromium/$AngleBranch" https://github.com/google/angle.git $src } else { git -C $src fetch --depth 1 origin "chromium/$AngleBranch" git -C $src checkout -q FETCH_HEAD