@joebigelow / wix / commits / 8018df91

Add CreateIdentifierValueFromPlatform and BurnPlatforms.

Sean Hall committed Jul 10, 2020 at 21:32 UTC 8018df91dea67151a8d8ac3b88f7230c1ff59222
2 files changed +40 -2
src/WixToolset.Extensibility/Data/BurnPlatforms.cs new
+28
@@ -0,0 +1,28 @@
1 +// Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information.
2 +
3 +namespace WixToolset.Extensibility.Data
4 +{
5 + using System;
6 +
7 + /// <summary>
8 + /// Platforms that have been supported by Burn.
9 + /// </summary>
10 + [Flags]
11 + public enum BurnPlatforms
12 + {
13 + /// <summary>Not specified.</summary>
14 + None = 0,
15 +
16 + /// <summary>x86.</summary>
17 + X86 = 0x1,
18 +
19 + /// <summary>x64.</summary>
20 + X64 = 0x2,
21 +
22 + /// <summary>arm.</summary>
23 + ARM = 0x4,
24 +
25 + /// <summary>arm64.</summary>
26 + ARM64 = 0x8,
27 + }
28 +}
src/WixToolset.Extensibility/Services/IParseHelper.cs
+12 -2
@@ -34,10 +34,20 @@ namespace WixToolset.Extensibility.Services
34 /// <summary>
35 /// Create an identifier based on passed file name
36 /// </summary>
37 - /// <param name="name">File name to generate identifer from</param>
38 - /// <returns></returns>
37 + /// <param name="filename">File name to generate identifier from</param>
38 + /// <returns>The new identifier.</returns>
39 Identifier CreateIdentifierFromFilename(string filename);
40
41 + /// <summary>
42 + /// Append a suffix to the given name based on the current platform.
43 + /// If the current platform is not in the supported platforms, then it returns null.
44 + /// </summary>
45 + /// <param name="name">The base name for the identifier.</param>
46 + /// <param name="currentPlatform">The platform being compiled.</param>
47 + /// <param name="supportedPlatforms">The platforms for which there are specialized implementations.</param>
48 + /// <returns>The generated identifier value, or null if the current platform isn't supported.</returns>
49 + string CreateIdentifierValueFromPlatform(string name, Platform currentPlatform, BurnPlatforms supportedPlatforms);
50 +
51 /// <summary>
52 /// Creates a symbol in the section.
53 /// </summary>