From 08db827a9d320f24bedfb61cb6d6e1f2e6eb80f7 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Tue, 3 Mar 2020 17:14:08 -0500 Subject: Add CreateCustomActionReference method ...to simplify creating custom action references following naming conventions. --- .../Data/CustomActionPlatforms.cs | 31 ++++++++++++++++++++++ .../Services/IParseHelper.cs | 11 ++++++++ 2 files changed, 42 insertions(+) create mode 100644 src/WixToolset.Extensibility/Data/CustomActionPlatforms.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/Data/CustomActionPlatforms.cs b/src/WixToolset.Extensibility/Data/CustomActionPlatforms.cs new file mode 100644 index 00000000..c3c5ba82 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/CustomActionPlatforms.cs @@ -0,0 +1,31 @@ +// 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 supported by custom actions. + /// + [Flags] + public enum CustomActionPlatforms + { + /// Not specified. + None = 0, + + /// x86. + X86 = 0x1, + + /// x64. + X64 = 0x2, + + /// ia64. + IA64 = 0x4, + + /// arm. + ARM = 0x8, + + /// arm64. + ARM64 = 0x10 + } +} diff --git a/src/WixToolset.Extensibility/Services/IParseHelper.cs b/src/WixToolset.Extensibility/Services/IParseHelper.cs index 2a51e240..a8f8da4f 100644 --- a/src/WixToolset.Extensibility/Services/IParseHelper.cs +++ b/src/WixToolset.Extensibility/Services/IParseHelper.cs @@ -125,6 +125,17 @@ namespace WixToolset.Extensibility.Services /// The primary keys of the simple reference. void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, params string[] primaryKeys); + /// + /// Create a reference in the specified section for a custom action specialized for specific platforms, + /// given standard prefixes for naming and suffixes for platforms. + /// + /// Source line information. + /// Section to create the reference in. + /// The custom action base name. + /// The platform being compiled. + /// The platforms for which there are specialized custom actions. + void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms); + /// /// Creates WixComplexReference and WixGroup rows in the active section. /// -- cgit v1.2.3-55-g6feb