@@ -31,6 +31,11 @@ $exePath = Join-Path $buildDir "bin\$appName.exe"
3131$packageName = " $appName -windows-x64"
3232$packageRoot = Join-Path $distDir $packageName
3333$zipPath = Join-Path $distDir " $packageName .zip"
34+ $requiredRuntimeDlls = @ (
35+ " onnxruntime.dll" ,
36+ " libprotobuf-lite.dll" ,
37+ " libprotobuf.dll"
38+ )
3439
3540if (-not (Test-Path - LiteralPath $exePath )) {
3641 throw " Built executable not found: $exePath "
@@ -56,11 +61,18 @@ if (Test-Path -LiteralPath $modelPath) {
5661 Copy-Item - LiteralPath $modelPath - Destination $modelDir
5762}
5863
59- $onnxBinDir = Join-Path $vcpkgRoot " installed\$vcpkgTriplet \bin"
60- if (Test-Path - LiteralPath $onnxBinDir ) {
61- Get-ChildItem - LiteralPath $onnxBinDir - Filter " onnxruntime*.dll" | ForEach-Object {
62- Copy-Item - LiteralPath $_.FullName - Destination $packageRoot
64+ $runtimeBinDir = Join-Path $vcpkgRoot " installed\$vcpkgTriplet \bin"
65+ if (-not (Test-Path - LiteralPath $runtimeBinDir )) {
66+ throw " Runtime bin directory not found: $runtimeBinDir "
67+ }
68+
69+ foreach ($dllName in $requiredRuntimeDlls ) {
70+ $sourcePath = Join-Path $runtimeBinDir $dllName
71+ if (-not (Test-Path - LiteralPath $sourcePath )) {
72+ throw " Required runtime DLL not found: $sourcePath "
6373 }
74+
75+ Copy-Item - LiteralPath $sourcePath - Destination $packageRoot
6476}
6577
6678$windeployqt = Get-Command windeployqt.exe - ErrorAction Stop
0 commit comments