From ba7bab476501c16e437b0aee71c1be02c3dda176 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 3 May 2021 15:55:48 -0700 Subject: Move Bal.wixext into ext --- src/test/examples/Directory.Build.props | 6 - src/test/examples/Directory.Build.targets | 6 - .../EarliestCoreBundleFDD.wixproj | 2 - .../FrameworkDependentBundle.wxs | 16 -- .../EarliestCoreBundleSCD.wixproj | 10 - .../EarliestCoreBundleSCD/SelfContainedBundle.wxs | 11 - src/test/examples/EarliestCoreBundleSCD/ba.xslt | 20 -- .../EarliestCoreBundleTrimmedSCD.wixproj | 10 - .../TrimmedSelfContainedBundle.wxs | 11 - .../examples/EarliestCoreBundleTrimmedSCD/ba.xslt | 20 -- .../examples/EarliestCoreMBA/EarliestCoreBA.cs | 34 --- .../EarliestCoreMBA/EarliestCoreBAFactory.cs | 22 -- .../EarliestCoreMBA/Example.EarliestCoreMBA.csproj | 18 -- src/test/examples/FullFramework2Bundle/Bundle.wxs | 14 -- .../FullFramework2Bundle.wixproj | 2 - .../Example.FullFramework2MBA.csproj | 20 -- .../examples/FullFramework2MBA/FullFramework2BA.cs | 34 --- .../FullFramework2MBA/FullFramework2BAFactory.cs | 22 -- .../FullFramework2MBA/WixToolset.Mba.Host.config | 20 -- src/test/examples/FullFramework4Bundle/Bundle.wxs | 14 -- .../FullFramework4Bundle.wixproj | 2 - .../Example.FullFramework4MBA.csproj | 19 -- .../examples/FullFramework4MBA/FullFramework4BA.cs | 34 --- .../FullFramework4MBA/FullFramework4BAFactory.cs | 22 -- .../FullFramework4MBA/WixToolset.Mba.Host.config | 17 -- .../FrameworkDependentBundle.wxs | 16 -- .../LatestCoreBundleFDD.wixproj | 2 - .../LatestCoreBundleSCD.wixproj | 10 - .../LatestCoreBundleSCD/SelfContainedBundle.wxs | 11 - src/test/examples/LatestCoreBundleSCD/ba.xslt | 20 -- .../LatestCoreBundleTrimmedSCD.wixproj | 10 - .../TrimmedSelfContainedBundle.wxs | 11 - .../examples/LatestCoreBundleTrimmedSCD/ba.xslt | 20 -- .../LatestCoreMBA/Example.LatestCoreMBA.csproj | 21 -- src/test/examples/LatestCoreMBA/LatestCoreBA.cs | 33 --- .../examples/LatestCoreMBA/LatestCoreBAFactory.cs | 22 -- .../examples/TestEngine/Example.TestEngine.vcxproj | 83 ------- src/test/examples/TestEngine/ExampleTestEngine.cpp | 53 ----- src/test/examples/TestEngine/ReloadEngine.cpp | 55 ----- src/test/examples/TestEngine/ReloadEngine.h | 8 - src/test/examples/TestEngine/ShutdownEngine.cpp | 38 --- src/test/examples/TestEngine/ShutdownEngine.h | 8 - src/test/examples/TestEngine/TestEngine.cpp | 256 --------------------- src/test/examples/TestEngine/TestEngine.h | 80 ------- src/test/examples/TestEngine/WaitForQuitEngine.cpp | 35 --- src/test/examples/TestEngine/WaitForQuitEngine.h | 8 - src/test/examples/TestEngine/packages.config | 7 - src/test/examples/TestEngine/precomp.cpp | 3 - src/test/examples/TestEngine/precomp.h | 20 -- .../WPFCoreBundleFDD/FrameworkDependentBundle.wxs | 16 -- .../WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj | 2 - src/test/examples/WPFCoreMBA/AssemblyInfo.cs | 12 - .../examples/WPFCoreMBA/Example.WPFCoreMBA.csproj | 16 -- src/test/examples/WPFCoreMBA/MainWindow.xaml | 16 -- src/test/examples/WPFCoreMBA/MainWindow.xaml.cs | 17 -- src/test/examples/WPFCoreMBA/WPFCoreBA.cs | 42 ---- src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs | 22 -- src/test/examples/Wix.Build.props | 10 - src/test/examples/Wix.Build.targets | 8 - src/test/examples/examples.proj | 50 ---- 60 files changed, 1447 deletions(-) delete mode 100644 src/test/examples/Directory.Build.props delete mode 100644 src/test/examples/Directory.Build.targets delete mode 100644 src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj delete mode 100644 src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs delete mode 100644 src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj delete mode 100644 src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs delete mode 100644 src/test/examples/EarliestCoreBundleSCD/ba.xslt delete mode 100644 src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj delete mode 100644 src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs delete mode 100644 src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt delete mode 100644 src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs delete mode 100644 src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs delete mode 100644 src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj delete mode 100644 src/test/examples/FullFramework2Bundle/Bundle.wxs delete mode 100644 src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj delete mode 100644 src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj delete mode 100644 src/test/examples/FullFramework2MBA/FullFramework2BA.cs delete mode 100644 src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs delete mode 100644 src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config delete mode 100644 src/test/examples/FullFramework4Bundle/Bundle.wxs delete mode 100644 src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj delete mode 100644 src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj delete mode 100644 src/test/examples/FullFramework4MBA/FullFramework4BA.cs delete mode 100644 src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs delete mode 100644 src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config delete mode 100644 src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs delete mode 100644 src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj delete mode 100644 src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj delete mode 100644 src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs delete mode 100644 src/test/examples/LatestCoreBundleSCD/ba.xslt delete mode 100644 src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj delete mode 100644 src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs delete mode 100644 src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt delete mode 100644 src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj delete mode 100644 src/test/examples/LatestCoreMBA/LatestCoreBA.cs delete mode 100644 src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs delete mode 100644 src/test/examples/TestEngine/Example.TestEngine.vcxproj delete mode 100644 src/test/examples/TestEngine/ExampleTestEngine.cpp delete mode 100644 src/test/examples/TestEngine/ReloadEngine.cpp delete mode 100644 src/test/examples/TestEngine/ReloadEngine.h delete mode 100644 src/test/examples/TestEngine/ShutdownEngine.cpp delete mode 100644 src/test/examples/TestEngine/ShutdownEngine.h delete mode 100644 src/test/examples/TestEngine/TestEngine.cpp delete mode 100644 src/test/examples/TestEngine/TestEngine.h delete mode 100644 src/test/examples/TestEngine/WaitForQuitEngine.cpp delete mode 100644 src/test/examples/TestEngine/WaitForQuitEngine.h delete mode 100644 src/test/examples/TestEngine/packages.config delete mode 100644 src/test/examples/TestEngine/precomp.cpp delete mode 100644 src/test/examples/TestEngine/precomp.h delete mode 100644 src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs delete mode 100644 src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj delete mode 100644 src/test/examples/WPFCoreMBA/AssemblyInfo.cs delete mode 100644 src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj delete mode 100644 src/test/examples/WPFCoreMBA/MainWindow.xaml delete mode 100644 src/test/examples/WPFCoreMBA/MainWindow.xaml.cs delete mode 100644 src/test/examples/WPFCoreMBA/WPFCoreBA.cs delete mode 100644 src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs delete mode 100644 src/test/examples/Wix.Build.props delete mode 100644 src/test/examples/Wix.Build.targets delete mode 100644 src/test/examples/examples.proj (limited to 'src/test/examples') diff --git a/src/test/examples/Directory.Build.props b/src/test/examples/Directory.Build.props deleted file mode 100644 index 3d5870a5..00000000 --- a/src/test/examples/Directory.Build.props +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/examples/Directory.Build.targets b/src/test/examples/Directory.Build.targets deleted file mode 100644 index 6dcf402b..00000000 --- a/src/test/examples/Directory.Build.targets +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj b/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj deleted file mode 100644 index ba75a9ff..00000000 --- a/src/test/examples/EarliestCoreBundleFDD/EarliestCoreBundleFDD.wixproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs deleted file mode 100644 index d146845c..00000000 --- a/src/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj b/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj deleted file mode 100644 index ebeebff2..00000000 --- a/src/test/examples/EarliestCoreBundleSCD/EarliestCoreBundleSCD.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - publish.Example.EarliestCoreMBA.scd - ba.xslt - - - diff --git a/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs b/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs deleted file mode 100644 index 4d872317..00000000 --- a/src/test/examples/EarliestCoreBundleSCD/SelfContainedBundle.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/examples/EarliestCoreBundleSCD/ba.xslt b/src/test/examples/EarliestCoreBundleSCD/ba.xslt deleted file mode 100644 index 06b84256..00000000 --- a/src/test/examples/EarliestCoreBundleSCD/ba.xslt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - yes - - - - diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj b/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj deleted file mode 100644 index a6b56460..00000000 --- a/src/test/examples/EarliestCoreBundleTrimmedSCD/EarliestCoreBundleTrimmedSCD.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - publish.Example.EarliestCoreMBA.trimmedscd - ba.xslt - - - diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs deleted file mode 100644 index ba7dce25..00000000 --- a/src/test/examples/EarliestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt b/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt deleted file mode 100644 index 06b84256..00000000 --- a/src/test/examples/EarliestCoreBundleTrimmedSCD/ba.xslt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - yes - - - - diff --git a/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs deleted file mode 100644 index c9291a7f..00000000 --- a/src/test/examples/EarliestCoreMBA/EarliestCoreBA.cs +++ /dev/null @@ -1,34 +0,0 @@ -// 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 Example.EarliestCoreMBA -{ - using WixToolset.Mba.Core; - - public class EarliestCoreBA : BootstrapperApplication - { - public EarliestCoreBA(IEngine engine) - : base(engine) - { - - } - - protected override void Run() - { - } - - protected override void OnStartup(StartupEventArgs args) - { - base.OnStartup(args); - - this.engine.Log(LogLevel.Standard, nameof(EarliestCoreBA)); - } - - protected override void OnShutdown(ShutdownEventArgs args) - { - base.OnShutdown(args); - - var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); - this.engine.Log(LogLevel.Standard, message); - } - } -} diff --git a/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs b/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs deleted file mode 100644 index 672e17ee..00000000 --- a/src/test/examples/EarliestCoreMBA/EarliestCoreBAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.EarliestCoreMBA.EarliestCoreBAFactory))] -namespace Example.EarliestCoreMBA -{ - using WixToolset.Mba.Core; - - public class EarliestCoreBAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new EarliestCoreBA(engine); - } - } -} diff --git a/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj deleted file mode 100644 index cb66c138..00000000 --- a/src/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj +++ /dev/null @@ -1,18 +0,0 @@ - - - - netcoreapp3.1 - win-x86;win-x64 - true - Earliest .NET Core MBA - - - - - - - - - - - \ No newline at end of file diff --git a/src/test/examples/FullFramework2Bundle/Bundle.wxs b/src/test/examples/FullFramework2Bundle/Bundle.wxs deleted file mode 100644 index f0af975c..00000000 --- a/src/test/examples/FullFramework2Bundle/Bundle.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj b/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj deleted file mode 100644 index ba75a9ff..00000000 --- a/src/test/examples/FullFramework2Bundle/FullFramework2Bundle.wixproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj deleted file mode 100644 index 21079ed1..00000000 --- a/src/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - net20 - Example.FullFramework2MBA - Example.FullFramework2MBA - embedded - win-x86 - - - - - - - - - - \ No newline at end of file diff --git a/src/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/test/examples/FullFramework2MBA/FullFramework2BA.cs deleted file mode 100644 index 32cd19c8..00000000 --- a/src/test/examples/FullFramework2MBA/FullFramework2BA.cs +++ /dev/null @@ -1,34 +0,0 @@ -// 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 Example.FullFramework2MBA -{ - using WixToolset.Mba.Core; - - public class FullFramework2BA : BootstrapperApplication - { - public FullFramework2BA(IEngine engine) - : base(engine) - { - - } - - protected override void Run() - { - } - - protected override void OnStartup(StartupEventArgs args) - { - base.OnStartup(args); - - this.engine.Log(LogLevel.Standard, nameof(FullFramework2BA)); - } - - protected override void OnShutdown(ShutdownEventArgs args) - { - base.OnShutdown(args); - - var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); - this.engine.Log(LogLevel.Standard, message); - } - } -} diff --git a/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs b/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs deleted file mode 100644 index 647c2040..00000000 --- a/src/test/examples/FullFramework2MBA/FullFramework2BAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework2MBA.FullFramework2BAFactory))] -namespace Example.FullFramework2MBA -{ - using WixToolset.Mba.Core; - - public class FullFramework2BAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new FullFramework2BA(engine); - } - } -} diff --git a/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config b/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config deleted file mode 100644 index be450a4f..00000000 --- a/src/test/examples/FullFramework2MBA/WixToolset.Mba.Host.config +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - -
- - - - - - - - - - - - diff --git a/src/test/examples/FullFramework4Bundle/Bundle.wxs b/src/test/examples/FullFramework4Bundle/Bundle.wxs deleted file mode 100644 index 7b7cbf57..00000000 --- a/src/test/examples/FullFramework4Bundle/Bundle.wxs +++ /dev/null @@ -1,14 +0,0 @@ - - - - - - - - - - - - - - diff --git a/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj b/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj deleted file mode 100644 index ba75a9ff..00000000 --- a/src/test/examples/FullFramework4Bundle/FullFramework4Bundle.wixproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj deleted file mode 100644 index a05e7888..00000000 --- a/src/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - net48 - Full Framework v4 MBA - win-x86 - - - - - - - - - - - \ No newline at end of file diff --git a/src/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/test/examples/FullFramework4MBA/FullFramework4BA.cs deleted file mode 100644 index 8ee3bd19..00000000 --- a/src/test/examples/FullFramework4MBA/FullFramework4BA.cs +++ /dev/null @@ -1,34 +0,0 @@ -// 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 Example.FullFramework4MBA -{ - using WixToolset.Mba.Core; - - public class FullFramework4BA : BootstrapperApplication - { - public FullFramework4BA(IEngine engine) - : base(engine) - { - - } - - protected override void Run() - { - } - - protected override void OnStartup(StartupEventArgs args) - { - base.OnStartup(args); - - this.engine.Log(LogLevel.Standard, nameof(FullFramework4BA)); - } - - protected override void OnShutdown(ShutdownEventArgs args) - { - base.OnShutdown(args); - - var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); - this.engine.Log(LogLevel.Standard, message); - } - } -} diff --git a/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs b/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs deleted file mode 100644 index 6a571a54..00000000 --- a/src/test/examples/FullFramework4MBA/FullFramework4BAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.FullFramework4MBA.FullFramework4BAFactory))] -namespace Example.FullFramework4MBA -{ - using WixToolset.Mba.Core; - - public class FullFramework4BAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new FullFramework4BA(engine); - } - } -} diff --git a/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config b/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config deleted file mode 100644 index 96678cda..00000000 --- a/src/test/examples/FullFramework4MBA/WixToolset.Mba.Host.config +++ /dev/null @@ -1,17 +0,0 @@ - - - - - - - -
- - - - - - - - - diff --git a/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs deleted file mode 100644 index d5b543e8..00000000 --- a/src/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj b/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj deleted file mode 100644 index ba75a9ff..00000000 --- a/src/test/examples/LatestCoreBundleFDD/LatestCoreBundleFDD.wixproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj b/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj deleted file mode 100644 index 30a860ab..00000000 --- a/src/test/examples/LatestCoreBundleSCD/LatestCoreBundleSCD.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - publish.Example.LatestCoreMBA.scd - ba.xslt - - - diff --git a/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs b/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs deleted file mode 100644 index bedf0326..00000000 --- a/src/test/examples/LatestCoreBundleSCD/SelfContainedBundle.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/examples/LatestCoreBundleSCD/ba.xslt b/src/test/examples/LatestCoreBundleSCD/ba.xslt deleted file mode 100644 index acc7474c..00000000 --- a/src/test/examples/LatestCoreBundleSCD/ba.xslt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - yes - - - - diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj b/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj deleted file mode 100644 index 5ce89b64..00000000 --- a/src/test/examples/LatestCoreBundleTrimmedSCD/LatestCoreBundleTrimmedSCD.wixproj +++ /dev/null @@ -1,10 +0,0 @@ - - - - - - publish.Example.LatestCoreMBA.trimmedscd - ba.xslt - - - diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs b/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs deleted file mode 100644 index 6059f8c1..00000000 --- a/src/test/examples/LatestCoreBundleTrimmedSCD/TrimmedSelfContainedBundle.wxs +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - - - diff --git a/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt b/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt deleted file mode 100644 index acc7474c..00000000 --- a/src/test/examples/LatestCoreBundleTrimmedSCD/ba.xslt +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - yes - - - - diff --git a/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj b/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj deleted file mode 100644 index 9f3f02d9..00000000 --- a/src/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj +++ /dev/null @@ -1,21 +0,0 @@ - - - - net5.0 - win-x86;win-x64 - true - Latest .NET Core MBA - - - - - - - - - - - - - - \ No newline at end of file diff --git a/src/test/examples/LatestCoreMBA/LatestCoreBA.cs b/src/test/examples/LatestCoreMBA/LatestCoreBA.cs deleted file mode 100644 index 50386a87..00000000 --- a/src/test/examples/LatestCoreMBA/LatestCoreBA.cs +++ /dev/null @@ -1,33 +0,0 @@ -// 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 Example.LatestCoreMBA -{ - using WixToolset.Mba.Core; - - public class LatestCoreBA : BootstrapperApplication - { - public LatestCoreBA(IEngine engine) - : base(engine) - { - } - - protected override void Run() - { - } - - protected override void OnStartup(StartupEventArgs args) - { - base.OnStartup(args); - - this.engine.Log(LogLevel.Standard, nameof(LatestCoreBA)); - } - - protected override void OnShutdown(ShutdownEventArgs args) - { - base.OnShutdown(args); - - var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); - this.engine.Log(LogLevel.Standard, message); - } - } -} diff --git a/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs b/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs deleted file mode 100644 index fff3b5c5..00000000 --- a/src/test/examples/LatestCoreMBA/LatestCoreBAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.LatestCoreMBA.LatestCoreBAFactory))] -namespace Example.LatestCoreMBA -{ - using WixToolset.Mba.Core; - - public class LatestCoreBAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new LatestCoreBA(engine); - } - } -} diff --git a/src/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/test/examples/TestEngine/Example.TestEngine.vcxproj deleted file mode 100644 index 99eb917e..00000000 --- a/src/test/examples/TestEngine/Example.TestEngine.vcxproj +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - Debug - ARM64 - - - Release - ARM64 - - - Debug - Win32 - - - Release - Win32 - - - Debug - x64 - - - Release - x64 - - - - {3D44B67D-A475-49BA-8310-E39F6C117CC9} - Application - Console - Example.TestEngine - v142 - Unicode - 10.0 - - - - - - - - - - - - - - - Create - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - - - - \ No newline at end of file diff --git a/src/test/examples/TestEngine/ExampleTestEngine.cpp b/src/test/examples/TestEngine/ExampleTestEngine.cpp deleted file mode 100644 index fc1938fe..00000000 --- a/src/test/examples/TestEngine/ExampleTestEngine.cpp +++ /dev/null @@ -1,53 +0,0 @@ -// 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. - -#include "precomp.h" - -int __cdecl wmain(int argc, LPWSTR argv[]) -{ - HRESULT hr = S_OK; - BOOL fComInitialized = FALSE; - BOOL fShowUsage = FALSE; - - // initialize COM - hr = ::CoInitializeEx(NULL, COINIT_MULTITHREADED); - ExitOnFailure(hr, "Failed to initialize COM."); - fComInitialized = TRUE; - - ConsoleInitialize(); - - if (argc != 4) - { - fShowUsage = TRUE; - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"reload", -1)) - { - hr = RunReloadEngine(argv[2], argv[3]); - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"shutdown", -1)) - { - hr = RunShutdownEngine(argv[2], argv[3]); - } - else if (CSTR_EQUAL == ::CompareString(LOCALE_INVARIANT, NORM_IGNORECASE, argv[1], -1, L"waitforquit", -1)) - { - hr = RunWaitForQuitEngine(argv[2], argv[3]); - } - else - { - fShowUsage = TRUE; - } - - if (fShowUsage) - { - ConsoleWriteError(hr = E_INVALIDARG, CONSOLE_COLOR_RED, "Usage: Example.TestEngine.exe {reload|shutdown|waitforquit} Bundle.exe BA.dll"); - } - - ConsoleUninitialize(); - -LExit: - if (fComInitialized) - { - ::CoUninitialize(); - } - - return hr; -} diff --git a/src/test/examples/TestEngine/ReloadEngine.cpp b/src/test/examples/TestEngine/ReloadEngine.cpp deleted file mode 100644 index 46fd9afa..00000000 --- a/src/test/examples/TestEngine/ReloadEngine.cpp +++ /dev/null @@ -1,55 +0,0 @@ -// 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. - -#include "precomp.h" - -HRESULT RunReloadEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/ReloadEngine.h b/src/test/examples/TestEngine/ReloadEngine.h deleted file mode 100644 index 0e8456af..00000000 --- a/src/test/examples/TestEngine/ReloadEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// 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. - - -HRESULT RunReloadEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/ShutdownEngine.cpp b/src/test/examples/TestEngine/ShutdownEngine.cpp deleted file mode 100644 index 3b876e4e..00000000 --- a/src/test/examples/TestEngine/ShutdownEngine.cpp +++ /dev/null @@ -1,38 +0,0 @@ -// 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. - -#include "precomp.h" - -HRESULT RunShutdownEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->SimulateQuit(0); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to simulate quit."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/ShutdownEngine.h b/src/test/examples/TestEngine/ShutdownEngine.h deleted file mode 100644 index 0cfa147a..00000000 --- a/src/test/examples/TestEngine/ShutdownEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// 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. - - -HRESULT RunShutdownEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/TestEngine.cpp b/src/test/examples/TestEngine/TestEngine.cpp deleted file mode 100644 index 4c7ec1c3..00000000 --- a/src/test/examples/TestEngine/TestEngine.cpp +++ /dev/null @@ -1,256 +0,0 @@ -// 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. - -#include "precomp.h" - -HRESULT TestEngine::Initialize( - __in LPCWSTR wzBundleFilePath - ) -{ - HRESULT hr = S_OK; - MSG msg = { }; - - LogInitialize(::GetModuleHandleW(NULL)); - - hr = LogOpen(NULL, PathFile(wzBundleFilePath), NULL, L"txt", FALSE, FALSE, NULL); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to open log."); - - ::PeekMessageW(&msg, NULL, WM_USER, WM_USER, PM_NOREMOVE); - -LExit: - return hr; -} - -HRESULT TestEngine::LoadBA( - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - BOOTSTRAPPER_COMMAND command = { }; - BOOTSTRAPPER_CREATE_ARGS args = { }; - PFN_BOOTSTRAPPER_APPLICATION_CREATE pfnCreate = NULL; - - if (m_pCreateResults || m_hBAModule) - { - ExitFunction1(hr = E_INVALIDSTATE); - } - - m_pCreateResults = static_cast(MemAlloc(sizeof(BOOTSTRAPPER_CREATE_RESULTS), TRUE)); - - command.cbSize = sizeof(BOOTSTRAPPER_COMMAND); - - hr = PathGetDirectory(wzBAFilePath, &command.wzBootstrapperWorkingFolder); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperWorkingFolder"); - - hr = PathConcat(command.wzBootstrapperWorkingFolder, L"BootstrapperApplicationData.xml", &command.wzBootstrapperApplicationDataPath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to allocate wzBootstrapperApplicationDataPath"); - - args.cbSize = sizeof(BOOTSTRAPPER_CREATE_ARGS); - args.pCommand = &command; - args.pfnBootstrapperEngineProc = TestEngine::EngineProc; - args.pvBootstrapperEngineProcContext = this; - args.qwEngineAPIVersion = MAKEQWORDVERSION(0, 0, 0, 1); - - m_pCreateResults->cbSize = sizeof(BOOTSTRAPPER_CREATE_RESULTS); - - m_hBAModule = ::LoadLibraryExW(wzBAFilePath, NULL, LOAD_WITH_ALTERED_SEARCH_PATH); - ConsoleExitOnNullWithLastError(m_hBAModule, hr, CONSOLE_COLOR_RED, "Failed to load BA dll."); - - pfnCreate = (PFN_BOOTSTRAPPER_APPLICATION_CREATE)::GetProcAddress(m_hBAModule, "BootstrapperApplicationCreate"); - ConsoleExitOnNull(pfnCreate, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to get address for BootstrapperApplicationCreate."); - - hr = pfnCreate(&args, m_pCreateResults); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure on BootstrapperApplicationCreate."); - -LExit: - ReleaseStr(command.wzBootstrapperApplicationDataPath); - ReleaseStr(command.wzBootstrapperWorkingFolder); - - return hr; -} - -HRESULT TestEngine::Log( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in LPCWSTR wzMessage - ) -{ - switch (level) - { - case BOOTSTRAPPER_LOG_LEVEL_NONE: - case BOOTSTRAPPER_LOG_LEVEL_DEBUG: - return S_OK; - default: - LogStringLine(REPORT_STANDARD, "%ls", wzMessage); - return ConsoleWriteLine(CONSOLE_COLOR_NORMAL, "%ls", wzMessage); - } -} - -HRESULT TestEngine::RunApplication() -{ - HRESULT hr = S_OK; - MSG msg = { }; - BOOL fRet = FALSE; - - // Enter the message pump. - while (0 != (fRet = ::GetMessageW(&msg, NULL, 0, 0))) - { - if (-1 == fRet) - { - ConsoleExitOnFailure(hr = E_UNEXPECTED, CONSOLE_COLOR_RED, "Unexpected return value from message pump."); - } - else - { - ProcessBAMessage(&msg); - } - } - -LExit: - return hr; -} - -HRESULT TestEngine::SendShutdownEvent( - __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction - ) -{ - HRESULT hr = S_OK; - BA_ONSHUTDOWN_ARGS shutdownArgs = { }; - BA_ONSHUTDOWN_RESULTS shutdownResults = { }; - shutdownArgs.cbSize = sizeof(BA_ONSHUTDOWN_ARGS); - shutdownResults.action = defaultAction; - shutdownResults.cbSize = sizeof(BA_ONSHUTDOWN_RESULTS); - hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, &shutdownArgs, &shutdownResults, m_pCreateResults->pvBootstrapperApplicationProcContext); - return hr; -} - -HRESULT TestEngine::SendStartupEvent() -{ - HRESULT hr = S_OK; - BA_ONSTARTUP_ARGS startupArgs = { }; - BA_ONSTARTUP_RESULTS startupResults = { }; - startupArgs.cbSize = sizeof(BA_ONSTARTUP_ARGS); - startupResults.cbSize = sizeof(BA_ONSTARTUP_RESULTS); - hr = m_pCreateResults->pfnBootstrapperApplicationProc(BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, &startupArgs, &startupResults, m_pCreateResults->pvBootstrapperApplicationProcContext); - return hr; -} - -HRESULT TestEngine::SimulateQuit( - __in DWORD dwExitCode - ) -{ - BAENGINE_QUIT_ARGS args = { }; - BAENGINE_QUIT_RESULTS results = { }; - - args.cbSize = sizeof(BAENGINE_QUIT_ARGS); - args.dwExitCode = dwExitCode; - - results.cbSize = sizeof(BAENGINE_QUIT_RESULTS); - - return BAEngineQuit(&args, &results); -} - -void TestEngine::UnloadBA() -{ - PFN_BOOTSTRAPPER_APPLICATION_DESTROY pfnDestroy = NULL; - BOOL fDisableUnloading = m_pCreateResults && m_pCreateResults->fDisableUnloading; - - ReleaseNullMem(m_pCreateResults); - - pfnDestroy = (PFN_BOOTSTRAPPER_APPLICATION_DESTROY)::GetProcAddress(m_hBAModule, "BootstrapperApplicationDestroy"); - - if (pfnDestroy) - { - pfnDestroy(); - } - - if (m_hBAModule) - { - if (!fDisableUnloading) - { - ::FreeLibrary(m_hBAModule); - } - - m_hBAModule = NULL; - } -} - -HRESULT TestEngine::BAEngineLog( - __in BAENGINE_LOG_ARGS* pArgs, - __in BAENGINE_LOG_RESULTS* /*pResults*/ - ) -{ - return Log(pArgs->level, pArgs->wzMessage); -} - -HRESULT TestEngine::BAEngineQuit( - __in BAENGINE_QUIT_ARGS* pArgs, - __in BAENGINE_QUIT_RESULTS* /*pResults*/ - ) -{ - HRESULT hr = S_OK; - - if (!::PostThreadMessageW(m_dwThreadId, WM_TESTENG_QUIT, static_cast(pArgs->dwExitCode), 0)) - { - ConsoleExitWithLastError(hr, CONSOLE_COLOR_RED, "Failed to post shutdown message."); - } - -LExit: - return hr; -} - -HRESULT WINAPI TestEngine::EngineProc( - __in BOOTSTRAPPER_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ) -{ - HRESULT hr = S_OK; - TestEngine* pContext = (TestEngine*)pvContext; - - if (!pContext || !pvArgs || !pvResults) - { - ExitFunction1(hr = E_INVALIDARG); - } - - switch (message) - { - case BOOTSTRAPPER_ENGINE_MESSAGE_LOG: - hr = pContext->BAEngineLog(reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - break; - case BOOTSTRAPPER_ENGINE_MESSAGE_QUIT: - hr = pContext->BAEngineQuit(reinterpret_cast(pvArgs), reinterpret_cast(pvResults)); - default: - hr = E_NOTIMPL; - break; - } - -LExit: - return hr; -} - -HRESULT TestEngine::ProcessBAMessage( - __in const MSG* pmsg - ) -{ - HRESULT hr = S_OK; - - switch (pmsg->message) - { - case WM_TESTENG_QUIT: - ::PostQuitMessage(static_cast(pmsg->wParam)); // go bye-bye. - break; - } - - return hr; -} - -TestEngine::TestEngine() -{ - m_hBAModule = NULL; - m_pCreateResults = NULL; - m_dwThreadId = ::GetCurrentThreadId(); -} - -TestEngine::~TestEngine() -{ - ReleaseMem(m_pCreateResults); -} diff --git a/src/test/examples/TestEngine/TestEngine.h b/src/test/examples/TestEngine/TestEngine.h deleted file mode 100644 index 44e813bd..00000000 --- a/src/test/examples/TestEngine/TestEngine.h +++ /dev/null @@ -1,80 +0,0 @@ -#pragma once -// 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. - - -enum WM_TESTENG -{ - WM_TESTENG_FIRST = WM_APP + 0xFFF, // this enum value must always be first. - - WM_TESTENG_DETECT, - WM_TESTENG_PLAN, - WM_TESTENG_ELEVATE, - WM_TESTENG_APPLY, - WM_TESTENG_LAUNCH_APPROVED_EXE, - WM_TESTENG_QUIT, - - WM_TESTENG_LAST, // this enum value must always be last. -}; - -class TestEngine -{ -public: - HRESULT Initialize( - __in LPCWSTR wzBundleFilePath - ); - - HRESULT LoadBA( - __in LPCWSTR wzBAFilePath - ); - - HRESULT Log( - __in BOOTSTRAPPER_LOG_LEVEL level, - __in LPCWSTR wzMessage - ); - - HRESULT RunApplication(); - - HRESULT SendShutdownEvent( - __in BOOTSTRAPPER_SHUTDOWN_ACTION defaultAction - ); - - HRESULT SendStartupEvent(); - - HRESULT SimulateQuit( - __in DWORD dwExitCode - ); - - void UnloadBA(); - -private: - HRESULT BAEngineLog( - __in BAENGINE_LOG_ARGS* pArgs, - __in BAENGINE_LOG_RESULTS* pResults - ); - - HRESULT BAEngineQuit( - __in BAENGINE_QUIT_ARGS* pArgs, - __in BAENGINE_QUIT_RESULTS* pResults - ); - - static HRESULT WINAPI EngineProc( - __in BOOTSTRAPPER_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - - HRESULT ProcessBAMessage( - __in const MSG* pmsg - ); - -public: - TestEngine(); - - ~TestEngine(); - -private: - HMODULE m_hBAModule; - BOOTSTRAPPER_CREATE_RESULTS* m_pCreateResults; - DWORD m_dwThreadId; -}; \ No newline at end of file diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.cpp b/src/test/examples/TestEngine/WaitForQuitEngine.cpp deleted file mode 100644 index 2f80ba75..00000000 --- a/src/test/examples/TestEngine/WaitForQuitEngine.cpp +++ /dev/null @@ -1,35 +0,0 @@ -// 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. - -#include "precomp.h" - -HRESULT RunWaitForQuitEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ) -{ - HRESULT hr = S_OK; - TestEngine* pTestEngine = NULL; - - pTestEngine = new TestEngine(); - ConsoleExitOnNull(pTestEngine, hr, E_OUTOFMEMORY, CONSOLE_COLOR_RED, "Failed to create new test engine."); - - hr = pTestEngine->Initialize(wzBundleFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to initialize engine."); - - hr = pTestEngine->LoadBA(wzBAFilePath); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to load BA."); - - hr = pTestEngine->SendStartupEvent(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnStartup."); - - hr = pTestEngine->RunApplication(); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "Failed to run engine."); - - hr = pTestEngine->SendShutdownEvent(BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER); - ConsoleExitOnFailure(hr, CONSOLE_COLOR_RED, "BA returned failure for OnShutdown."); - - pTestEngine->UnloadBA(); - -LExit: - return hr; -} diff --git a/src/test/examples/TestEngine/WaitForQuitEngine.h b/src/test/examples/TestEngine/WaitForQuitEngine.h deleted file mode 100644 index 99e3f63c..00000000 --- a/src/test/examples/TestEngine/WaitForQuitEngine.h +++ /dev/null @@ -1,8 +0,0 @@ -#pragma once -// 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. - - -HRESULT RunWaitForQuitEngine( - __in LPCWSTR wzBundleFilePath, - __in LPCWSTR wzBAFilePath - ); diff --git a/src/test/examples/TestEngine/packages.config b/src/test/examples/TestEngine/packages.config deleted file mode 100644 index 548ddb48..00000000 --- a/src/test/examples/TestEngine/packages.config +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - \ No newline at end of file diff --git a/src/test/examples/TestEngine/precomp.cpp b/src/test/examples/TestEngine/precomp.cpp deleted file mode 100644 index 37664a1c..00000000 --- a/src/test/examples/TestEngine/precomp.cpp +++ /dev/null @@ -1,3 +0,0 @@ -// 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. - -#include "precomp.h" diff --git a/src/test/examples/TestEngine/precomp.h b/src/test/examples/TestEngine/precomp.h deleted file mode 100644 index f943f420..00000000 --- a/src/test/examples/TestEngine/precomp.h +++ /dev/null @@ -1,20 +0,0 @@ -#pragma once -// 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. - -#include -#include - -#include "dutil.h" -#include "conutil.h" -#include "logutil.h" -#include "memutil.h" -#include "pathutil.h" -#include "strutil.h" - -#include "BootstrapperEngine.h" -#include "BootstrapperApplication.h" - -#include "TestEngine.h" -#include "ReloadEngine.h" -#include "ShutdownEngine.h" -#include "WaitForQuitEngine.h" diff --git a/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs b/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs deleted file mode 100644 index 68d742b0..00000000 --- a/src/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - - diff --git a/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj b/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj deleted file mode 100644 index ba75a9ff..00000000 --- a/src/test/examples/WPFCoreBundleFDD/WPFCoreBundleFDD.wixproj +++ /dev/null @@ -1,2 +0,0 @@ - - diff --git a/src/test/examples/WPFCoreMBA/AssemblyInfo.cs b/src/test/examples/WPFCoreMBA/AssemblyInfo.cs deleted file mode 100644 index 03a5c7fa..00000000 --- a/src/test/examples/WPFCoreMBA/AssemblyInfo.cs +++ /dev/null @@ -1,12 +0,0 @@ -// 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. - -using System.Windows; - -[assembly:ThemeInfo( - ResourceDictionaryLocation.None, //where theme specific resource dictionaries are located - //(used if a resource is not found in the page, - // or application resource dictionaries) - ResourceDictionaryLocation.SourceAssembly //where the generic resource dictionary is located - //(used if a resource is not found in the page, - // app, or any theme specific resource dictionaries) -)] diff --git a/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj b/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj deleted file mode 100644 index 296e5be9..00000000 --- a/src/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj +++ /dev/null @@ -1,16 +0,0 @@ - - - - net5.0-windows - win-x86;win-x64 - true - WPF .NET Core MBA - true - - - - - - - - \ No newline at end of file diff --git a/src/test/examples/WPFCoreMBA/MainWindow.xaml b/src/test/examples/WPFCoreMBA/MainWindow.xaml deleted file mode 100644 index 40a27a06..00000000 --- a/src/test/examples/WPFCoreMBA/MainWindow.xaml +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - diff --git a/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs b/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs deleted file mode 100644 index 4f61b807..00000000 --- a/src/test/examples/WPFCoreMBA/MainWindow.xaml.cs +++ /dev/null @@ -1,17 +0,0 @@ -// 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 Example.WPFCoreMBA -{ - using System.Windows; - - /// - /// Interaction logic for MainWindow.xaml - /// - public partial class MainWindow : Window - { - public MainWindow() - { - this.InitializeComponent(); - } - } -} diff --git a/src/test/examples/WPFCoreMBA/WPFCoreBA.cs b/src/test/examples/WPFCoreMBA/WPFCoreBA.cs deleted file mode 100644 index d50be813..00000000 --- a/src/test/examples/WPFCoreMBA/WPFCoreBA.cs +++ /dev/null @@ -1,42 +0,0 @@ -// 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 Example.WPFCoreMBA -{ - using System.Windows.Threading; - using WixToolset.Mba.Core; - - public class WPFCoreBA : BootstrapperApplication - { - public WPFCoreBA(IEngine engine) - : base(engine) - { - } - - public Dispatcher BADispatcher { get; private set; } - - protected override void Run() - { - this.BADispatcher = Dispatcher.CurrentDispatcher; - var window = new MainWindow(); - window.Closed += (s, e) => this.BADispatcher.InvokeShutdown(); - //window.Show(); - //Dispatcher.Run(); - //this.engine.Quit(0); - } - - protected override void OnStartup(StartupEventArgs args) - { - base.OnStartup(args); - - this.engine.Log(LogLevel.Standard, nameof(WPFCoreBA)); - } - - protected override void OnShutdown(ShutdownEventArgs args) - { - base.OnShutdown(args); - - var message = "Shutdown," + args.Action.ToString() + "," + args.HResult.ToString(); - this.engine.Log(LogLevel.Standard, message); - } - } -} diff --git a/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs b/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs deleted file mode 100644 index a3ccdf9f..00000000 --- a/src/test/examples/WPFCoreMBA/WPFCoreBAFactory.cs +++ /dev/null @@ -1,22 +0,0 @@ -// 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. - -[assembly: WixToolset.Mba.Core.BootstrapperApplicationFactory(typeof(Example.WPFCoreMBA.WPFCoreBAFactory))] -namespace Example.WPFCoreMBA -{ - using WixToolset.Mba.Core; - - public class WPFCoreBAFactory : BaseBootstrapperApplicationFactory - { - private static int loadCount = 0; - - protected override IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand) - { - if (loadCount > 0) - { - engine.Log(LogLevel.Standard, $"Reloaded {loadCount} time(s)"); - } - ++loadCount; - return new WPFCoreBA(engine); - } - } -} diff --git a/src/test/examples/Wix.Build.props b/src/test/examples/Wix.Build.props deleted file mode 100644 index aad94bb6..00000000 --- a/src/test/examples/Wix.Build.props +++ /dev/null @@ -1,10 +0,0 @@ - - - - - Bundle - .exe - -generate payloadgroup - $(OutputPath)examples\ - - diff --git a/src/test/examples/Wix.Build.targets b/src/test/examples/Wix.Build.targets deleted file mode 100644 index 7e6fe9f2..00000000 --- a/src/test/examples/Wix.Build.targets +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/src/test/examples/examples.proj b/src/test/examples/examples.proj deleted file mode 100644 index 08cb7511..00000000 --- a/src/test/examples/examples.proj +++ /dev/null @@ -1,50 +0,0 @@ - - - - - - - - - EarliestCoreMBA\Example.EarliestCoreMBA.csproj - FullFramework2MBA\Example.FullFramework2MBA.csproj - FullFramework4MBA\Example.FullFramework4MBA.csproj - LatestCoreMBA\Example.LatestCoreMBA.csproj - WPFCoreMBA\Example.WPFCoreMBA.csproj - $(OutputPath)examples\publish\ - - - - - $(MBAPublishPath)Example.EarliestCoreMBA - - - $(MBAPublishPath)Example.LatestCoreMBA - - - $(MBAPublishPath)Example.WPFCoreMBA - true - true - - - - - - - - - - - - - - - - - - - - \ No newline at end of file -- cgit v1.2.3-55-g6feb