diff options
Diffstat (limited to 'src/WixToolset.Core/Linker.cs')
-rw-r--r-- | src/WixToolset.Core/Linker.cs | 22 |
1 files changed, 16 insertions, 6 deletions
diff --git a/src/WixToolset.Core/Linker.cs b/src/WixToolset.Core/Linker.cs index cdefa5c7..1cfd085d 100644 --- a/src/WixToolset.Core/Linker.cs +++ b/src/WixToolset.Core/Linker.cs | |||
@@ -149,13 +149,12 @@ namespace WixToolset.Core | |||
149 | throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); | 149 | throw new WixException(ErrorMessages.MissingEntrySection(this.Context.ExpectedOutputType.ToString())); |
150 | } | 150 | } |
151 | 151 | ||
152 | // Add the missing standard action symbols. | 152 | // Add the missing standard action and directory symbols. |
153 | this.LoadStandardActions(find.EntrySection, find.SymbolsByName); | 153 | this.LoadStandardSymbols(find.SymbolsByName); |
154 | 154 | ||
155 | // Resolve the symbol references to find the set of sections we care about for linking. | 155 | // Resolve the symbol references to find the set of sections we care about for linking. |
156 | // Of course, we start with the entry section (that's how it got its name after all). | 156 | // Of course, we start with the entry section (that's how it got its name after all). |
157 | var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.SymbolsByName); | 157 | var resolve = new ResolveReferencesCommand(this.Messaging, find.EntrySection, find.SymbolsByName); |
158 | |||
159 | resolve.Execute(); | 158 | resolve.Execute(); |
160 | 159 | ||
161 | if (this.Messaging.EncounteredError) | 160 | if (this.Messaging.EncounteredError) |
@@ -732,14 +731,14 @@ namespace WixToolset.Core | |||
732 | #endif | 731 | #endif |
733 | 732 | ||
734 | /// <summary> | 733 | /// <summary> |
735 | /// Load the standard action symbols. | 734 | /// Load the standard action and directory symbols. |
736 | /// </summary> | 735 | /// </summary> |
737 | /// <param name="symbolsByName">Collection of symbols.</param> | 736 | /// <param name="symbolsByName">Collection of symbols.</param> |
738 | private void LoadStandardActions(IntermediateSection section, IDictionary<string, SymbolWithSection> symbolsByName) | 737 | private void LoadStandardSymbols(IDictionary<string, SymbolWithSection> symbolsByName) |
739 | { | 738 | { |
740 | foreach (var actionSymbol in WindowsInstallerStandard.StandardActions()) | 739 | foreach (var actionSymbol in WindowsInstallerStandard.StandardActions()) |
741 | { | 740 | { |
742 | var symbolWithSection = new SymbolWithSection(section, actionSymbol); | 741 | var symbolWithSection = new SymbolWithSection(null, actionSymbol); |
743 | 742 | ||
744 | // If the action's symbol has not already been defined (i.e. overriden by the user), add it now. | 743 | // If the action's symbol has not already been defined (i.e. overriden by the user), add it now. |
745 | if (!symbolsByName.ContainsKey(symbolWithSection.Name)) | 744 | if (!symbolsByName.ContainsKey(symbolWithSection.Name)) |
@@ -747,6 +746,17 @@ namespace WixToolset.Core | |||
747 | symbolsByName.Add(symbolWithSection.Name, symbolWithSection); | 746 | symbolsByName.Add(symbolWithSection.Name, symbolWithSection); |
748 | } | 747 | } |
749 | } | 748 | } |
749 | |||
750 | foreach (var directorySymbol in WindowsInstallerStandard.StandardDirectories()) | ||
751 | { | ||
752 | var symbolWithSection = new SymbolWithSection(null, directorySymbol); | ||
753 | |||
754 | // If the directory's symbol has not already been defined (i.e. overriden by the user), add it now. | ||
755 | if (!symbolsByName.ContainsKey(symbolWithSection.Name)) | ||
756 | { | ||
757 | symbolsByName.Add(symbolWithSection.Name, symbolWithSection); | ||
758 | } | ||
759 | } | ||
750 | } | 760 | } |
751 | 761 | ||
752 | /// <summary> | 762 | /// <summary> |