Files
picard/scripts/package/win-common.ps1
Philipp Wolfer 203524c238 PICARD-2736: Fix Windows system wide libssl conflicting with bundled libssl
Removed an old workaround that no longer applies for current PyQt5
and/or PyInstaller. The OpenSSL DLLs should be kept in the main install
folder in order to be prioritized over system libs.
2023-08-31 09:28:44 +02:00

40 lines
820 B
PowerShell

# Common functions for Windows packaging scripts
Param(
[System.Security.Cryptography.X509Certificates.X509Certificate]
$Certificate
)
Function CodeSignBinary {
Param(
[ValidateScript({Test-Path $_ -PathType Leaf})]
[String]
$BinaryPath
)
If ($Certificate) {
Set-AuthenticodeSignature -FilePath $BinaryPath -Certificate $Certificate `
-ErrorAction Stop
} Else {
Write-Output "Skip signing $BinaryPath"
}
}
Function ThrowOnExeError {
Param( [String]$Message )
If ($LastExitCode -ne 0) {
Throw $Message
}
}
Function FinalizePackage {
Param(
[ValidateScript({Test-Path $_ -PathType Container})]
[String]
$Path
)
CodeSignBinary (Join-Path $Path picard.exe)
CodeSignBinary (Join-Path $Path fpcalc.exe)
CodeSignBinary (Join-Path $Path discid.dll)
}