Add CreateCustomActionReference method
...to simplify creating custom action references following naming conventions.
Bob Arnson committed
Mar 3, 2020 at 17:14 UTC
08db827a9d320f24bedfb61cb6d6e1f2e6eb80f7
2 files changed
+42
src/WixToolset.Extensibility/Data/CustomActionPlatforms.cs
new
+31
@@ -0,0 +1,31 @@
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 supported by custom actions.
9
+ /// </summary>
10
+ [Flags]
11
+ public enum CustomActionPlatforms
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>ia64.</summary>
23
+ IA64 = 0x4,
24
+
25
+ /// <summary>arm.</summary>
26
+ ARM = 0x8,
27
+
28
+ /// <summary>arm64.</summary>
29
+ ARM64 = 0x10
30
+ }
31
+}
src/WixToolset.Extensibility/Services/IParseHelper.cs
+11
@@ -125,6 +125,17 @@ namespace WixToolset.Extensibility.Services
125
/// <param name="primaryKeys">The primary keys of the simple reference.</param>
126
void CreateSimpleReference(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, params string[] primaryKeys);
127
128
+ /// <summary>
129
+ /// Create a reference in the specified section for a custom action specialized for specific platforms,
130
+ /// given standard prefixes for naming and suffixes for platforms.
131
+ /// </summary>
132
+ /// <param name="sourceLineNumbers">Source line information.</param>
133
+ /// <param name="section">Section to create the reference in.</param>
134
+ /// <param name="customAction">The custom action base name.</param>
135
+ /// <param name="currentPlatform">The platform being compiled.</param>
136
+ /// <param name="supportedPlatforms">The platforms for which there are specialized custom actions.</param>
137
+ void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms);
138
+
139
/// <summary>
140
/// Creates WixComplexReference and WixGroup rows in the active section.
141
/// </summary>