Skip to content

Commit 5fdada7

Browse files
WebKit ARM64 Builderclaude
andcommitted
Switch to WinGet for better ARM64 Windows package support
- Replace Scoop/Chocolatey with WinGet for dependency installation - WinGet has official Microsoft support and better ARM64 compatibility - Update PowerShell script to detect Ruby/tools from multiple sources - Install vcpkg manually since it's not in WinGet main repository - Should resolve ARM64 package extraction and compatibility issues 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <[email protected]>
1 parent 53b121e commit 5fdada7

File tree

2 files changed

+37
-19
lines changed

2 files changed

+37
-19
lines changed

.github/workflows/build.yml

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -254,22 +254,22 @@ jobs:
254254
runs-on: ${{ matrix.runner }}
255255
timeout-minutes: 90
256256
steps:
257-
- name: Install Scoop and dependencies
257+
- name: Install dependencies via WinGet
258258
run: |
259-
# Set execution policy for PowerShell scripts
260-
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser -Force
259+
# Install all required tools via WinGet (has better ARM64 support)
260+
winget install --id=Kitware.CMake -e --silent --accept-source-agreements --accept-package-agreements
261+
winget install --id=Ninja-build.Ninja -e --silent --accept-source-agreements --accept-package-agreements
262+
winget install --id=Python.Python.3.13 -e --silent --accept-source-agreements --accept-package-agreements
263+
winget install --id=RubyInstaller.Ruby -e --silent --accept-source-agreements --accept-package-agreements
264+
winget install --id=StrawberryPerl.StrawberryPerl -e --silent --accept-source-agreements --accept-package-agreements
265+
winget install --id=LLVM.LLVM -e --silent --accept-source-agreements --accept-package-agreements
261266
262-
# Install Scoop package manager
263-
Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression
264-
265-
# Add Scoop to PATH for current session
266-
$env:PATH = "$env:USERPROFILE\scoop\shims;" + $env:PATH
267-
268-
# Install aria2 for faster downloads
269-
scoop install aria2
270-
271-
# Install all required tools at once
272-
scoop install cmake ninja python ruby perl make vcpkg ccache
267+
# Install vcpkg manually since it's not in WinGet main repo
268+
git clone https://github.com/Microsoft/vcpkg.git C:\vcpkg
269+
cd C:\vcpkg
270+
.\bootstrap-vcpkg.bat
271+
$env:VCPKG_ROOT = "C:\vcpkg"
272+
echo "VCPKG_ROOT=C:\vcpkg" >> $env:GITHUB_ENV
273273
274274
- uses: actions/checkout@v4
275275
with:

windows-release.ps1

Lines changed: 23 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -144,9 +144,9 @@ $WebKitBuild = if ($env:WEBKIT_BUILD_DIR) { $env:WEBKIT_BUILD_DIR } else { "WebK
144144
$CMAKE_BUILD_TYPE = if ($env:CMAKE_BUILD_TYPE) { $env:CMAKE_BUILD_TYPE } else { "Release" }
145145
$BUN_WEBKIT_VERSION = if ($env:BUN_WEBKIT_VERSION) { $env:BUN_WEBKIT_VERSION } else { $(git rev-parse HEAD) }
146146

147-
# Use vcpkg for ICU - packages are installed in project directory
147+
# Use vcpkg for ICU - packages are installed in project directory
148148
$UseVcpkg = $true
149-
$VcpkgRoot = if ($env:VCPKG_ROOT) { $env:VCPKG_ROOT } else { "C:\Users\$env:USERNAME\scoop\apps\vcpkg\current" }
149+
$VcpkgRoot = if ($env:VCPKG_ROOT) { $env:VCPKG_ROOT } else { "C:\vcpkg" }
150150

151151
# vcpkg installs packages in the project directory when using manifest mode
152152
$VcpkgInstalled = Join-Path (Get-Location) "vcpkg_installed\arm64-windows-static"
@@ -215,9 +215,27 @@ $VcpkgToolchain = if ($UseVcpkg) {
215215
"-DVCPKG_OVERLAY_TRIPLETS=$VcpkgRoot/triplets/community"
216216
} else { @() }
217217

218-
# Set Ruby path explicitly and ensure required gems are installed
219-
$RubyPath = "C:\Users\$env:USERNAME\scoop\apps\ruby\current\bin\ruby.exe"
220-
$GemPath = "C:\Users\$env:USERNAME\scoop\apps\ruby\current\bin\gem.cmd"
218+
# Detect Ruby installation (WinGet or Scoop)
219+
$RubyPath = $null
220+
$GemPath = $null
221+
222+
# Try WinGet installation first
223+
if (Test-Path "C:\Program Files\Ruby\bin\ruby.exe") {
224+
$RubyPath = "C:\Program Files\Ruby\bin\ruby.exe"
225+
$GemPath = "C:\Program Files\Ruby\bin\gem.cmd"
226+
} elseif (Test-Path "C:\Users\$env:USERNAME\scoop\apps\ruby\current\bin\ruby.exe") {
227+
# Fall back to Scoop installation
228+
$RubyPath = "C:\Users\$env:USERNAME\scoop\apps\ruby\current\bin\ruby.exe"
229+
$GemPath = "C:\Users\$env:USERNAME\scoop\apps\ruby\current\bin\gem.cmd"
230+
} else {
231+
# Try to find Ruby in PATH
232+
$RubyCmd = Get-Command ruby -ErrorAction SilentlyContinue
233+
if ($RubyCmd) {
234+
$RubyPath = $RubyCmd.Source
235+
$GemCmd = Get-Command gem -ErrorAction SilentlyContinue
236+
$GemPath = if ($GemCmd) { $GemCmd.Source } else { $null }
237+
}
238+
}
221239

222240
# Install required Ruby gems for WebKit build
223241
Write-Host ":: Checking Ruby dependencies"

0 commit comments

Comments
 (0)