diff options
| author | Rob Mensching <rob@firegiant.com> | 2019-10-07 11:18:13 -0700 |
|---|---|---|
| committer | Rob Mensching <rob@firegiant.com> | 2019-10-07 11:59:14 -0700 |
| commit | 860676fa5b40a1904478151e9b4934c004e7db63 (patch) | |
| tree | 83fabd53f2a68dcf56bc8da66d88e115af3764b0 /src/WixToolset.Core/Bind | |
| parent | 3b98dac62b47d590f3465985362d6e6fd100b1c0 (diff) | |
| download | wix-860676fa5b40a1904478151e9b4934c004e7db63.tar.gz wix-860676fa5b40a1904478151e9b4934c004e7db63.tar.bz2 wix-860676fa5b40a1904478151e9b4934c004e7db63.zip | |
Implement Bundle build
Diffstat (limited to 'src/WixToolset.Core/Bind')
| -rw-r--r-- | src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs | 8 | ||||
| -rw-r--r-- | src/WixToolset.Core/Bind/FileResolver.cs | 8 | ||||
| -rw-r--r-- | src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs | 2 |
3 files changed, 12 insertions, 6 deletions
diff --git a/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs b/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs index c6e21973..644e5c63 100644 --- a/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs +++ b/src/WixToolset.Core/Bind/ExtractEmbeddedFiles.cs | |||
| @@ -30,10 +30,10 @@ namespace WixToolset.Core.Bind | |||
| 30 | { | 30 | { |
| 31 | // If the uri to the file that contains the embedded file does not already have embedded files | 31 | // If the uri to the file that contains the embedded file does not already have embedded files |
| 32 | // being extracted, create the dictionary to track that. | 32 | // being extracted, create the dictionary to track that. |
| 33 | if (!filesWithEmbeddedFiles.TryGetValue(uri, out var extracts)) | 33 | if (!this.filesWithEmbeddedFiles.TryGetValue(uri, out var extracts)) |
| 34 | { | 34 | { |
| 35 | extracts = new SortedList<int, string>(); | 35 | extracts = new SortedList<int, string>(); |
| 36 | filesWithEmbeddedFiles.Add(uri, extracts); | 36 | this.filesWithEmbeddedFiles.Add(uri, extracts); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | // If the embedded file is not already tracked in the dictionary of extracts, add it. | 39 | // If the embedded file is not already tracked in the dictionary of extracts, add it. |
| @@ -52,7 +52,7 @@ namespace WixToolset.Core.Bind | |||
| 52 | 52 | ||
| 53 | public IEnumerable<ExpectedExtractFile> GetExpectedEmbeddedFiles() | 53 | public IEnumerable<ExpectedExtractFile> GetExpectedEmbeddedFiles() |
| 54 | { | 54 | { |
| 55 | foreach (var uriWithExtracts in filesWithEmbeddedFiles) | 55 | foreach (var uriWithExtracts in this.filesWithEmbeddedFiles) |
| 56 | { | 56 | { |
| 57 | foreach (var extracts in uriWithExtracts.Value) | 57 | foreach (var extracts in uriWithExtracts.Value) |
| 58 | { | 58 | { |
| @@ -68,7 +68,7 @@ namespace WixToolset.Core.Bind | |||
| 68 | 68 | ||
| 69 | public IEnumerable<ExpectedExtractFile> GetExtractFilesForUri(Uri uri) | 69 | public IEnumerable<ExpectedExtractFile> GetExtractFilesForUri(Uri uri) |
| 70 | { | 70 | { |
| 71 | if (!filesWithEmbeddedFiles.TryGetValue(uri, out var extracts)) | 71 | if (!this.filesWithEmbeddedFiles.TryGetValue(uri, out var extracts)) |
| 72 | { | 72 | { |
| 73 | extracts = new SortedList<int, string>(); | 73 | extracts = new SortedList<int, string>(); |
| 74 | } | 74 | } |
diff --git a/src/WixToolset.Core/Bind/FileResolver.cs b/src/WixToolset.Core/Bind/FileResolver.cs index a67d784d..b1676fad 100644 --- a/src/WixToolset.Core/Bind/FileResolver.cs +++ b/src/WixToolset.Core/Bind/FileResolver.cs | |||
| @@ -70,11 +70,17 @@ namespace WixToolset.Core.Bind | |||
| 70 | /// <param name="type">Optional type of source file being resolved.</param> | 70 | /// <param name="type">Optional type of source file being resolved.</param> |
| 71 | /// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param> | 71 | /// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param> |
| 72 | /// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param> | 72 | /// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param> |
| 73 | /// <param name="alreadyCheckedPaths">Optional collection of paths already checked.</param> | ||
| 73 | /// <returns>Should return a valid path for the stream to be imported.</returns> | 74 | /// <returns>Should return a valid path for the stream to be imported.</returns> |
| 74 | public string ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage) | 75 | public string ResolveFile(string source, IntermediateTupleDefinition tupleDefinition, SourceLineNumber sourceLineNumbers, BindStage bindStage, IEnumerable<string> alreadyCheckedPaths = null) |
| 75 | { | 76 | { |
| 76 | var checkedPaths = new List<string>(); | 77 | var checkedPaths = new List<string>(); |
| 77 | 78 | ||
| 79 | if (alreadyCheckedPaths != null) | ||
| 80 | { | ||
| 81 | checkedPaths.AddRange(alreadyCheckedPaths); | ||
| 82 | } | ||
| 83 | |||
| 78 | foreach (var extension in this.ResolverExtensions) | 84 | foreach (var extension in this.ResolverExtensions) |
| 79 | { | 85 | { |
| 80 | var resolved = extension.ResolveFile(source, tupleDefinition, sourceLineNumbers, bindStage); | 86 | var resolved = extension.ResolveFile(source, tupleDefinition, sourceLineNumbers, bindStage); |
diff --git a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs index bec03907..22710aca 100644 --- a/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs +++ b/src/WixToolset.Core/Bind/ResolveDelayedFieldsCommand.cs | |||
| @@ -113,7 +113,7 @@ namespace WixToolset.Core.Bind | |||
| 113 | } | 113 | } |
| 114 | } | 114 | } |
| 115 | 115 | ||
| 116 | public static string ResolveDelayedVariables(SourceLineNumber sourceLineNumbers, string value, IDictionary<string, string> resolutionData) | 116 | private static string ResolveDelayedVariables(SourceLineNumber sourceLineNumbers, string value, IDictionary<string, string> resolutionData) |
| 117 | { | 117 | { |
| 118 | var matches = Common.WixVariableRegex.Matches(value); | 118 | var matches = Common.WixVariableRegex.Matches(value); |
| 119 | 119 | ||
