Skip to content

Commit f74728f

Browse files
authored
pass the additional to sign list to the installerspec generator (DynamoDS#10285)
add new files add comments remove files that no longer exist update installerSpec.exe update installerspec source
1 parent e51f6b9 commit f74728f

File tree

4 files changed

+55
-10
lines changed

4 files changed

+55
-10
lines changed

src/DynamoInstall/DynamoInstall.wixproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@
7575
</CreateProperty>
7676
<Exec Command="rd /s /q $(DYNAMO_HARVEST_PATH)" />
7777
<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" />
78-
<Exec Command="$(DYNAMO_BASE_PATH)\tools\install\Extra\InstallerSpec.exe $(DYNAMO_HARVEST_PATH) $(DYNAMO_HARVEST_PATH)\InstallSpec.xml" IgnoreExitCode="true" />
78+
<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" />
7979
<Exec Condition="Exists('$(MSBuildProjectDirectory)\Digital_Sign.bat')" Command="$(MSBuildProjectDirectory)\Digital_Sign.bat $(DYNAMO_HARVEST_PATH)\binariestosign.txt" IgnoreExitCode="false" />
8080

8181
<!-- Copy README file to install folder -->

tools/InstallerSpec/InstallerSpec/Program.cs

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -90,7 +90,10 @@ private IEnumerable<ModuleSpec> GetModules(IEnumerable<string> additionalFilePat
9090
{
9191
foreach(var filePath in additionalFilePaths)
9292
{
93-
if (!File.Exists(filePath)) continue;
93+
if (!File.Exists(filePath))
94+
{
95+
throw new System.IO.FileNotFoundException($"could not find file to sign at: {filePath} while generating binariestosign.txt");
96+
}
9497
yield return ModuleSpecFromFileInfo(new FileInfo(filePath), true);
9598
}
9699
}
@@ -213,22 +216,35 @@ should be on one line.
213216
{
214217
while (!streamReader.EndOfStream)
215218
{
219+
216220
// WARNING: The following codes are written with the assumption that
217221
// files with listed names are residing under "binpath", but this may
218222
// not be true in the future. Rewrite this logic and make "textFilePath"
219223
// contains fully qualified paths instead of doing the prefix here.
220224
//
221225
var fileNameWithoutPath = streamReader.ReadLine().Trim();
226+
//this is a comment, ignore this line
227+
if (fileNameWithoutPath.StartsWith("##") || string.IsNullOrWhiteSpace(fileNameWithoutPath))
228+
{
229+
continue;
230+
}
222231
var fileNameWithPath = Path.Combine(binpath, fileNameWithoutPath);
223232
if (!string.IsNullOrEmpty(fileNameWithPath))
233+
{
234+
Console.WriteLine($"adding {fileNameWithPath} to filesToSign list while parsing {textFilePath}");
224235
fileList.Add(fileNameWithPath);
236+
}
225237
}
226238
}
227239
}
228240
catch
229241
{
230242
}
231243
}
244+
else
245+
{
246+
throw new FileNotFoundException($"could not find {textFilePath} but it was passed as an argument to installerSpec.exe");
247+
}
232248
}
233249
else
234250
{

tools/install/Extra/InstallerSpec.exe

512 Bytes
Binary file not shown.
Lines changed: 37 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,40 @@
1-
DynamoInstallDetective.dll
1+
## this is a comment.
2+
## this file contains relative file paths to the dynamo bin directory,
3+
## which will be signed during the build.
4+
## Files which are not found should cause a build failure.
5+
26
Greg.dll
3-
GregAdWebServicesAuth.dll
4-
Reach.dll
57
Analytics.NET.Core.dll
68
Analytics.NET.Google.dll
7-
DynamoServices.dll
8-
DynamoUnits.dll
9-
DynamoUtilities.dll
10-
GraphLayout.dll
11-
LibG.Interface.dll
9+
LibG.Interface.dll
10+
ProtoGeometry.customization.dll
11+
ProtoGeometry.dll
12+
.\en-US\ProtoGeometry.resources.dll
13+
14+
.\libg_224_0_1\LibG.AsmPreloader.Managed.dll
15+
.\libg_224_0_1\LibG.AsmPreloader.Unmanaged.dll
16+
.\libg_224_0_1\LibG.dll
17+
.\libg_224_0_1\LibG.Managed.dll
18+
.\libg_224_0_1\LibG.ProtoInterface.dll
19+
.\libg_224_0_1\LibGCore.dll
20+
21+
.\libg_224_4_0\LibG.AsmPreloader.Managed.dll
22+
.\libg_224_4_0\LibG.AsmPreloader.Unmanaged.dll
23+
.\libg_224_4_0\LibG.dll
24+
.\libg_224_4_0\LibG.Managed.dll
25+
.\libg_224_4_0\LibG.ProtoInterface.dll
26+
.\libg_224_4_0\LibGCore.dll
27+
28+
.\libg_225_0_0\LibG.AsmPreloader.Managed.dll
29+
.\libg_225_0_0\LibG.AsmPreloader.Unmanaged.dll
30+
.\libg_225_0_0\LibG.dll
31+
.\libg_225_0_0\LibG.Managed.dll
32+
.\libg_225_0_0\LibG.ProtoInterface.dll
33+
.\libg_225_0_0\LibGCore.dll
34+
35+
.\libg_226_0_0\LibG.AsmPreloader.Managed.dll
36+
.\libg_226_0_0\LibG.AsmPreloader.Unmanaged.dll
37+
.\libg_226_0_0\LibG.dll
38+
.\libg_226_0_0\LibG.Managed.dll
39+
.\libg_226_0_0\LibG.ProtoInterface.dll
40+
.\libg_226_0_0\LibGCore.dll

0 commit comments

Comments
 (0)