Skip to content

Commit

Permalink
pass the additional to sign list to the installerspec generator (#10285
Browse files Browse the repository at this point in the history
…) (#10294)

add new files
add comments
remove files that no longer exist
update installerSpec.exe
update installerspec source

(cherry picked from commit f74728f)
  • Loading branch information
mjkkirschner authored Jan 13, 2020
1 parent 668b734 commit d14a322
Show file tree
Hide file tree
Showing 4 changed files with 55 additions and 10 deletions.
2 changes: 1 addition & 1 deletion src/DynamoInstall/DynamoInstall.wixproj
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
</CreateProperty>
<Exec Command="rd /s /q $(DYNAMO_HARVEST_PATH)" />
<Exec Command="robocopy $(DYNAMO_BASE_PATH)\bin\AnyCPU\$(Configuration) $(DYNAMO_HARVEST_PATH) -XF %2aTest%2a.dll %2a.pdb TestResult.xml -e -XD int -XD Revit_2016 -XD Revit_2017 -XD Revit_2018 -XD samples -XD gallery -XD 0.8" IgnoreExitCode="true" />
<Exec Command="$(DYNAMO_BASE_PATH)\tools\install\Extra\InstallerSpec.exe $(DYNAMO_HARVEST_PATH) $(DYNAMO_HARVEST_PATH)\InstallSpec.xml" IgnoreExitCode="true" />
<Exec Command="$(DYNAMO_BASE_PATH)\tools\install\Extra\InstallerSpec.exe $(DYNAMO_HARVEST_PATH) $(DYNAMO_HARVEST_PATH)\InstallSpec.xml /f:$(DYNAMO_BASE_PATH)\tools\install\Extra\additional-files-to-sign.txt" IgnoreExitCode="false" />
<Exec Condition="Exists('$(MSBuildProjectDirectory)\Digital_Sign.bat')" Command="$(MSBuildProjectDirectory)\Digital_Sign.bat $(DYNAMO_HARVEST_PATH)\binariestosign.txt" IgnoreExitCode="false" />

<!-- Copy README file to install folder -->
Expand Down
18 changes: 17 additions & 1 deletion tools/InstallerSpec/InstallerSpec/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ private IEnumerable<ModuleSpec> GetModules(IEnumerable<string> additionalFilePat
{
foreach(var filePath in additionalFilePaths)
{
if (!File.Exists(filePath)) continue;
if (!File.Exists(filePath))
{
throw new System.IO.FileNotFoundException($"could not find file to sign at: {filePath} while generating binariestosign.txt");
}
yield return ModuleSpecFromFileInfo(new FileInfo(filePath), true);
}
}
Expand Down Expand Up @@ -213,22 +216,35 @@ should be on one line.
{
while (!streamReader.EndOfStream)
{

// WARNING: The following codes are written with the assumption that
// files with listed names are residing under "binpath", but this may
// not be true in the future. Rewrite this logic and make "textFilePath"
// contains fully qualified paths instead of doing the prefix here.
//
var fileNameWithoutPath = streamReader.ReadLine().Trim();
//this is a comment, ignore this line
if (fileNameWithoutPath.StartsWith("##") || string.IsNullOrWhiteSpace(fileNameWithoutPath))
{
continue;
}
var fileNameWithPath = Path.Combine(binpath, fileNameWithoutPath);
if (!string.IsNullOrEmpty(fileNameWithPath))
{
Console.WriteLine($"adding {fileNameWithPath} to filesToSign list while parsing {textFilePath}");
fileList.Add(fileNameWithPath);
}
}
}
}
catch
{
}
}
else
{
throw new FileNotFoundException($"could not find {textFilePath} but it was passed as an argument to installerSpec.exe");
}
}
else
{
Expand Down
Binary file modified tools/install/Extra/InstallerSpec.exe
Binary file not shown.
45 changes: 37 additions & 8 deletions tools/install/Extra/additional-files-to-sign.txt
Original file line number Diff line number Diff line change
@@ -1,11 +1,40 @@
DynamoInstallDetective.dll
## this is a comment.
## this file contains relative file paths to the dynamo bin directory,
## which will be signed during the build.
## Files which are not found should cause a build failure.

Greg.dll
GregAdWebServicesAuth.dll
Reach.dll
Analytics.NET.Core.dll
Analytics.NET.Google.dll
DynamoServices.dll
DynamoUnits.dll
DynamoUtilities.dll
GraphLayout.dll
LibG.Interface.dll
LibG.Interface.dll
ProtoGeometry.customization.dll
ProtoGeometry.dll
.\en-US\ProtoGeometry.resources.dll

.\libg_224_0_1\LibG.AsmPreloader.Managed.dll
.\libg_224_0_1\LibG.AsmPreloader.Unmanaged.dll
.\libg_224_0_1\LibG.dll
.\libg_224_0_1\LibG.Managed.dll
.\libg_224_0_1\LibG.ProtoInterface.dll
.\libg_224_0_1\LibGCore.dll

.\libg_224_4_0\LibG.AsmPreloader.Managed.dll
.\libg_224_4_0\LibG.AsmPreloader.Unmanaged.dll
.\libg_224_4_0\LibG.dll
.\libg_224_4_0\LibG.Managed.dll
.\libg_224_4_0\LibG.ProtoInterface.dll
.\libg_224_4_0\LibGCore.dll

.\libg_225_0_0\LibG.AsmPreloader.Managed.dll
.\libg_225_0_0\LibG.AsmPreloader.Unmanaged.dll
.\libg_225_0_0\LibG.dll
.\libg_225_0_0\LibG.Managed.dll
.\libg_225_0_0\LibG.ProtoInterface.dll
.\libg_225_0_0\LibGCore.dll

.\libg_226_0_0\LibG.AsmPreloader.Managed.dll
.\libg_226_0_0\LibG.AsmPreloader.Unmanaged.dll
.\libg_226_0_0\LibG.dll
.\libg_226_0_0\LibG.Managed.dll
.\libg_226_0_0\LibG.ProtoInterface.dll
.\libg_226_0_0\LibGCore.dll

0 comments on commit d14a322

Please sign in to comment.