aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-07-10 21:36:00 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-07-10 21:39:48 +1000
commit8ce57f2f167db67687470f2e9744cd4930c6dd95 (patch)
treebb140cce6e889420bf624b011fafe52e7a40e5e9 /src
parent220bea1948c19132d0e5277021b967993293c5a3 (diff)
downloadwix-8ce57f2f167db67687470f2e9744cd4930c6dd95.tar.gz
wix-8ce57f2f167db67687470f2e9744cd4930c6dd95.tar.bz2
wix-8ce57f2f167db67687470f2e9744cd4930c6dd95.zip
Add CreateIdentifierValueFromPlatform.
Diffstat (limited to 'src')
-rw-r--r--src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
index 81a18e24..7115017c 100644
--- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
+++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs
@@ -147,6 +147,41 @@ namespace WixToolset.Core.ExtensibilityServices
147 return new Identifier(AccessModifier.Private, id); 147 return new Identifier(AccessModifier.Private, id);
148 } 148 }
149 149
150 public string CreateIdentifierValueFromPlatform(string name, Platform currentPlatform, BurnPlatforms supportedPlatforms)
151 {
152 string suffix = null;
153
154 switch (currentPlatform)
155 {
156 case Platform.X86:
157 if ((supportedPlatforms & BurnPlatforms.X64) == BurnPlatforms.X64)
158 {
159 suffix = "_X86";
160 }
161 break;
162 case Platform.X64:
163 if ((supportedPlatforms & BurnPlatforms.X64) == BurnPlatforms.X64)
164 {
165 suffix = "_X64";
166 }
167 break;
168 case Platform.ARM:
169 if ((supportedPlatforms & BurnPlatforms.ARM) == BurnPlatforms.ARM)
170 {
171 suffix = "_A32";
172 }
173 break;
174 case Platform.ARM64:
175 if ((supportedPlatforms & BurnPlatforms.ARM64) == BurnPlatforms.ARM64)
176 {
177 suffix = "_A64";
178 }
179 break;
180 }
181
182 return suffix == null ? null : name + suffix;
183 }
184
150 [Obsolete] 185 [Obsolete]
151 public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash) 186 public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
152 { 187 {