diff options
author | Bob Arnson <bob@firegiant.com> | 2022-09-22 21:26:45 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2022-09-22 22:57:38 -0400 |
commit | d7d4243b78ca816bd6beb33b499a3b0c85b5a53d (patch) | |
tree | 0a7ddf9383e98d327b71de28edc9f6e9d4b1e23c /src/ext/UI/wixext | |
parent | d28bb98a6347663684cdf3960e8562eb5a8c4bad (diff) | |
download | wix-d7d4243b78ca816bd6beb33b499a3b0c85b5a53d.tar.gz wix-d7d4243b78ca816bd6beb33b499a3b0c85b5a53d.tar.bz2 wix-d7d4243b78ca816bd6beb33b499a3b0c85b5a53d.zip |
Add WixUI/@InstallDirectory to simplify authoring.
Fixes https://github.com/wixtoolset/issues/issues/6926.
Diffstat (limited to 'src/ext/UI/wixext')
-rw-r--r-- | src/ext/UI/wixext/UICompiler.cs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/ext/UI/wixext/UICompiler.cs b/src/ext/UI/wixext/UICompiler.cs index 1d845237..44ab4cdc 100644 --- a/src/ext/UI/wixext/UICompiler.cs +++ b/src/ext/UI/wixext/UICompiler.cs | |||
@@ -55,6 +55,7 @@ namespace WixToolset.UI | |||
55 | { | 55 | { |
56 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 56 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
57 | string id = null; | 57 | string id = null; |
58 | string installDirectory = null; | ||
58 | 59 | ||
59 | foreach (var attrib in element.Attributes()) | 60 | foreach (var attrib in element.Attributes()) |
60 | { | 61 | { |
@@ -65,6 +66,9 @@ namespace WixToolset.UI | |||
65 | case "Id": | 66 | case "Id": |
66 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 67 | id = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
67 | break; | 68 | break; |
69 | case "InstallDirectory": | ||
70 | installDirectory = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | ||
71 | break; | ||
68 | default: | 72 | default: |
69 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 73 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
70 | break; | 74 | break; |
@@ -111,6 +115,14 @@ namespace WixToolset.UI | |||
111 | IgnoreResult = true, | 115 | IgnoreResult = true, |
112 | ExecutionType = CustomActionExecutionType.Immediate, | 116 | ExecutionType = CustomActionExecutionType.Immediate, |
113 | }); | 117 | }); |
118 | |||
119 | if (installDirectory != null) | ||
120 | { | ||
121 | section.AddSymbol(new PropertySymbol(sourceLineNumbers, new Identifier(AccessModifier.Global, "WIXUI_INSTALLDIR")) | ||
122 | { | ||
123 | Value = installDirectory | ||
124 | }); | ||
125 | } | ||
114 | } | 126 | } |
115 | 127 | ||
116 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); | 128 | this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, element); |