hw/arm: add experimental iPhone 5 A6 platform
This commit is contained in:
@@ -0,0 +1,79 @@
|
||||
function Find-Qa6WdkRoot {
|
||||
param(
|
||||
[string]$ExplicitRoot,
|
||||
[string]$RepoRoot
|
||||
)
|
||||
|
||||
$candidates = @(
|
||||
$ExplicitRoot,
|
||||
$env:QA6_WDK_ROOT,
|
||||
(Join-Path $RepoRoot '.tools\wdk\c'),
|
||||
(Join-Path (Split-Path $RepoRoot -Parent) '.research\packages\wdk-10.0.26100.6584\c'),
|
||||
'C:\Program Files (x86)\Windows Kits\10'
|
||||
) | Where-Object { $_ }
|
||||
|
||||
foreach ($candidate in $candidates) {
|
||||
if (-not (Test-Path -LiteralPath $candidate -PathType Container)) {
|
||||
continue
|
||||
}
|
||||
$udeHeader = Get-ChildItem (Join-Path $candidate 'Include') -Recurse `
|
||||
-File -Filter UdeCx.h -ErrorAction SilentlyContinue | Select-Object -First 1
|
||||
if ($null -ne $udeHeader) {
|
||||
return (Resolve-Path $candidate).Path
|
||||
}
|
||||
}
|
||||
|
||||
throw 'WDK UDE introuvable. Définissez QA6_WDK_ROOT vers le dossier « c » du paquet Microsoft.Windows.WDK.x64.'
|
||||
}
|
||||
|
||||
function Find-Qa6WdkVersion {
|
||||
param([string]$WdkRoot)
|
||||
|
||||
$version = Get-ChildItem (Join-Path $WdkRoot 'Include') -Directory `
|
||||
-ErrorAction Stop | Where-Object {
|
||||
Test-Path -LiteralPath (Join-Path $_.FullName 'km\ude\1.0\UdeCx.h')
|
||||
} | Sort-Object Name -Descending | Select-Object -First 1
|
||||
if ($null -eq $version) {
|
||||
throw "Aucune version UDE dans $WdkRoot"
|
||||
}
|
||||
return $version.Name
|
||||
}
|
||||
|
||||
function Find-Qa6MsvcRoot {
|
||||
$bases = @(
|
||||
'C:\Program Files (x86)\Microsoft Visual Studio\2022\BuildTools\VC\Tools\MSVC',
|
||||
'C:\Program Files\Microsoft Visual Studio\2022\Community\VC\Tools\MSVC'
|
||||
)
|
||||
foreach ($base in $bases) {
|
||||
if (Test-Path -LiteralPath $base -PathType Container) {
|
||||
$toolset = Get-ChildItem $base -Directory | Sort-Object Name -Descending |
|
||||
Where-Object {
|
||||
Test-Path -LiteralPath (Join-Path $_.FullName 'bin\Hostx64\x64\cl.exe')
|
||||
} | Select-Object -First 1
|
||||
if ($null -ne $toolset) {
|
||||
return $toolset.FullName
|
||||
}
|
||||
}
|
||||
}
|
||||
throw 'MSVC x64 de Visual Studio 2022 est introuvable.'
|
||||
}
|
||||
|
||||
function Find-Qa6SignTool {
|
||||
param(
|
||||
[string]$WdkRoot,
|
||||
[string]$WdkVersion
|
||||
)
|
||||
|
||||
$candidates = @(
|
||||
(Join-Path $WdkRoot "bin\$WdkVersion\x64\signtool.exe"),
|
||||
(Join-Path 'C:\Program Files (x86)\Windows Kits\10' "bin\$WdkVersion\x64\signtool.exe"),
|
||||
(Join-Path 'C:\Program Files\Windows Kits\10' "bin\$WdkVersion\x64\signtool.exe")
|
||||
)
|
||||
foreach ($candidate in $candidates) {
|
||||
if (Test-Path -LiteralPath $candidate -PathType Leaf) {
|
||||
return $candidate
|
||||
}
|
||||
}
|
||||
|
||||
throw "SignTool x64 $WdkVersion est introuvable."
|
||||
}
|
||||
Reference in New Issue
Block a user