From aea11451cf2e5257192d537ff6f51cd09a2eada3 Mon Sep 17 00:00:00 2001 From: Robin Date: Fri, 7 Oct 2016 16:21:42 +0200 Subject: [PATCH] Added MD5 for all files that go into the end-product. --- build.ps1 | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/build.ps1 b/build.ps1 index 88bef73b7..f28a6794e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -96,10 +96,14 @@ Function FillTemplates { # Create the MD5 checksum file Function MD5Checksums { echo "MD5 Checksums:" - $currentMD5 = MD5("$(get-location)\Greenshot\bin\Release\Greenshot.exe") - echo "Greenshot.exe : $currentMD5" - $currentMD5 = MD5("$(get-location)\Greenshot\bin\Release\GreenshotPlugin.dll") - echo "GreenshotPlugin.dll : $currentMD5" + $sourcebase = "$(get-location)\Greenshot\bin\Release" + + $INCLUDE=@("*.exe", "*.gsp", "*.dll") + Get-ChildItem -Path "$sourcebase" -Recurse -Include $INCLUDE | foreach { + $currentMD5 = MD5($_.fullname) + $name = $_.Name + echo "$name : $currentMD5" + } } # This function creates the paf.exe @@ -318,6 +322,7 @@ FillTemplates echo "Signing executables" SignBinaryFilesBeforeBuildingInstaller +# This must be after the signing, otherwise they would be different. echo "Generating MD5" MD5Checksums | Set-Content "$(get-location)\Greenshot\bin\Release\checksum.MD5" -encoding UTF8