mirror of
https://github.com/oven-sh/bun
synced 2026-02-02 15:08:46 +00:00
dx(win): fix codegen.ps1 on
This commit is contained in:
@@ -1,10 +1,15 @@
|
||||
param(
|
||||
[Alias("o")]$OutDir = "build"
|
||||
)
|
||||
$Script1=(Join-Path $PSScriptRoot "./cross-compile-codegen.sh")
|
||||
$CrossCompileCodegen=(Get-Content $Script1 -Raw)
|
||||
$CrossCompileCodegen.Replace("`r`n","`n") | Set-Content $Script1 -Force -NoNewline
|
||||
$Script2=(Join-Path $PSScriptRoot "../src/codegen/create_hash_table")
|
||||
$CreateHashTable=(Get-Content $Script2 -Raw)
|
||||
$CreateHashTable.Replace("`r`n","`n") | Set-Content $Script2 -Force -NoNewline
|
||||
|
||||
$Script=(Join-Path $PSScriptRoot "./cross-compile-codegen.sh")
|
||||
(Get-Content $Script -Raw).Replace("`r`n","`n") | Set-Content $Script -Force -NoNewline
|
||||
$Script=(Join-Path $PSScriptRoot "../src/codegen/create_hash_table")
|
||||
(Get-Content $Script -Raw).Replace("`r`n","`n") | Set-Content $Script -Force -NoNewline
|
||||
& 'C:\Program Files\WSL\wsl.exe' ./scripts/cross-compile-codegen.sh win32 x64 "build"
|
||||
|
||||
wsl ./scripts/cross-compile-codegen.sh win32 x64 "$OutDir"
|
||||
Set-Content $Script1 -Force -NoNewline -Value $CrossCompileCodegen
|
||||
Set-Content $Script2 -Force -NoNewline -Value $CreateHashTable
|
||||
|
||||
# copy into build-release as well
|
||||
Copy-Item -Path "build/codegen" -Destination "build-release/codegen" -Recurse -Force
|
||||
Copy-Item -Path "build/js" -Destination "build-release/codegen" -Recurse -Force
|
||||
Reference in New Issue
Block a user