diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:28:50 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-04-29 19:53:29 +1000 |
| commit | 39e930d9aaff250e0fd5019eeedaa40717a6c6fe (patch) | |
| tree | bc0865bc6c9ced1b4a06b408ff60cb83ef73cad3 /src/wixext | |
| parent | f4b14ff16f78435285bb20f16d5d62b902e6ba17 (diff) | |
| download | wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.tar.gz wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.tar.bz2 wix-39e930d9aaff250e0fd5019eeedaa40717a6c6fe.zip | |
Add DotNetCoreBootstrapperApplicationHost for an SCD-style .NET Core BA.
Diffstat (limited to 'src/wixext')
| -rw-r--r-- | src/wixext/BalCompiler.cs | 9 | ||||
| -rw-r--r-- | src/wixext/Tuples/BalTupleDefinitions.cs | 15 | ||||
| -rw-r--r-- | src/wixext/Tuples/WixBalBAFactoryAssemblyTuple.cs | 47 | ||||
| -rw-r--r-- | src/wixext/bal.xsd | 17 |
4 files changed, 87 insertions, 1 deletions
diff --git a/src/wixext/BalCompiler.cs b/src/wixext/BalCompiler.cs index da32234c..33400f3b 100644 --- a/src/wixext/BalCompiler.cs +++ b/src/wixext/BalCompiler.cs | |||
| @@ -197,6 +197,15 @@ namespace WixToolset.Bal | |||
| 197 | { | 197 | { |
| 198 | switch (attribute.Name.LocalName) | 198 | switch (attribute.Name.LocalName) |
| 199 | { | 199 | { |
| 200 | case "BAFactoryAssembly": | ||
| 201 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | ||
| 202 | { | ||
| 203 | section.AddTuple(new WixBalBAFactoryAssemblyTuple(sourceLineNumbers) | ||
| 204 | { | ||
| 205 | PayloadId = payloadId, | ||
| 206 | }); | ||
| 207 | } | ||
| 208 | break; | ||
| 200 | case "BAFunctions": | 209 | case "BAFunctions": |
| 201 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) | 210 | if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attribute)) |
| 202 | { | 211 | { |
diff --git a/src/wixext/Tuples/BalTupleDefinitions.cs b/src/wixext/Tuples/BalTupleDefinitions.cs index 676db9f6..48199f95 100644 --- a/src/wixext/Tuples/BalTupleDefinitions.cs +++ b/src/wixext/Tuples/BalTupleDefinitions.cs | |||
| @@ -4,9 +4,11 @@ namespace WixToolset.Bal | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using WixToolset.Data; | 6 | using WixToolset.Data; |
| 7 | using WixToolset.Data.Burn; | ||
| 7 | 8 | ||
| 8 | public enum BalTupleDefinitionType | 9 | public enum BalTupleDefinitionType |
| 9 | { | 10 | { |
| 11 | WixBalBAFactoryAssembly, | ||
| 10 | WixBalBAFunctions, | 12 | WixBalBAFunctions, |
| 11 | WixBalCondition, | 13 | WixBalCondition, |
| 12 | WixMbaPrereqInformation, | 14 | WixMbaPrereqInformation, |
| @@ -32,6 +34,9 @@ namespace WixToolset.Bal | |||
| 32 | { | 34 | { |
| 33 | switch (type) | 35 | switch (type) |
| 34 | { | 36 | { |
| 37 | case BalTupleDefinitionType.WixBalBAFactoryAssembly: | ||
| 38 | return BalTupleDefinitions.WixBalBAFactoryAssembly; | ||
| 39 | |||
| 35 | case BalTupleDefinitionType.WixBalBAFunctions: | 40 | case BalTupleDefinitionType.WixBalBAFunctions: |
| 36 | return BalTupleDefinitions.WixBalBAFunctions; | 41 | return BalTupleDefinitions.WixBalBAFunctions; |
| 37 | 42 | ||
| @@ -51,5 +56,15 @@ namespace WixToolset.Bal | |||
| 51 | throw new ArgumentOutOfRangeException(nameof(type)); | 56 | throw new ArgumentOutOfRangeException(nameof(type)); |
| 52 | } | 57 | } |
| 53 | } | 58 | } |
| 59 | |||
| 60 | static BalTupleDefinitions() | ||
| 61 | { | ||
| 62 | WixBalBAFactoryAssembly.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 63 | WixBalBAFunctions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 64 | WixBalCondition.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 65 | WixMbaPrereqInformation.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 66 | WixStdbaOptions.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 67 | WixStdbaOverridableVariable.AddTag(BurnConstants.BootstrapperApplicationDataTupleDefinitionTag); | ||
| 68 | } | ||
| 54 | } | 69 | } |
| 55 | } | 70 | } |
diff --git a/src/wixext/Tuples/WixBalBAFactoryAssemblyTuple.cs b/src/wixext/Tuples/WixBalBAFactoryAssemblyTuple.cs new file mode 100644 index 00000000..e33ea562 --- /dev/null +++ b/src/wixext/Tuples/WixBalBAFactoryAssemblyTuple.cs | |||
| @@ -0,0 +1,47 @@ | |||
| 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.Bal | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.Bal.Tuples; | ||
| 7 | |||
| 8 | public static partial class BalTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition WixBalBAFactoryAssembly = new IntermediateTupleDefinition( | ||
| 11 | BalTupleDefinitionType.WixBalBAFactoryAssembly.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(WixBalBAFactoryTupleFields.PayloadId), IntermediateFieldType.String), | ||
| 15 | }, | ||
| 16 | typeof(WixBalBAFactoryAssemblyTuple)); | ||
| 17 | } | ||
| 18 | } | ||
| 19 | |||
| 20 | namespace WixToolset.Bal.Tuples | ||
| 21 | { | ||
| 22 | using WixToolset.Data; | ||
| 23 | |||
| 24 | public enum WixBalBAFactoryTupleFields | ||
| 25 | { | ||
| 26 | PayloadId, | ||
| 27 | } | ||
| 28 | |||
| 29 | public class WixBalBAFactoryAssemblyTuple : IntermediateTuple | ||
| 30 | { | ||
| 31 | public WixBalBAFactoryAssemblyTuple() : base(BalTupleDefinitions.WixBalBAFactoryAssembly, null, null) | ||
| 32 | { | ||
| 33 | } | ||
| 34 | |||
| 35 | public WixBalBAFactoryAssemblyTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(BalTupleDefinitions.WixBalBAFactoryAssembly, sourceLineNumber, id) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public IntermediateField this[WixBalBAFactoryTupleFields index] => this.Fields[(int)index]; | ||
| 40 | |||
| 41 | public string PayloadId | ||
| 42 | { | ||
| 43 | get => this.Fields[(int)WixBalBAFactoryTupleFields.PayloadId].AsString(); | ||
| 44 | set => this.Set((int)WixBalBAFactoryTupleFields.PayloadId, value); | ||
| 45 | } | ||
| 46 | } | ||
| 47 | } \ No newline at end of file | ||
diff --git a/src/wixext/bal.xsd b/src/wixext/bal.xsd index 3081a279..52f9142f 100644 --- a/src/wixext/bal.xsd +++ b/src/wixext/bal.xsd | |||
| @@ -9,7 +9,7 @@ | |||
| 9 | xmlns="http://wixtoolset.org/schemas/v4/wxs/bal"> | 9 | xmlns="http://wixtoolset.org/schemas/v4/wxs/bal"> |
| 10 | <xs:annotation> | 10 | <xs:annotation> |
| 11 | <xs:documentation> | 11 | <xs:documentation> |
| 12 | The source code schema for the WiX Toolset Burn User Experience Extension. | 12 | The source code schema for the WiX Toolset Bootstrapper Application Layer Extension. |
| 13 | </xs:documentation> | 13 | </xs:documentation> |
| 14 | </xs:annotation> | 14 | </xs:annotation> |
| 15 | 15 | ||
| @@ -215,10 +215,25 @@ | |||
| 215 | </xs:complexType> | 215 | </xs:complexType> |
| 216 | </xs:element> | 216 | </xs:element> |
| 217 | 217 | ||
| 218 | <xs:attribute name="BAFactoryAssembly" type="YesNoType"> | ||
| 219 | <xs:annotation> | ||
| 220 | <xs:documentation> | ||
| 221 | When set to "yes", DotNetCoreBootstrapperApplicationHost will load the DLL and instantiate the type with the BootstrapperApplicationFactoryAttribute. | ||
| 222 | There must be corresponding deps.json and runtimeconfig.json files (set EnableDynamicLoading to True in the .NET Core project). | ||
| 223 | The .NET Core project must have been published, not just built. | ||
| 224 | Only one payload may be marked with this attribute set to "yes". | ||
| 225 | </xs:documentation> | ||
| 226 | <xs:appinfo> | ||
| 227 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Payload" /> | ||
| 228 | </xs:appinfo> | ||
| 229 | </xs:annotation> | ||
| 230 | </xs:attribute> | ||
| 231 | |||
| 218 | <xs:attribute name="BAFunctions" type="YesNoType"> | 232 | <xs:attribute name="BAFunctions" type="YesNoType"> |
| 219 | <xs:annotation> | 233 | <xs:annotation> |
| 220 | <xs:documentation> | 234 | <xs:documentation> |
| 221 | When set to "yes", WixStdBA will load the DLL and work with it to handle BA messages. | 235 | When set to "yes", WixStdBA will load the DLL and work with it to handle BA messages. |
| 236 | Only one payload may be marked with this attribute set to "yes". | ||
| 222 | </xs:documentation> | 237 | </xs:documentation> |
| 223 | <xs:appinfo> | 238 | <xs:appinfo> |
| 224 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Payload" /> | 239 | <xse:parent namespace="http://wixtoolset.org/schemas/v4/wxs" ref="Payload" /> |
