mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 10:28:47 +00:00
* fix(win/upgrade): do not show powershell expand-archive info while upgrading * start working bun run * experiment: `bun.new` * you can now bun run * Update src/install/install.zig Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * Update src/install/install.zig Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> * stuff * fix stuff * fix this * farther but not really * sadfs * path hell not sure how much worse or better this makes things. its a mess. windows path handlign is a mess aaaaaaaaaaaaaaaa * path.resolve bs * remove old build system stuff from pr * a * fix some path.parse/join cases * path closer not perfect * normalize and join tests tests done * paths * implement path.relative * , * stuff * assert * fix compile * hate * the code isnt great * stuff * housekeeping for build system * blah * explain windows sitaution in docs * some progress? not much though * zig compiler crashes here * fix * yippee * ok * a * ala wala * fix builds on stuff * clean * the tests now run * a * aa * dedupe uv event loop * fix fs test accuracy * stuff * [autofix.ci] apply automated fixes * huge updat e * [autofix.ci] apply automated fixes * url * [autofix.ci] apply automated fixes * start windows spawnSync * [autofix.ci] apply automated fixes * add --webkit for update submodules * add better err message for `bun setup` * fix unix platform build * . * [autofix.ci] apply automated fixes * un-upgrade libarchive * z * asdfghj * wrk * todo -> panic * ok * a * [autofix.ci] apply automated fixes * fix build scripts l ol * dfghj * fa * [autofix.ci] apply automated fixes * aaaa * a * l * [autofix.ci] apply automated fixes * more logs * [autofix.ci] apply automated fixes * j * fix init_command * CORE DUMP HELL * i swear im being pranked by the github actions gods * fadsjkfdshjkhjkdfsahjkdfshjksdafjkhhjkfdsahfsdkjhfsdjkahf * thanks IAS * this is the correct fix * personal review * ddisablbe these * revisions! * ok * fix submodule * stuff * fix libarchive * [autofix.ci] apply automated fixes * stuff * [autofix.ci] apply automated fixes * a * fix addressToJS on windows * make dns async again * dx: add flag to update submodules ps1 to clone webkit * dns error case for libuv * dx improvements on windows * newline * obvious fix * install steps * extra note * fix fs test * Update building-windows.md * fix builtins bundler to support \r\n line endnigs * better * some windows stuff * a * a * a * aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa * [autofix.ci] apply automated fixes * bunfile text works * fix build on the mac * hellooooooooooo * install steps * ci for baseline? * fix * aaa * wow * install script revamp * bug * OK * ok * aaaaaaaaaaaaaa * okay * fix the node test runner lol * fix napi stuff --------- Co-authored-by: Jarred Sumner <jarred@jarredsumner.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> Co-authored-by: cirospaciari <ciro.spaciai@gmail.com> Co-authored-by: Dylan Conway <35280289+dylan-conway@users.noreply.github.com>
87 lines
1.9 KiB
PowerShell
87 lines
1.9 KiB
PowerShell
param(
|
|
[Alias("f")][switch]$Force = $false
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
$DidAnything = $false;
|
|
|
|
$BUN_BASE_DIR = if ($env:BUN_BASE_DIR) { $env:BUN_BASE_DIR } else { Join-Path $PSScriptRoot '..' }
|
|
$BUN_DEPS_DIR = if ($env:BUN_DEPS_DIR) { $env:BUN_DEPS_DIR } else { Join-Path $BUN_BASE_DIR 'src\deps' }
|
|
$BUN_DEPS_OUT_DIR = if ($env:BUN_DEPS_OUT_DIR) { $env:BUN_DEPS_OUT_DIR } else { $BUN_DEPS_DIR }
|
|
|
|
function Build-Dependency {
|
|
param(
|
|
$Script,
|
|
[string[]]$Outputs
|
|
)
|
|
|
|
$ScriptPath = Join-Path $PSScriptRoot "build-$Script.ps1"
|
|
|
|
if (!$Force) {
|
|
foreach ($Output in $Outputs) {
|
|
$OutputPath = Join-Path $BUN_DEPS_OUT_DIR $Output
|
|
if (Test-Path $OutputPath) {
|
|
Write-Host "$Script - already built"
|
|
return
|
|
}
|
|
}
|
|
}
|
|
else {
|
|
Remove-Item $Outputs -ErrorAction SilentlyContinue
|
|
}
|
|
|
|
Write-Host "$Script - Building"
|
|
Push-Location $PSScriptRoot
|
|
try {
|
|
& $ScriptPath
|
|
}
|
|
catch {
|
|
Write-Host "Failed to build $Script"
|
|
throw $_
|
|
}
|
|
finally {
|
|
Pop-Location
|
|
}
|
|
|
|
$Script:DidAnything = $true
|
|
}
|
|
|
|
Build-Dependency `
|
|
-Script "base64" `
|
|
-Outputs @("base64.lib")
|
|
Build-Dependency `
|
|
-Script "boringssl" `
|
|
-Outputs @("crypto.lib", "ssl.lib", "decrepit.lib")
|
|
Build-Dependency `
|
|
-Script "cares" `
|
|
-Outputs @("cares.lib")
|
|
Build-Dependency `
|
|
-Script "libarchive" `
|
|
-Outputs @("archive.lib")
|
|
Build-Dependency `
|
|
-Script "lolhtml" `
|
|
-Outputs @("lolhtml.lib")
|
|
Build-Dependency `
|
|
-Script "mimalloc" `
|
|
-Outputs @("mimalloc.lib")
|
|
# Build-Dependency `
|
|
# -Script "tinycc" `
|
|
# -Outputs @("tcc.lib")
|
|
Build-Dependency `
|
|
-Script "zlib" `
|
|
-Outputs @("zlib.lib")
|
|
Build-Dependency `
|
|
-Script "zstd" `
|
|
-Outputs @("zstd.lib")
|
|
Build-Dependency `
|
|
-Script "libuv" `
|
|
-Outputs @("libuv.lib")
|
|
Build-Dependency `
|
|
-Script "lshpack" `
|
|
-Outputs @("lshpack.lib")
|
|
|
|
if (!($Script:DidAnything)) {
|
|
Write-Host "(run with -Force to rebuild all)"
|
|
}
|