diff options
| author | Bob Arnson <bob@firegiant.com> | 2020-03-03 17:19:41 -0500 |
|---|---|---|
| committer | Bob Arnson <bob@firegiant.com> | 2020-03-03 17:24:20 -0500 |
| commit | 0a87bdd3ea0ba538e2cd2713c071c327168e3b44 (patch) | |
| tree | 38a5e59f053db70712a3f66ef184150b6045531f /src | |
| parent | c6456e5a41709997f62656e2406017321b346e48 (diff) | |
| download | wix-0a87bdd3ea0ba538e2cd2713c071c327168e3b44.tar.gz wix-0a87bdd3ea0ba538e2cd2713c071c327168e3b44.tar.bz2 wix-0a87bdd3ea0ba538e2cd2713c071c327168e3b44.zip | |
Add CreateCustomActionReference method from IParseHelper
...to simplify creating custom action references following naming conventions.
Diffstat (limited to 'src')
| -rw-r--r-- | src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs | 31 | ||||
| -rw-r--r-- | src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | 11 |
2 files changed, 2 insertions, 40 deletions
diff --git a/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs b/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs deleted file mode 100644 index 17f381ac..00000000 --- a/src/WixToolset.Core/ExtensibilityServices/CustomActionPlatforms.cs +++ /dev/null | |||
| @@ -1,31 +0,0 @@ | |||
| 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.Core.ExtensibilityServices | ||
| 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 | } | ||
diff --git a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs index 271e5697..af42fa49 100644 --- a/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs +++ b/src/WixToolset.Core/ExtensibilityServices/ParseHelper.cs | |||
| @@ -892,20 +892,13 @@ namespace WixToolset.Core.ExtensibilityServices | |||
| 892 | return actionTuple; | 892 | return actionTuple; |
| 893 | } | 893 | } |
| 894 | 894 | ||
| 895 | /// <summary> | 895 | public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform currentPlatform, CustomActionPlatforms supportedPlatforms) |
| 896 | /// Create a reference in the specified section for a custom action specialized for specific platforms, | ||
| 897 | /// given standard prefixes for naming and suffixes for platforms. | ||
| 898 | /// </summary> | ||
| 899 | /// <param name="sourceLineNumbers">Source line information.</param> | ||
| 900 | /// <param name="customAction">The custom action base name.</param> | ||
| 901 | /// <param name="supportedPlatforms">The platforms for which there are specialized custom actions.</param> | ||
| 902 | public void CreateCustomActionReference(SourceLineNumber sourceLineNumbers, IntermediateSection section, string customAction, Platform platform, CustomActionPlatforms supportedPlatforms) | ||
| 903 | { | 896 | { |
| 904 | if (!this.Messaging.EncounteredError) | 897 | if (!this.Messaging.EncounteredError) |
| 905 | { | 898 | { |
| 906 | var name = String.Concat("Wix4", customAction); | 899 | var name = String.Concat("Wix4", customAction); |
| 907 | 900 | ||
| 908 | switch (platform) | 901 | switch (currentPlatform) |
| 909 | { | 902 | { |
| 910 | case Platform.X86: | 903 | case Platform.X86: |
| 911 | if ((supportedPlatforms & CustomActionPlatforms.X86) == CustomActionPlatforms.X86) | 904 | if ((supportedPlatforms & CustomActionPlatforms.X86) == CustomActionPlatforms.X86) |
