aboutsummaryrefslogtreecommitdiff
path: root/src/WixToolset.Core/Librarian.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/WixToolset.Core/Librarian.cs')
-rw-r--r--src/WixToolset.Core/Librarian.cs14
1 files changed, 4 insertions, 10 deletions
diff --git a/src/WixToolset.Core/Librarian.cs b/src/WixToolset.Core/Librarian.cs
index 3c1810ac..5c0fb302 100644
--- a/src/WixToolset.Core/Librarian.cs
+++ b/src/WixToolset.Core/Librarian.cs
@@ -56,14 +56,14 @@ namespace WixToolset.Core
56 return null; 56 return null;
57 } 57 }
58 58
59 var embedFilePaths = this.ResolveFilePathsToEmbed(context, sections); 59 this.ResolveFilePathsToEmbed(context, sections);
60 60
61 foreach (var section in sections) 61 foreach (var section in sections)
62 { 62 {
63 section.LibraryId = context.LibraryId; 63 section.LibraryId = context.LibraryId;
64 } 64 }
65 65
66 library = new Intermediate(context.LibraryId, sections, localizationsByCulture, embedFilePaths); 66 library = new Intermediate(context.LibraryId, sections, localizationsByCulture);
67 67
68 this.Validate(library); 68 this.Validate(library);
69 } 69 }
@@ -78,10 +78,8 @@ namespace WixToolset.Core
78 return this.Messaging.EncounteredError ? null : library; 78 return this.Messaging.EncounteredError ? null : library;
79 } 79 }
80 80
81 private List<string> ResolveFilePathsToEmbed(ILibraryContext context, IEnumerable<IntermediateSection> sections) 81 private void ResolveFilePathsToEmbed(ILibraryContext context, IEnumerable<IntermediateSection> sections)
82 { 82 {
83 var embedFilePaths = new List<string>();
84
85 // Resolve paths to files that are to be embedded in the library. 83 // Resolve paths to files that are to be embedded in the library.
86 if (context.BindFiles) 84 if (context.BindFiles)
87 { 85 {
@@ -104,9 +102,7 @@ namespace WixToolset.Core
104 if (!String.IsNullOrEmpty(file)) 102 if (!String.IsNullOrEmpty(file))
105 { 103 {
106 // File was successfully resolved so track the embedded index as the embedded file index. 104 // File was successfully resolved so track the embedded index as the embedded file index.
107 field.Set(new IntermediateFieldPathValue { EmbeddedFileIndex = embedFilePaths.Count }); 105 field.Set(new IntermediateFieldPathValue { Embed = true, Path = file });
108
109 embedFilePaths.Add(file);
110 } 106 }
111 else 107 else
112 { 108 {
@@ -116,8 +112,6 @@ namespace WixToolset.Core
116 } 112 }
117 } 113 }
118 } 114 }
119
120 return embedFilePaths;
121 } 115 }
122 116
123 private void Validate(Intermediate library) 117 private void Validate(Intermediate library)