Files
flash-build/xor-img-check.ps1
T
2026-11-13 07:52:38 +03:00

16 lines
1.2 KiB
PowerShell

# Сверка картинок на флешке с исходниками PSD и сбор параметров (цвета, области текста).
$pairs = @(
@('legacy-normal', 'F:\efi\Paravis\Boot\xor\Main1.bmp', 'C:\PF\PSD\main\main1.bmp'),
@('legacy-high', 'F:\efi\Paravis\Boot\xor\Main2.bmp', 'C:\PF\PSD\main\main2.bmp'),
@('x64-normal', 'F:\efi\Boot\1x64.bmp', 'C:\PF\PSD\UEFI\x64\main\main1.bmp'),
@('x64-high', 'F:\efi\Boot\2x64.bmp', 'C:\PF\PSD\UEFI\x64\main\main2.bmp'),
@('x86-normal', 'F:\efi\Boot\1x86.bmp', 'C:\PF\PSD\UEFI\x86\main\main1.bmp'),
@('x86-high', 'F:\efi\Boot\2x86.bmp', 'C:\PF\PSD\UEFI\x86\main\main2.bmp')
)
foreach ($p in $pairs) {
$n = $p[0]; $flash = $p[1]; $psd = $p[2]
$h1 = if (Test-Path $flash) { (Get-FileHash $flash -Algorithm SHA256).Hash.Substring(0,16) } else { 'нет файла' }
$h2 = if (Test-Path $psd) { (Get-FileHash $psd -Algorithm SHA256).Hash.Substring(0,16) } else { 'нет файла' }
' {0,-14} flash={1} psd={2} {3}' -f $n, $h1, $h2, $(if ($h1 -eq $h2) { 'ИДЕНТИЧНЫ' } else { 'различаются' })
}