- Add cross-platform support for Windows (vcpkg) and Linux (system packages) - Improve dependency handling for cryptopp and nlohmann-json - Update build scripts for better release management - Enhance CHANGELOG.md with latest version information
40 lines
865 B
PowerShell
40 lines
865 B
PowerShell
param(
|
|
[Parameter(Mandatory=$true)][string]$ZipPath,
|
|
[Parameter(Mandatory=$true)][string]$BinDir
|
|
)
|
|
|
|
$ErrorActionPreference = 'Stop'
|
|
|
|
if (-not (Test-Path -LiteralPath $ZipPath)) {
|
|
throw "ZIP not found: $ZipPath"
|
|
}
|
|
|
|
if (-not (Test-Path -LiteralPath $BinDir)) {
|
|
throw "BinDir not found: $BinDir"
|
|
}
|
|
|
|
function Write-ChecksumFile {
|
|
param(
|
|
[Parameter(Mandatory=$true)][string]$Path
|
|
)
|
|
$hash = (Get-FileHash -Algorithm SHA256 -LiteralPath $Path).Hash.ToLower()
|
|
$outfile = "$Path.sha256"
|
|
$line = "$hash $([System.IO.Path]::GetFileName($Path))"
|
|
Set-Content -Path $outfile -NoNewline -Encoding ASCII -Value $line
|
|
Write-Host "Wrote $outfile"
|
|
}
|
|
|
|
# ZIP checksum
|
|
Write-ChecksumFile -Path $ZipPath
|
|
|
|
# Binaries checksums
|
|
Get-ChildItem -LiteralPath $BinDir -File | ForEach-Object {
|
|
Write-ChecksumFile -Path $_.FullName
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|