2026-07-10 02:45:13 +00:00
param (
2026-09-08 17:08:58 +08:00
[ Parameter ( Mandatory = $true )]
[ string ] $SdkRoot ,
[ string ] $ReleaseDir = ( Get-Location ). Path ,
[ switch ] $IncludeQtRuntime
)
2026-07-10 02:45:13 +00:00
$ErrorActionPreference = "Stop"
$sdk = ( Resolve-Path $SdkRoot ). Path
$release = ( Resolve-Path $ReleaseDir ). Path
2026-09-08 17:08:58 +08:00
$binDir = Join-Path $sdk "bin"
foreach ( $path in @ ( $binDir )) {
if ( -not ( Test-Path $path )) {
throw "SDK file is missing: $path "
}
2026-07-10 02:45:13 +00:00
}
function Test-IsQtRuntimeItem {
param ([ System.IO.FileSystemInfo ] $Item )
if ( $IncludeQtRuntime ) {
return $false
}
if ( $Item . PSIsContainer ) {
return $Item . Name -in @ (
"bearer" ,
"iconengines" ,
"imageformats" ,
"platforms" ,
"styles" ,
"translations"
)
}
return (
$Item . Name -match '^Qt5.*\.dll$' -or
$Item . Name -in @ (
"libEGL.dll" ,
"libGLESv2.dll" ,
"opengl32sw.dll" ,
"d3dcompiler_47.dll"
)
)
}
Get-ChildItem $binDir -Force | Where-Object {
-not ( Test-IsQtRuntimeItem $_ )
} | Copy-Item -Destination $release -Recurse -Force
2026-09-08 17:08:58 +08:00
$targetConfigDir = Join-Path $release "config"
New-Item $targetConfigDir -ItemType Directory -Force | Out-Null
Write-Host "SDK files installed to: $release "
Write-Host "Next: package the whole application directory and upload it in SimCAE Hub. The server will generate config/app_config.json and config/manifest_public_key.pem when needed."