Fix build for windows arm64

This commit is contained in:
ExPikaPaka
2026-07-01 08:50:58 +02:00
parent c9afb98ca2
commit 31270d4027

View File

@@ -353,14 +353,15 @@ jobs:
if: runner.os == 'Windows'
shell: pwsh
run: |
$tool = Get-ChildItem -Recurse -Path build -Filter "generate_system_cache.exe" | Select-Object -First 1
if (-not $tool) { Write-Error "generate_system_cache.exe not found in build tree"; exit 1 }
$profiles = Get-ChildItem -Recurse -Path build -Directory -Filter profiles |
$buildDir = $env:BUILD_DIR
$tool = Get-ChildItem -Recurse -Path $buildDir -Filter "generate_system_cache.exe" | Select-Object -First 1
if (-not $tool) { Write-Error "generate_system_cache.exe not found in $buildDir"; exit 1 }
$profiles = Get-ChildItem -Recurse -Path $buildDir -Directory -Filter profiles |
Where-Object { $_.FullName -match 'resources' } | Select-Object -First 1
if (-not $profiles) { Write-Error "profiles directory not found in build tree"; exit 1 }
if (-not $profiles) { Write-Error "profiles directory not found in $buildDir"; exit 1 }
# Add the slicer's runtime DLL directory to PATH so generate_system_cache.exe
# can resolve its dependencies (TKernel.dll etc.) without a full install step.
$dll_dir = Get-ChildItem -Recurse -Path build -Filter "TKernel.dll" |
$dll_dir = Get-ChildItem -Recurse -Path $buildDir -Filter "TKernel.dll" |
Select-Object -First 1 | Select-Object -ExpandProperty DirectoryName
if ($dll_dir) { $env:PATH = "$dll_dir;$env:PATH" }
& $tool.FullName --path $profiles.FullName --log_level 2