diff options
Diffstat (limited to 'src/ext/Bal/test/examples')
48 files changed, 186 insertions, 293 deletions
diff --git a/src/ext/Bal/test/examples/Directory.Build.props b/src/ext/Bal/test/examples/Directory.Build.props index 7f38564a..e7d65cdd 100644 --- a/src/ext/Bal/test/examples/Directory.Build.props +++ b/src/ext/Bal/test/examples/Directory.Build.props | |||
@@ -2,6 +2,5 @@ | |||
2 | <!-- 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 | <!-- 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. --> |
3 | <Project> | 3 | <Project> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\Directory.Build.props" /> | 4 | <Import Project="$(MsbuildThisFileDirectory)..\..\Directory.Build.props" /> |
5 | <Import Project="Directory.csproj.props" Condition=" '$(MSBuildProjectExtension)'=='.csproj' " /> | ||
6 | <Import Project="Directory.wixproj.props" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> | 5 | <Import Project="Directory.wixproj.props" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> |
7 | </Project> | 6 | </Project> |
diff --git a/src/ext/Bal/test/examples/Directory.Build.targets b/src/ext/Bal/test/examples/Directory.Build.targets index b27a1a41..3e9115e0 100644 --- a/src/ext/Bal/test/examples/Directory.Build.targets +++ b/src/ext/Bal/test/examples/Directory.Build.targets | |||
@@ -3,5 +3,4 @@ | |||
3 | <Project> | 3 | <Project> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\..\..\Directory.Build.targets" /> | 4 | <Import Project="$(MsbuildThisFileDirectory)..\..\..\..\Directory.Build.targets" /> |
5 | <Import Project="Directory.wixproj.targets" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> | 5 | <Import Project="Directory.wixproj.targets" Condition=" '$(MSBuildProjectExtension)'=='.wixproj' " /> |
6 | <Import Project="DncBA.targets" Condition=" '$(IsDncBA)'=='true' " /> | ||
7 | </Project> | 6 | </Project> |
diff --git a/src/ext/Bal/test/examples/DncBA.targets b/src/ext/Bal/test/examples/DncBA.targets deleted file mode 100644 index 2b8c1428..00000000 --- a/src/ext/Bal/test/examples/DncBA.targets +++ /dev/null | |||
@@ -1,19 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- 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. --> | ||
3 | <Project> | ||
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\build\WixToolset.Dnc.HostGenerator.targets" /> | ||
5 | |||
6 | <PropertyGroup> | ||
7 | <ILLinkTreatWarningsAsErrors>false</ILLinkTreatWarningsAsErrors> | ||
8 | </PropertyGroup> | ||
9 | |||
10 | <ItemGroup> | ||
11 | <ProjectReference Include="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\WixToolset.Dnc.HostGenerator.csproj" | ||
12 | OutputItemType="Analyzer" | ||
13 | ReferenceOutputAssembly="false" /> | ||
14 | </ItemGroup> | ||
15 | |||
16 | <ItemGroup> | ||
17 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
18 | </ItemGroup> | ||
19 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs index 116d5223..bb83568f 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs index 3672fc1d..ca3d4cf0 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDx86EarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{3D4A29A0-8AAE-4831-A9CF-E34AC298097D}"> | 2 | <Bundle Name="FDDx86EarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{3D4A29A0-8AAE-4831-A9CF-E34AC298097D}"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.deps.json" Name="Example.EarliestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.dll" Name="Example.EarliestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\Example.EarliestCoreMBA.runtimeconfig.json" Name="Example.EarliestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.EarliestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs index d888d3d9..38a167f1 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="SCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.EarliestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> | 5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.scd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt index 06b84256..d30b2564 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt +++ b/src/ext/Bal/test/examples/EarliestCoreBundleSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs index 5f1aa557..bf4ad6e3 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="TrimmedSCDEarliestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="SourceDir\Example.EarliestCoreMBA.exe" > |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> | 5 | <PayloadGroupRef Id="publish.Example.EarliestCoreMBA.trimmedscd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt index 06b84256..d30b2564 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt +++ b/src/ext/Bal/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.EarliestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs index c9291a7f..490f4051 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.EarliestCoreMBA | |||
6 | 6 | ||
7 | public class EarliestCoreBA : BootstrapperApplication | 7 | public class EarliestCoreBA : BootstrapperApplication |
8 | { | 8 | { |
9 | public EarliestCoreBA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(0); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs deleted file mode 100644 index 672e17ee..00000000 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +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 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.EarliestCoreMBA.EarliestCoreBAFactory))] | ||
4 | namespace Example.EarliestCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class EarliestCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new EarliestCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj index 7b9d1670..958381c3 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj | |||
@@ -3,7 +3,12 @@ | |||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <TargetFramework>net6.0</TargetFramework> | 4 | <TargetFramework>net6.0</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | 6 | <OutputType>WinExe</OutputType> |
7 | <DebugType>embedded</DebugType> | ||
7 | <Description>Earliest .NET Core MBA</Description> | 8 | <Description>Earliest .NET Core MBA</Description> |
8 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
9 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs new file mode 100644 index 00000000..11cc46f0 --- /dev/null +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
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 Example.EarliestCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new EarliestCoreBA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs index ba4f02b6..9ca93c7f 100644 --- a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs | |||
@@ -1,11 +1,10 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FullFramework2MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FullFramework2MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.exe"> |
4 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.dll" /> | 4 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\Example.FullFramework2MBA.exe.config" /> |
5 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\mbanative.dll" /> | 5 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\mbanative.dll" /> |
6 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Core.dll" /> | 6 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Core.dll" /> |
7 | <Payload SourceFile="Example.FullFramework2MBA\net462\win-x64\WixToolset.Mba.Host.config" /> | 7 | <!-- <bal:WixManagedBootstrapperApplicationHost /> --> |
8 | <bal:WixManagedBootstrapperApplicationHost /> | ||
9 | </BootstrapperApplication> | 8 | </BootstrapperApplication> |
10 | <Chain> | 9 | <Chain> |
11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 10 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj b/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj index ba75a9ff..7f9c222e 100644 --- a/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj +++ b/src/ext/Bal/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj | |||
@@ -1,2 +1,6 @@ | |||
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. --> | 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 | <Project Sdk="WixToolset.Sdk" /> | 2 | <Project Sdk="WixToolset.Sdk"> |
3 | <ItemGroup> | ||
4 | <ProjectReference Include="..\FullFramework2MBA\Example.FullFramework2MBA.csproj" /> | ||
5 | </ItemGroup> | ||
6 | </Project> | ||
diff --git a/src/ext/Bal/test/examples/Directory.csproj.props b/src/ext/Bal/test/examples/FullFramework2MBA/App.config index e314ca20..cd68f257 100644 --- a/src/ext/Bal/test/examples/Directory.csproj.props +++ b/src/ext/Bal/test/examples/FullFramework2MBA/App.config | |||
@@ -1,5 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | 1 | <?xml version="1.0" encoding="utf-8" ?> |
2 | <!-- 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 | <!-- 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. --> |
3 | <Project> | 3 | <configuration> |
4 | <Import Project="$(MsbuildThisFileDirectory)..\..\WixToolset.Dnc.HostGenerator\build\WixToolset.Dnc.HostGenerator.props" /> | 4 | <startup> |
5 | </Project> | 5 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> |
6 | </startup> | ||
7 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj index f6280a9e..7c4db8c1 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj | |||
@@ -4,6 +4,7 @@ | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net462</TargetFramework> | 6 | <TargetFramework>net462</TargetFramework> |
7 | <OutputType>WinExe</OutputType> | ||
7 | <AssemblyName>Example.FullFramework2MBA</AssemblyName> | 8 | <AssemblyName>Example.FullFramework2MBA</AssemblyName> |
8 | <RootNamespace>Example.FullFramework2MBA</RootNamespace> | 9 | <RootNamespace>Example.FullFramework2MBA</RootNamespace> |
9 | <DebugType>embedded</DebugType> | 10 | <DebugType>embedded</DebugType> |
@@ -11,10 +12,10 @@ | |||
11 | </PropertyGroup> | 12 | </PropertyGroup> |
12 | 13 | ||
13 | <ItemGroup> | 14 | <ItemGroup> |
14 | <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | 15 | <PackageReference Include="WixToolset.Mba.Core" /> |
15 | </ItemGroup> | 16 | </ItemGroup> |
16 | 17 | ||
17 | <ItemGroup> | 18 | <ItemGroup> |
18 | <PackageReference Include="WixToolset.Mba.Core" /> | 19 | <ProjectReference Include="..\..\..\..\..\api\burn\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj" /> |
19 | </ItemGroup> | 20 | </ItemGroup> |
20 | </Project> | 21 | </Project> |
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs index 32cd19c8..c6d478af 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs +++ b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.FullFramework2MBA | |||
6 | 6 | ||
7 | public class FullFramework2BA : BootstrapperApplication | 7 | public class FullFramework2BA : BootstrapperApplication |
8 | { | 8 | { |
9 | public FullFramework2BA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(42); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs deleted file mode 100644 index 647c2040..00000000 --- a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs +++ /dev/null | |||
@@ -1,22 +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 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework2MBA.FullFramework2BAFactory))] | ||
4 | namespace Example.FullFramework2MBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class FullFramework2BAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new FullFramework2BA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs new file mode 100644 index 00000000..067fefe8 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
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 Example.FullFramework2MBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new FullFramework2BA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config deleted file mode 100644 index 41cacce5..00000000 --- a/src/ext/Bal/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config +++ /dev/null | |||
@@ -1,20 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup> | ||
12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | |||
16 | <host assemblyName="Example.FullFramework2MBA"> | ||
17 | <supportedFramework version="v4\Client" /> | ||
18 | </host> | ||
19 | </wix.bootstrapper> | ||
20 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs index 802b8b1e..7cac54f2 100644 --- a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs | |||
@@ -1,11 +1,11 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FullFramework4MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="E08068E0-4FBA-439D-A1C8-4CD1FE27093F"> | 2 | <Bundle Name="FullFramework4MBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="E08068E0-4FBA-439D-A1C8-4CD1FE27093F"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.exe"> |
4 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.dll" /> | 4 | <!-- <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.dll" /> --> |
5 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\Example.FullFramework4MBA.exe.config" /> | ||
5 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\mbanative.dll" /> | 6 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\mbanative.dll" /> |
6 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Core.dll" /> | 7 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Core.dll" /> |
7 | <Payload SourceFile="Example.FullFramework4MBA\net472\win-x64\WixToolset.Mba.Host.config" /> | 8 | <!-- <bal:WixManagedBootstrapperApplicationHost /> --> |
8 | <bal:WixManagedBootstrapperApplicationHost /> | ||
9 | </BootstrapperApplication> | 9 | </BootstrapperApplication> |
10 | <Chain> | 10 | <Chain> |
11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 11 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj b/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj index ba75a9ff..f36d1910 100644 --- a/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj +++ b/src/ext/Bal/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj | |||
@@ -1,2 +1,7 @@ | |||
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. --> | 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 | <Project Sdk="WixToolset.Sdk" /> | 2 | <Project Sdk="WixToolset.Sdk"> |
3 | <ItemGroup> | ||
4 | <ProjectReference Include="..\FullFramework4MBA\Example.FullFramework4MBA.csproj" /> | ||
5 | </ItemGroup> | ||
6 | </Project> | ||
7 | |||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/App.config b/src/ext/Bal/test/examples/FullFramework4MBA/App.config new file mode 100644 index 00000000..dfb3084c --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/App.config | |||
@@ -0,0 +1,7 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- 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. --> | ||
3 | <configuration> | ||
4 | <startup> | ||
5 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.7.2" /> | ||
6 | </startup> | ||
7 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj index 247c8173..09665180 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj | |||
@@ -4,15 +4,13 @@ | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | 4 | <Project Sdk="Microsoft.NET.Sdk"> |
5 | <PropertyGroup> | 5 | <PropertyGroup> |
6 | <TargetFramework>net472</TargetFramework> | 6 | <TargetFramework>net472</TargetFramework> |
7 | <OutputType>WinExe</OutputType> | ||
7 | <Description>Full Framework v4 MBA</Description> | 8 | <Description>Full Framework v4 MBA</Description> |
9 | <DebugType>embedded</DebugType> | ||
8 | <RuntimeIdentifier>win-x64</RuntimeIdentifier> | 10 | <RuntimeIdentifier>win-x64</RuntimeIdentifier> |
9 | </PropertyGroup> | 11 | </PropertyGroup> |
10 | 12 | ||
11 | <ItemGroup> | 13 | <ItemGroup> |
12 | <Content Include="WixToolset.Mba.Host.config" CopyToOutputDirectory="PreserveNewest" /> | ||
13 | </ItemGroup> | ||
14 | |||
15 | <ItemGroup> | ||
16 | <PackageReference Include="WixToolset.Mba.Core" /> | 14 | <PackageReference Include="WixToolset.Mba.Core" /> |
17 | </ItemGroup> | 15 | </ItemGroup> |
18 | </Project> | 16 | </Project> |
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs index 8ee3bd19..8a91195a 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs +++ b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs | |||
@@ -6,14 +6,9 @@ namespace Example.FullFramework4MBA | |||
6 | 6 | ||
7 | public class FullFramework4BA : BootstrapperApplication | 7 | public class FullFramework4BA : BootstrapperApplication |
8 | { | 8 | { |
9 | public FullFramework4BA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | |||
13 | } | ||
14 | |||
15 | protected override void Run() | 9 | protected override void Run() |
16 | { | 10 | { |
11 | this.engine.Quit(0); | ||
17 | } | 12 | } |
18 | 13 | ||
19 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs deleted file mode 100644 index 6a571a54..00000000 --- a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs +++ /dev/null | |||
@@ -1,22 +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 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework4MBA.FullFramework4BAFactory))] | ||
4 | namespace Example.FullFramework4MBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class FullFramework4BAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new FullFramework4BA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs new file mode 100644 index 00000000..23fb6851 --- /dev/null +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
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 Example.FullFramework4MBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new FullFramework4BA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config b/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config deleted file mode 100644 index ac4770df..00000000 --- a/src/ext/Bal/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config +++ /dev/null | |||
@@ -1,17 +0,0 @@ | |||
1 | <?xml version="1.0" encoding="utf-8" ?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | |||
5 | <configuration> | ||
6 | <configSections> | ||
7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
9 | </sectionGroup> | ||
10 | </configSections> | ||
11 | <startup> | ||
12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2" /> | ||
13 | </startup> | ||
14 | <wix.bootstrapper> | ||
15 | <host assemblyName="Example.FullFramework4MBA" /> | ||
16 | </wix.bootstrapper> | ||
17 | </configuration> | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs index b29363dd..74f82d99 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs index 15dd290a..ab40a543 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDx86LatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{E547C546-5E0E-4BF9-A675-BBEF4C77FF0D}"> | 2 | <Bundle Name="FDDx86LatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="{E547C546-5E0E-4BF9-A675-BBEF4C77FF0D}"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.deps.json" Name="Example.LatestCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.dll" Name="Example.LatestCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\Example.LatestCoreMBA.runtimeconfig.json" Name="Example.LatestCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.LatestCoreMBA\fdd-x86\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs index 56edc986..0022b690 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="SCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> | 5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.scd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt index acc7474c..f606296e 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt +++ b/src/ext/Bal/test/examples/LatestCoreBundleSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs index 7ac9c34a..322a27a3 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs | |||
@@ -1,7 +1,7 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="TrimmedSCDLatestCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="Example.LatestCoreMBA.exe"> |
4 | <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> | 4 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost SelfContainedDeployment="yes" /> --> |
5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> | 5 | <PayloadGroupRef Id="publish.Example.LatestCoreMBA.trimmedscd" /> |
6 | </BootstrapperApplication> | 6 | </BootstrapperApplication> |
7 | <Chain> | 7 | <Chain> |
diff --git a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt index acc7474c..f606296e 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt +++ b/src/ext/Bal/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt | |||
@@ -11,10 +11,5 @@ | |||
11 | </xsl:copy> | 11 | </xsl:copy> |
12 | </xsl:template> | 12 | </xsl:template> |
13 | 13 | ||
14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.dll']" > | 14 | <xsl:template match="wix:Payload[@SourceFile='SourceDir\Example.LatestCoreMBA.exe']" /> |
15 | <xsl:copy> | ||
16 | <xsl:attribute name="BAFactoryAssembly" namespace="http://wixtoolset.org/schemas/v4/wxs/bal">yes</xsl:attribute> | ||
17 | <xsl:apply-templates select="@* | node()"/> | ||
18 | </xsl:copy> | ||
19 | </xsl:template> | ||
20 | </xsl:stylesheet> | 15 | </xsl:stylesheet> |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj index 236e715c..c4d31151 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj | |||
@@ -3,7 +3,12 @@ | |||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <TargetFramework>net6.0</TargetFramework> | 4 | <TargetFramework>net6.0</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | 6 | <OutputType>WinExe</OutputType> |
7 | <DebugType>embedded</DebugType> | ||
7 | <Description>Latest .NET Core MBA</Description> | 8 | <Description>Latest .NET Core MBA</Description> |
8 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
9 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs index 50386a87..bd5378eb 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs +++ b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs | |||
@@ -6,13 +6,9 @@ namespace Example.LatestCoreMBA | |||
6 | 6 | ||
7 | public class LatestCoreBA : BootstrapperApplication | 7 | public class LatestCoreBA : BootstrapperApplication |
8 | { | 8 | { |
9 | public LatestCoreBA(IEngine engine) | ||
10 | : base(engine) | ||
11 | { | ||
12 | } | ||
13 | |||
14 | protected override void Run() | 9 | protected override void Run() |
15 | { | 10 | { |
11 | this.engine.Quit(0); | ||
16 | } | 12 | } |
17 | 13 | ||
18 | protected override void OnStartup(StartupEventArgs args) | 14 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs deleted file mode 100644 index fff3b5c5..00000000 --- a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +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 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.LatestCoreMBA.LatestCoreBAFactory))] | ||
4 | namespace Example.LatestCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class LatestCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new LatestCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs new file mode 100644 index 00000000..94da360b --- /dev/null +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs | |||
@@ -0,0 +1,18 @@ | |||
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 Example.LatestCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | |||
7 | internal class Program | ||
8 | { | ||
9 | private static int Main() | ||
10 | { | ||
11 | var application = new LatestCoreBA(); | ||
12 | |||
13 | ManagedBootstrapperApplication.Run(application); | ||
14 | |||
15 | return 0; | ||
16 | } | ||
17 | } | ||
18 | } | ||
diff --git a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp index 5c6ed398..197e3116 100644 --- a/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp +++ b/src/ext/Bal/test/examples/TestEngine/TestEngine.cpp | |||
@@ -26,16 +26,12 @@ HRESULT TestEngine::LoadBA( | |||
26 | { | 26 | { |
27 | HRESULT hr = S_OK; | 27 | HRESULT hr = S_OK; |
28 | BOOTSTRAPPER_COMMAND command = { }; | 28 | BOOTSTRAPPER_COMMAND command = { }; |
29 | BOOTSTRAPPER_CREATE_ARGS args = { }; | ||
30 | PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL; | ||
31 | 29 | ||
32 | if (m_pCreateResults || m_hBAModule) | 30 | if (m_hBAModule) |
33 | { | 31 | { |
34 | ExitFunction1(hr = E_INVALIDSTATE); | 32 | ExitFunction1(hr = E_INVALIDSTATE); |
35 | } | 33 | } |
36 | 34 | ||
37 | m_pCreateResults = static_cast<BOOTSTRAPPER_CREATE_RESULTS*>(MemAlloc(sizeof(BOOTSTRAPPER_CREATE_RESULTS), TRUE)); | ||
38 | |||
39 | command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); | 35 | command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); |
40 | 36 | ||
41 | hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); | 37 | hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); |
@@ -44,14 +40,7 @@ HRESULT TestEngine::LoadBA( | |||
44 | hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); | 40 | hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); |
45 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); | 41 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); |
46 | 42 | ||
47 | args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS); | 43 | #ifdef TODO_DELETE |
48 | args.pCommand = &command; | ||
49 | args.pfnBootstrapperEngineProc = TestEngine::EngineProc; | ||
50 | args.pvBootstrapperEngineProcContext = this; | ||
51 | args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1); | ||
52 | |||
53 | m_pCreateResults->cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); | ||
54 | |||
55 | m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); | 44 | m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); |
56 | ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); | 45 | ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); |
57 | 46 | ||
@@ -60,6 +49,7 @@ HRESULT TestEngine::LoadBA( | |||
60 | 49 | ||
61 | hr = pfnCreate(&args, m_pCreateResults); | 50 | hr = pfnCreate(&args, m_pCreateResults); |
62 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); | 51 | ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); |
52 | #endif | ||
63 | 53 | ||
64 | LExit: | 54 | LExit: |
65 | ReleaseStr(command.wzBootstrapperApplicationDataPath); | 55 | ReleaseStr(command.wzBootstrapperApplicationDataPath); |
@@ -117,7 +107,7 @@ HRESULT TestEngine::SendShutdownEvent( | |||
117 | shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); | 107 | shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); |
118 | shutdownResults.action = defaultAction; | 108 | shutdownResults.action = defaultAction; |
119 | shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); | 109 | shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); |
120 | hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); | 110 | // hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); |
121 | return hr; | 111 | return hr; |
122 | } | 112 | } |
123 | 113 | ||
@@ -128,7 +118,7 @@ HRESULT TestEngine::SendStartupEvent() | |||
128 | BA_ONSTARTUP_RESULTS startupResults = { }; | 118 | BA_ONSTARTUP_RESULTS startupResults = { }; |
129 | startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); | 119 | startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); |
130 | startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); | 120 | startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); |
131 | hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); | 121 | // hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); |
132 | return hr; | 122 | return hr; |
133 | } | 123 | } |
134 | 124 | ||
@@ -151,6 +141,7 @@ void TestEngine::UnloadBA( | |||
151 | __in BOOL fReload | 141 | __in BOOL fReload |
152 | ) | 142 | ) |
153 | { | 143 | { |
144 | #ifdef TODO_DELETE | ||
154 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; | 145 | PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; |
155 | BOOTSTRAPPER_DESTROY_ARGS args = { }; | 146 | BOOTSTRAPPER_DESTROY_ARGS args = { }; |
156 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; | 147 | BOOTSTRAPPER_DESTROY_RESULTS results = { }; |
@@ -178,6 +169,7 @@ void TestEngine::UnloadBA( | |||
178 | 169 | ||
179 | m_hBAModule = NULL; | 170 | m_hBAModule = NULL; |
180 | } | 171 | } |
172 | #endif | ||
181 | } | 173 | } |
182 | 174 | ||
183 | HRESULT TestEngine::BAEngineLog( | 175 | HRESULT TestEngine::BAEngineLog( |
@@ -254,11 +246,9 @@ HRESULT TestEngine::ProcessBAMessage( | |||
254 | TestEngine::TestEngine() | 246 | TestEngine::TestEngine() |
255 | { | 247 | { |
256 | m_hBAModule = NULL; | 248 | m_hBAModule = NULL; |
257 | m_pCreateResults = NULL; | ||
258 | m_dwThreadId = ::GetCurrentThreadId(); | 249 | m_dwThreadId = ::GetCurrentThreadId(); |
259 | } | 250 | } |
260 | 251 | ||
261 | TestEngine::~TestEngine() | 252 | TestEngine::~TestEngine() |
262 | { | 253 | { |
263 | ReleaseMem(m_pCreateResults); | ||
264 | } | 254 | } |
diff --git a/src/ext/Bal/test/examples/TestEngine/TestEngine.h b/src/ext/Bal/test/examples/TestEngine/TestEngine.h index 248e979a..6c4867b0 100644 --- a/src/ext/Bal/test/examples/TestEngine/TestEngine.h +++ b/src/ext/Bal/test/examples/TestEngine/TestEngine.h | |||
@@ -77,6 +77,5 @@ public: | |||
77 | 77 | ||
78 | private: | 78 | private: |
79 | HMODULE m_hBAModule; | 79 | HMODULE m_hBAModule; |
80 | BOOTSTRAPPER_CREATE_RESULTS* m_pCreateResults; | ||
81 | DWORD m_dwThreadId; | 80 | DWORD m_dwThreadId; |
82 | }; | 81 | }; |
diff --git a/src/ext/Bal/test/examples/TestEngine/precomp.h b/src/ext/Bal/test/examples/TestEngine/precomp.h index f943f420..e9ba3f98 100644 --- a/src/ext/Bal/test/examples/TestEngine/precomp.h +++ b/src/ext/Bal/test/examples/TestEngine/precomp.h | |||
@@ -11,8 +11,8 @@ | |||
11 | #include "pathutil.h" | 11 | #include "pathutil.h" |
12 | #include "strutil.h" | 12 | #include "strutil.h" |
13 | 13 | ||
14 | #include "BootstrapperEngine.h" | 14 | #include <baenginetypes.h> |
15 | #include "BootstrapperApplication.h" | 15 | #include <batypes.h> |
16 | 16 | ||
17 | #include "TestEngine.h" | 17 | #include "TestEngine.h" |
18 | #include "ReloadEngine.h" | 18 | #include "ReloadEngine.h" |
diff --git a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs index 5f054ca4..e95fbba0 100644 --- a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs | |||
@@ -1,12 +1,12 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> |
2 | <Bundle Name="FDDWPFCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> | 2 | <Bundle Name="FDDWPFCoreMBA" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="5CE5B5C7-4B6B-4B95-B297-731F1F956533"> |
3 | <BootstrapperApplication> | 3 | <BootstrapperApplication SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.exe"> |
4 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.deps.json" Name="Example.WPFCoreMBA.deps.json" /> | 4 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.deps.json" Name="Example.WPFCoreMBA.deps.json" /> |
5 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.dll" Name="Example.WPFCoreMBA.dll" bal:BAFactoryAssembly="yes" /> | 5 | <!-- <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.dll" Name="Example.WPFCoreMBA.dll" bal:BAFactoryAssembly="yes" /> --> |
6 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.runtimeconfig.json" Name="Example.WPFCoreMBA.runtimeconfig.json" /> | 6 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\Example.WPFCoreMBA.runtimeconfig.json" Name="Example.WPFCoreMBA.runtimeconfig.json" /> |
7 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> | 7 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\mbanative.dll" Name="mbanative.dll" /> |
8 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> | 8 | <Payload SourceFile="publish\Example.WPFCoreMBA\fdd\WixToolset.Mba.Core.dll" Name="WixToolset.Mba.Core.dll" /> |
9 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 9 | <!-- <bal:WixDotNetCoreBootstrapperApplicationHost /> --> |
10 | </BootstrapperApplication> | 10 | </BootstrapperApplication> |
11 | <Chain> | 11 | <Chain> |
12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> | 12 | <ExePackage DetectCondition="none" UninstallArguments="-foo" SourceFile="..\.data\notanexe.exe" bal:PrereqPackage="yes" /> |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj index 338da446..279b498f 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj | |||
@@ -1,10 +1,14 @@ | |||
1 | <Project Sdk="Microsoft.NET.Sdk"> | 1 | <Project Sdk="Microsoft.NET.Sdk"> |
2 | 2 | ||
3 | <PropertyGroup> | 3 | <PropertyGroup> |
4 | <OutputType>WinExe</OutputType> | ||
4 | <TargetFramework>net6.0-windows</TargetFramework> | 5 | <TargetFramework>net6.0-windows</TargetFramework> |
5 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> | 6 | <RuntimeIdentifiers>win-x86;win-x64</RuntimeIdentifiers> |
6 | <IsDncBA>true</IsDncBA> | ||
7 | <Description>WPF .NET Core MBA</Description> | 7 | <Description>WPF .NET Core MBA</Description> |
8 | <UseWPF>true</UseWPF> | 8 | <UseWPF>true</UseWPF> |
9 | </PropertyGroup> | 9 | </PropertyGroup> |
10 | |||
11 | <ItemGroup> | ||
12 | <PackageReference Include="WixToolset.Mba.Core" /> | ||
13 | </ItemGroup> | ||
10 | </Project> | 14 | </Project> |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs new file mode 100644 index 00000000..185e92cc --- /dev/null +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs | |||
@@ -0,0 +1,19 @@ | |||
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 Example.WPFCoreMBA | ||
4 | { | ||
5 | using WixToolset.Mba.Core; | ||
6 | // using WixToolset.BootstrapperApplications.Managed; | ||
7 | |||
8 | public class Program | ||
9 | { | ||
10 | public static int Main(string[] args) | ||
11 | { | ||
12 | var app = new WPFCoreBA(); | ||
13 | |||
14 | ManagedBootstrapperApplication.Run(app); | ||
15 | |||
16 | return 0; | ||
17 | } | ||
18 | } | ||
19 | } | ||
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs index d50be813..7bc06094 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs +++ b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs | |||
@@ -7,11 +7,6 @@ namespace Example.WPFCoreMBA | |||
7 | 7 | ||
8 | public class WPFCoreBA : BootstrapperApplication | 8 | public class WPFCoreBA : BootstrapperApplication |
9 | { | 9 | { |
10 | public WPFCoreBA(IEngine engine) | ||
11 | : base(engine) | ||
12 | { | ||
13 | } | ||
14 | |||
15 | public Dispatcher BADispatcher { get; private set; } | 10 | public Dispatcher BADispatcher { get; private set; } |
16 | 11 | ||
17 | protected override void Run() | 12 | protected override void Run() |
@@ -21,7 +16,7 @@ namespace Example.WPFCoreMBA | |||
21 | window.Closed += (s, e) => this.BADispatcher.InvokeShutdown(); | 16 | window.Closed += (s, e) => this.BADispatcher.InvokeShutdown(); |
22 | //window.Show(); | 17 | //window.Show(); |
23 | //Dispatcher.Run(); | 18 | //Dispatcher.Run(); |
24 | //this.engine.Quit(0); | 19 | this.engine.Quit(0); |
25 | } | 20 | } |
26 | 21 | ||
27 | protected override void OnStartup(StartupEventArgs args) | 22 | protected override void OnStartup(StartupEventArgs args) |
diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs deleted file mode 100644 index a3ccdf9f..00000000 --- a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs +++ /dev/null | |||
@@ -1,22 +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 | [assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.WPFCoreMBA.WPFCoreBAFactory))] | ||
4 | namespace Example.WPFCoreMBA | ||
5 | { | ||
6 | using WixToolset.Mba.Core; | ||
7 | |||
8 | public class WPFCoreBAFactory : BaseBootstrapperApplicationFactory | ||
9 | { | ||
10 | private static int loadCount = 0; | ||
11 | |||
12 | protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) | ||
13 | { | ||
14 | if (loadCount > 0) | ||
15 | { | ||
16 | engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); | ||
17 | } | ||
18 | ++loadCount; | ||
19 | return new WPFCoreBA(engine); | ||
20 | } | ||
21 | } | ||
22 | } | ||
diff --git a/src/ext/Bal/test/examples/examples.proj b/src/ext/Bal/test/examples/examples.proj index 60388a93..c1544766 100644 --- a/src/ext/Bal/test/examples/examples.proj +++ b/src/ext/Bal/test/examples/examples.proj | |||
@@ -6,8 +6,6 @@ | |||
6 | 6 | ||
7 | <PropertyGroup> | 7 | <PropertyGroup> |
8 | <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath> | 8 | <EarliestCoreMBAProjectPath>EarliestCoreMBA\Example.EarliestCoreMBA.csproj</EarliestCoreMBAProjectPath> |
9 | <FullFramework2MBAProjectPath>FullFramework2MBA\Example.FullFramework2MBA.csproj</FullFramework2MBAProjectPath> | ||
10 | <FullFramework4MBAProjectPath>FullFramework4MBA\Example.FullFramework4MBA.csproj</FullFramework4MBAProjectPath> | ||
11 | <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath> | 9 | <LatestCoreMBAProjectPath>LatestCoreMBA\Example.LatestCoreMBA.csproj</LatestCoreMBAProjectPath> |
12 | <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath> | 10 | <WPFCoreMBAProjectPath>WPFCoreMBA\Example.WPFCoreMBA.csproj</WPFCoreMBAProjectPath> |
13 | <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath> | 11 | <MBAPublishPath>$(OutputPath)examples\publish\</MBAPublishPath> |
@@ -27,9 +25,6 @@ | |||
27 | <SkipFDDx86>true</SkipFDDx86> | 25 | <SkipFDDx86>true</SkipFDDx86> |
28 | <SkipSCD>true</SkipSCD> | 26 | <SkipSCD>true</SkipSCD> |
29 | </CoreMBAProject> | 27 | </CoreMBAProject> |
30 | |||
31 | <FullMBAProject Include="$(FullFramework2MBAProjectPath)" /> | ||
32 | <FullMBAProject Include="$(FullFramework4MBAProjectPath)" /> | ||
33 | </ItemGroup> | 28 | </ItemGroup> |
34 | 29 | ||
35 | <Target Name="PublishCoreExamples" BeforeTargets="Build"> | 30 | <Target Name="PublishCoreExamples" BeforeTargets="Build"> |
@@ -41,7 +36,7 @@ | |||
41 | Condition="'%(CoreMBAProject.SkipSCD)'==''" /> | 36 | Condition="'%(CoreMBAProject.SkipSCD)'==''" /> |
42 | <!-- | 37 | <!-- |
43 | Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535) | 38 | Publishing a library is "undefined" (per https://github.com/dotnet/runtime/issues/91535) |
44 | and is now a build error. This will go away when BAs go out of proc, so not spending a | 39 | and is now a build error. This will go away when BAs go out of proc, so not spending a |
45 | lot of time to keep building trimmed in VS 17.8. | 40 | lot of time to keep building trimmed in VS 17.8. |
46 | --> | 41 | --> |
47 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"' | 42 | <Exec Command='dotnet publish -o "%(CoreMBAProject.PublishPath)\trimmedscd" -r win-x64 -c $(Configuration) --self-contained true -p:PublishTrimmed=false -p:TrimMode=%(CoreMBAProject.TrimMode) "%(CoreMBAProject.Identity)"' |