mirror of
https://github.com/greenshot/greenshot
synced 2025-07-16 10:03:44 -07:00
Hope this brings more details on why the signing doesn't work
This commit is contained in:
parent
f1e152eb38
commit
ec1e80cf45
2 changed files with 27 additions and 15 deletions
|
@ -128,9 +128,9 @@ OutputDir=..\
|
||||||
PrivilegesRequired=none
|
PrivilegesRequired=none
|
||||||
SetupIconFile=..\..\icons\applicationIcon\icon.ico
|
SetupIconFile=..\..\icons\applicationIcon\icon.ico
|
||||||
; Create a SHA1 signature
|
; Create a SHA1 signature
|
||||||
SignTool=SignTool sign /debug /fd sha1 /a /tr http://time.certum.pl /td sha1 $f
|
SignTool=SignTool sign /debug /sm /fd sha1 /tr http://time.certum.pl /td sha1 $f
|
||||||
; Append a SHA256 to the previous SHA1 signature (this is what as does)
|
; Append a SHA256 to the previous SHA1 signature (this is what as does)
|
||||||
SignTool=SignTool sign /debug /as /fd sha256 /a /tr http://time.certum.pl /td sha256 $f
|
SignTool=SignTool sign /debug /as /sm /fd sha256 /tr http://time.certum.pl /td sha256 $f
|
||||||
SignedUninstaller=yes
|
SignedUninstaller=yes
|
||||||
UninstallDisplayIcon={app}\{#ExeName}.exe
|
UninstallDisplayIcon={app}\{#ExeName}.exe
|
||||||
Uninstallable=true
|
Uninstallable=true
|
||||||
|
|
38
build.ps1
38
build.ps1
|
@ -56,8 +56,18 @@ Function PrepareCertificate() {
|
||||||
$decodedContentBytes = [System.Convert]::FromBase64String($env:Certificate)
|
$decodedContentBytes = [System.Convert]::FromBase64String($env:Certificate)
|
||||||
$decodedContentBytes | set-content "greenshot.pfx" -encoding byte
|
$decodedContentBytes | set-content "greenshot.pfx" -encoding byte
|
||||||
|
|
||||||
$certutilArguments = @('-f', '-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
|
$certutilArguments = @('-p', $env:CertificatePassword, '-importpfx', "greenshot.pfx")
|
||||||
Start-Process -wait -PassThru certutil -ArgumentList $certutilArguments -NoNewWindow
|
Start-Process -wait certutil -ArgumentList $certutilArguments -NoNewWindow
|
||||||
|
}
|
||||||
|
|
||||||
|
# Sign the specify file
|
||||||
|
Function SignWithCertificate($filename) {
|
||||||
|
Write-Host "Signing $filename"
|
||||||
|
$signSha1Arguments = @('sign', '/debug', '/sm', '/fd', 'sha1' , '/tr', 'http://time.certum.pl', '/td', 'sha1' , $filename)
|
||||||
|
$signSha256Arguments = @('sign', '/debug', '/as', '/sm', '/fd', 'sha256', '/tr', 'http://time.certum.pl', '/td', 'sha256', $filename)
|
||||||
|
|
||||||
|
Start-Process -wait $env:SignTool -ArgumentList $signSha1Arguments -NoNewWindow
|
||||||
|
Start-Process -wait $env:SignTool -ArgumentList $signSha256Arguments -NoNewWindow
|
||||||
}
|
}
|
||||||
|
|
||||||
# Sign the file with Signtool before they are packed in the installer / .zip etc
|
# Sign the file with Signtool before they are packed in the installer / .zip etc
|
||||||
|
@ -65,13 +75,8 @@ Function SignBinaryFilesBeforeBuildingInstaller() {
|
||||||
$sourcebase = "$(get-location)\Greenshot\bin\Release"
|
$sourcebase = "$(get-location)\Greenshot\bin\Release"
|
||||||
|
|
||||||
$INCLUDE=@("*.exe", "*.gsp", "*.dll")
|
$INCLUDE=@("*.exe", "*.gsp", "*.dll")
|
||||||
Get-ChildItem -Path "$sourcebase" -Recurse -Include $INCLUDE | foreach {
|
Get-ChildItem -Path "$sourcebase" -Recurse -Include $INCLUDE -Exclude "log4net.dll" | foreach {
|
||||||
Write-Host "Signing $_"
|
SignWithCertificate($_)
|
||||||
$signSha1Arguments = @('sign', '/fd ', 'sha1' , '/a', '/tr', 'http://time.certum.pl', '/td', 'sha1' , $_)
|
|
||||||
$signSha256Arguments = @('sign', '/as', '/fd ', 'sha256', '/a', '/tr', 'http://time.certum.pl', '/td', 'sha256', $_)
|
|
||||||
|
|
||||||
Start-Process -wait -PassThru $env:SignTool -ArgumentList $signSha1Arguments -NoNewWindow
|
|
||||||
Start-Process -wait -PassThru $env:SignTool -ArgumentList $signSha256Arguments -NoNewWindow
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -162,6 +167,13 @@ Function PackagePortable {
|
||||||
}
|
}
|
||||||
Start-Sleep -m 1500
|
Start-Sleep -m 1500
|
||||||
Remove-Item "$destbase\portabletmp" -Recurse -Confirm:$false
|
Remove-Item "$destbase\portabletmp" -Recurse -Confirm:$false
|
||||||
|
|
||||||
|
# sign the .paf.exe
|
||||||
|
$pafFiles = @("*.paf.exe")
|
||||||
|
Get-ChildItem -Path "$destbase" -Recurse -Include $pafFiles | foreach {
|
||||||
|
SignWithCertificate($_)
|
||||||
|
}
|
||||||
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -316,17 +328,17 @@ echo "Preparing certificate"
|
||||||
PrepareCertificate
|
PrepareCertificate
|
||||||
|
|
||||||
echo "Signing executables"
|
echo "Signing executables"
|
||||||
SignBinaryFilesBeforeBuildingInstaller
|
#SignBinaryFilesBeforeBuildingInstaller
|
||||||
|
|
||||||
echo "Generating Installer"
|
echo "Generating Installer"
|
||||||
PackageInstaller
|
#PackageInstaller
|
||||||
|
|
||||||
echo "Generating ZIP"
|
echo "Generating ZIP"
|
||||||
PackageZip
|
#PackageZip
|
||||||
|
|
||||||
echo "Generating Portable"
|
echo "Generating Portable"
|
||||||
PackagePortable
|
PackagePortable
|
||||||
|
|
||||||
echo "Generating Debug Symbols ZIP"
|
echo "Generating Debug Symbols ZIP"
|
||||||
PackageDbgSymbolsZip
|
#PackageDbgSymbolsZip
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue