2026-09-16 16:48:06 +02:00
|
|
|
param(
|
|
|
|
|
[string]$RuntimeIdentifier = "win-x64",
|
|
|
|
|
[string]$Output = ""
|
|
|
|
|
)
|
|
|
|
|
$ErrorActionPreference = "Stop"
|
|
|
|
|
$repoRoot = (Resolve-Path "$PSScriptRoot/../..").Path
|
2026-09-21 00:11:01 +02:00
|
|
|
if ([string]::IsNullOrWhiteSpace($Output)) { $Output = "$repoRoot/artifacts/client/$RuntimeIdentifier" }
|
2026-09-16 16:48:06 +02:00
|
|
|
dotnet publish "$PSScriptRoot/VoiceCat.App/VoiceCat.App.csproj" -c Release -r $RuntimeIdentifier --self-contained true `
|
|
|
|
|
-p:PublishSingleFile=true -p:PublishTrimmed=false -p:IncludeNativeLibrariesForSelfExtract=false `
|
2026-09-21 02:12:03 +02:00
|
|
|
-p:RestorePackagesWithLockFile=true -p:RestoreLockedMode=false `
|
|
|
|
|
"-p:NuGetLockFilePath=obj/packages.publish.$RuntimeIdentifier.lock.json" -o $Output
|
2026-09-16 16:48:06 +02:00
|
|
|
if ($LASTEXITCODE -ne 0) { throw "Managed Windows client publish failed." }
|
|
|
|
|
if (-not (Test-Path "$Output/voicecat_media.dll")) { throw "Managed media shim was not published." }
|
|
|
|
|
Write-Host "Published managed Windows client to $Output"
|