From d0e54dd8f107a651f3e4d33e2ce3928f6c1c24af Mon Sep 17 00:00:00 2001 From: Bogdan Pintea Date: Mon, 25 Nov 2019 13:56:09 +0100 Subject: [PATCH] sign DLL files to be added into the MSI So far only the MSI had been considered for signing. This commit adds the logic to also sign the DLL files that are going to be packed into the MSI. The commit adds the code to find all the DLL files within the directory unpackaged from the ZIP file produced by the build, then sign them with same function used to sign the MSI file. --- installer/build/scripts/Build.fsx | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/installer/build/scripts/Build.fsx b/installer/build/scripts/Build.fsx index 120ee642..7fc885ee 100644 --- a/installer/build/scripts/Build.fsx +++ b/installer/build/scripts/Build.fsx @@ -161,6 +161,15 @@ module Builder = unzipFile (zipFile, buildDir) tracefn "Unzipped zip file in %s" zipFile + // sign every DLL to be part of the MSI + let unzippedDir = Regex.Replace(zipFile, "(^.*)\.zip$", "$1/") + let dllFiles = unzippedDir + |> directoryInfo + |> filesInDirMatching ("*.dll") + |> Seq.map (fun f -> f.FullName) + for dllFile in dllFiles do + Sign dllFile + let exitCode = ExecProcess (fun info -> info.FileName <- sprintf "%sInstaller" MsiBuildDir info.WorkingDirectory <- MsiDir