Skip to content

Commit 87675fb

Browse files
committed
feat: added ecsact net upload step
1 parent c74493f commit 87675fb

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

unreal-cpp-net-fps/BuildSystemImpls.ps1

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@ if (${env:UE-ZenSubprocessDataPath})
1515
exit 0
1616
}
1717

18-
Write-Output $env:UBT_COMPILE_LIVE_CODING
19-
2018
$ErrorActionPreference = 'Stop'
2119

2220
if(-not $env:EMSDK)
@@ -62,6 +60,8 @@ mkdir -Force "$ProjectDir/Binaries" | Out-Null
6260

6361
$WasmOutputFilePath = "$ProjectDir/Binaries/SystemImpls.wasm"
6462

63+
Write-Host "Building $WasmOutputFilePath ..."
64+
6565
# NOTE: PURE_WASI=1 removes emscripten_* functions that are not compatible with the Ecsact SI Wasm host
6666
emcc -std=c++20 --no-entry -I"$EcsactInc" -I"SystemImpls/generated" `
6767
-s ERROR_ON_UNDEFINED_SYMBOLS=0 `
@@ -78,3 +78,13 @@ if(-not $?)
7878
{
7979
throw "emcc exited with code ${LastExitCode}"
8080
}
81+
82+
83+
Write-Host "Uploading $WasmOutputFilePath to Ecsact Net ..."
84+
85+
# NOTE: pwsh doesn't have built in ini parsing, but this seems to work okay-ish for this config
86+
$EcsactNetConfig = Get-Content "$ProjectDir/Config/DefaultEcsactNet.ini" | Where-Object { !$_.StartsWith('[') } | ConvertFrom-StringData
87+
88+
# TODO: We shouldn't have to set the project ID everytime. Instead ecsact-net subcommands should accept the project ID as an option
89+
ecsact-net config set project_id $EcsactNetConfig.ProjectID;
90+
ecsact-net system_impls replace $WasmOutputFilePath;

0 commit comments

Comments
 (0)