param(
[Parameter(Mandatory = $true)][string]$ImagePath,
[Parameter(Mandatory = $true)][string]$VerifiedBootResult,
[string]$VerifiedTcgBootResult,
[string]$QemuPath,
[switch]$Fullscreen,
[switch]$FitToWindow,
[switch]$NativePixels,
[switch]$PlanOnly,
[ValidateSet('auto','tcg','whpx')][string]$Acceleration = 'auto',
[ValidateSet('gtk','sdl')][string]$DisplayBackend = 'gtk',
[switch]$TraceConsoleRefresh,
[ValidateSet('default','off')][string]$WhpxKernelIrqchip = 'default'
)
$ErrorActionPreference = 'Stop'
if($Acceleration -eq 'whpx' -or $WhpxKernelIrqchip -ne 'default') {
throw 'The independent kernel currently requires its verified TCG profile; WHPX and irqchip overrides need separate independent-kernel acceptance.'
}
$receiptPath=(Resolve-Path -LiteralPath $VerifiedBootResult).Path
$receipt=Get-Content -LiteralPath $receiptPath -Raw -Encoding UTF8 | ConvertFrom-Json
if($receipt.Kind -cne 'XfeIndependentKernelBootProof') {
throw 'The active launcher requires an independent-kernel desktop receipt. Historical preview images retain their original archived launchers.'
}
if($VerifiedTcgBootResult) {
$tcgPath=(Resolve-Path -LiteralPath $VerifiedTcgBootResult).Path
$tcg=Get-Content -LiteralPath $tcgPath -Raw -Encoding UTF8 | ConvertFrom-Json
if($tcg.Kind -cne 'XfeIndependentKernelBootProof' -or $tcg.Passed -ne $true -or
$tcg.ImageUnchanged -ne $true -or $tcg.QemuExitCode -ne 0 -or $tcg.ImageSha256 -cne $receipt.ImageSha256) {
throw 'The additional TCG receipt must describe the same verified independent image.'
}
}
& (Join-Path $PSScriptRoot 'IndependentKernel/Open.ps1') -ImagePath $ImagePath -VerifiedBootResult $receiptPath -QemuPath $QemuPath -DisplayBackend $DisplayBackend -Fullscreen:$Fullscreen -FitToWindow:$FitToWindow -NativePixels:$NativePixels -TraceConsoleRefresh:$TraceConsoleRefresh -PlanOnly:$PlanOnly
param(
[Parameter(Mandatory = $true)][string]$ImagePath,
[Parameter(Mandatory = $true)][string]$VerifiedBootResult,
[string]$VerifiedTcgBootResult,
[string]$QemuPath,
[switch]$Fullscreen,
[switch]$FitToWindow,
[switch]$NativePixels,
[switch]$PlanOnly,
[ValidateSet('auto','tcg','whpx')][string]$Acceleration = 'auto',
[ValidateSet('gtk','sdl')][string]$DisplayBackend = 'gtk',
[switch]$TraceConsoleRefresh,
[ValidateSet('default','off')][string]$WhpxKernelIrqchip = 'default'
)
$ErrorActionPreference = 'Stop'
if($Acceleration -eq 'whpx' -or $WhpxKernelIrqchip -ne 'default') {
throw 'The independent kernel currently requires its verified TCG profile; WHPX and irqchip overrides need separate independent-kernel acceptance.'
}
$receiptPath=(Resolve-Path -LiteralPath $VerifiedBootResult).Path
$receipt=Get-Content -LiteralPath $receiptPath -Raw -Encoding UTF8 | ConvertFrom-Json
if($receipt.Kind -cne 'XfeIndependentKernelBootProof') {
throw 'The active launcher requires an independent-kernel desktop receipt. Historical preview images retain their original archived launchers.'
}
if($VerifiedTcgBootResult) {
$tcgPath=(Resolve-Path -LiteralPath $VerifiedTcgBootResult).Path
$tcg=Get-Content -LiteralPath $tcgPath -Raw -Encoding UTF8 | ConvertFrom-Json
if($tcg.Kind -cne 'XfeIndependentKernelBootProof' -or $tcg.Passed -ne $true -or
$tcg.ImageUnchanged -ne $true -or $tcg.QemuExitCode -ne 0 -or $tcg.ImageSha256 -cne $receipt.ImageSha256) {
throw 'The additional TCG receipt must describe the same verified independent image.'
}
}
& (Join-Path $PSScriptRoot 'IndependentKernel/Open.ps1') -ImagePath $ImagePath -VerifiedBootResult $receiptPath -QemuPath $QemuPath -DisplayBackend $DisplayBackend -Fullscreen:$Fullscreen -FitToWindow:$FitToWindow -NativePixels:$NativePixels -TraceConsoleRefresh:$TraceConsoleRefresh -PlanOnly:$PlanOnly