From 8018df91dea67151a8d8ac3b88f7230c1ff59222 Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Fri, 10 Jul 2020 21:32:31 +1000 Subject: Add CreateIdentifierValueFromPlatform and BurnPlatforms. --- src/WixToolset.Extensibility/Data/BurnPlatforms.cs | 28 ++++++++++++++++++++++ .../Services/IParseHelper.cs | 14 +++++++++-- 2 files changed, 40 insertions(+), 2 deletions(-) create mode 100644 src/WixToolset.Extensibility/Data/BurnPlatforms.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/Data/BurnPlatforms.cs b/src/WixToolset.Extensibility/Data/BurnPlatforms.cs new file mode 100644 index 00000000..4b0edfdb --- /dev/null +++ b/src/WixToolset.Extensibility/Data/BurnPlatforms.cs @@ -0,0 +1,28 @@ +// 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. + +namespace WixToolset.Extensibility.Data +{ + using System; + + /// + /// Platforms that have been supported by Burn. + /// + [Flags] + public enum BurnPlatforms + { + /// Not specified. + None = 0, + + /// x86. + X86 = 0x1, + + /// x64. + X64 = 0x2, + + /// arm. + ARM = 0x4, + + /// arm64. + ARM64 = 0x8, + } +} diff --git a/src/WixToolset.Extensibility/Services/IParseHelper.cs b/src/WixToolset.Extensibility/Services/IParseHelper.cs index f756cb10..b3577d2b 100644 --- a/src/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/WixToolset.Extensibility/Services/IParseHelper.cs @@ -34,10 +34,20 @@ namespace WixToolset.Extensibility.Services /// /// Create an identifier based on passed file name /// - /// File name to generate identifer from - /// + /// File name to generate identifier from + /// The new identifier. Identifier CreateIdentifierFromFilename(string filename); + /// + /// Append a suffix to the given name based on the current platform. + /// If the current platform is not in the supported platforms, then it returns null. + /// + /// The base name for the identifier. + /// The platform being compiled. + /// The platforms for which there are specialized implementations. + /// The generated identifier value, or null if the current platform isn't supported. + string CreateIdentifierValueFromPlatform(string name, Platform currentPlatform, BurnPlatforms supportedPlatforms); + /// /// Creates a symbol in the section. /// -- cgit v1.2.3-55-g6feb