mirror of
https://github.com/ayufan/steam-deck-tools.git
synced 2026-03-28 15:35:02 +01:00
Detect sdk version
This commit is contained in:
parent
4c79e4a23c
commit
af49297ef9
21
.github/workflows/build_performance_overlay.yaml
vendored
21
.github/workflows/build_performance_overlay.yaml
vendored
|
|
@ -56,6 +56,25 @@ jobs:
|
|||
}
|
||||
"WIDGET_PACKAGE_VERSION=$widgetVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
$minTpv = [version]"10.0.18362.0"
|
||||
$unionMetadataRoot = Join-Path ${env:ProgramFiles(x86)} "Windows Kits\10\UnionMetadata"
|
||||
if (-not (Test-Path $unionMetadataRoot)) {
|
||||
throw "UWP UnionMetadata folder not found at '$unionMetadataRoot'."
|
||||
}
|
||||
|
||||
$detectedTpv = Get-ChildItem -Path $unionMetadataRoot -Directory |
|
||||
Where-Object { $_.Name -match '^\d+\.\d+\.\d+\.\d+$' } |
|
||||
Where-Object { [version]$_.Name -ge $minTpv } |
|
||||
Sort-Object { [version]$_.Name } -Descending |
|
||||
Select-Object -First 1 -ExpandProperty Name
|
||||
|
||||
if (-not $detectedTpv) {
|
||||
throw "No installed UWP TargetPlatformVersion >= $minTpv was found under '$unionMetadataRoot'."
|
||||
}
|
||||
|
||||
Write-Host "Using UWP TargetPlatformVersion: $detectedTpv"
|
||||
"UWP_TPV=$detectedTpv" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
|
||||
|
||||
- name: Restore PerformanceOverlay dependencies
|
||||
run: dotnet restore PerformanceOverlay/PerformanceOverlay.csproj
|
||||
|
||||
|
|
@ -89,6 +108,8 @@ jobs:
|
|||
/restore `
|
||||
/p:Configuration=Release `
|
||||
/p:Platform=x64 `
|
||||
/p:TargetPlatformVersion=${{ env.UWP_TPV }} `
|
||||
/p:TargetPlatformMinVersion=10.0.18362.0 `
|
||||
/p:AppxBundle=Never `
|
||||
/p:UapAppxPackageBuildMode=SideloadOnly `
|
||||
/p:AppxPackageDir="$widgetPackageDir\\" `
|
||||
|
|
|
|||
Loading…
Reference in a new issue