From ab68aa5a8eb2a91db2b214956a3a05b1dd5af9f0 Mon Sep 17 00:00:00 2001 From: dave caruso Date: Tue, 19 Dec 2023 13:29:31 -0800 Subject: [PATCH] dx(win): fix codegen.ps1 on --- scripts/codegen.ps1 | 21 +++++++++++++-------- 1 file changed, 13 insertions(+), 8 deletions(-) diff --git a/scripts/codegen.ps1 b/scripts/codegen.ps1 index 97862e73cc..fb55655376 100644 --- a/scripts/codegen.ps1 +++ b/scripts/codegen.ps1 @@ -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 \ No newline at end of file