diff --git a/windows-release.ps1 b/windows-release.ps1 index 226a0ad471981..2e1b8d62a795a 100644 --- a/windows-release.ps1 +++ b/windows-release.ps1 @@ -21,7 +21,8 @@ if ($Env:VSCMD_ARG_TGT_ARCH -eq "x86") { # Remove strawberry from the path while compiling ICU # They define `link.exe` and many other things which will cause the build to fail. -$env:PATH = $env:PATH -replace "C:\\Strawberry\\c\\bin;", "" +$OriginalPath = $env:PATH +$env:PATH = ($env:PATH -split ";" | Where-Object { $_ -notlike "*strawberry*" }) -join ';' $output = if ($env:WEBKIT_OUTPUT_DIR) { $env:WEBKIT_OUTPUT_DIR } else { "bun-webkit" } $WebKitBuild = if ($env:WEBKIT_BUILD_DIR) { $env:WEBKIT_BUILD_DIR } else { "WebKitBuild" } @@ -118,6 +119,8 @@ $env:CXXFLAGS = "/Zi /Z7" Write-Host ":: Configuring WebKit" +$env:PATH = $OriginalPath + cmake -S . -B $WebKitBuild ` -DPORT="JSCOnly" ` -DENABLE_STATIC_JSC=ON `