param( [string]$Configuration = "Release", [string]$Runtime = "win-x64", [switch]$SkipCore ) $ErrorActionPreference = "Stop" $root = Split-Path -Parent $PSScriptRoot $ui = Join-Path $root "ui\RblxTool" $nativeTarget = Join-Path $ui "runtimes\$Runtime\native" if (-not $SkipCore) { Push-Location $root cargo build --release -p rblx-ffi cargo build --release -p rblx-cli Pop-Location } New-Item -ItemType Directory -Force -Path $nativeTarget | Out-Null Copy-Item (Join-Path $root "target\release\rblx_core.dll") $nativeTarget -Force Push-Location $ui dotnet publish -c $Configuration -r $Runtime --self-contained true Pop-Location Write-Host "published to $ui\bin\$Configuration\net8.0-windows10.0.19041.0\$Runtime\publish"