From 3d2d46f62fc01e2653d0251ad9703090574e7c41 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Wed, 6 Mar 2024 14:48:10 -0800 Subject: Better .nupkg names --- src/api/api.cmd | 10 +- src/api/api.sln | 4 +- .../BalUtil.cs | 53 + .../BaseBootstrapperApplicationFactory.cs | 53 + .../BootstrapperApplication.cs | 2164 +++++++++++++++ .../BootstrapperApplicationData.cs | 101 + .../BootstrapperApplicationFactoryAttribute.cs | 31 + .../BootstrapperCommand.cs | 239 ++ .../BundleInfo.cs | 99 + .../Engine.cs | 349 +++ .../EventArgs.cs | 2757 ++++++++++++++++++++ .../IBootstrapperApplication.cs | 2013 ++++++++++++++ .../IBootstrapperApplicationData.cs | 22 + .../IBootstrapperApplicationFactory.cs | 22 + .../IBootstrapperCommand.cs | 79 + .../IBootstrapperEngine.cs | 501 ++++ .../IBundleInfo.cs | 54 + .../IDefaultBootstrapperApplication.cs | 436 ++++ .../IEngine.cs | 230 ++ .../IMbaCommand.cs | 35 + .../IOverridableVariableInfo.cs | 15 + .../IOverridableVariables.cs | 37 + .../IPackageInfo.cs | 100 + .../ManagedBootstrapperApplication.cs | 19 + .../MbaCommand.cs | 38 + .../MbaNative.cs | 18 + .../NativeMethods.cs | 49 + .../OverridableVariableInfo.cs | 15 + .../OverridableVariables.cs | 87 + .../PackageInfo.cs | 391 +++ .../StrUtil.cs | 54 + .../VerUtil.cs | 146 ++ .../VerUtilVersion.cs | 129 + .../VerUtilVersionReleaseLabel.cs | 36 + .../WixToolset.BootstrapperApplicationApi.csproj | 27 + .../WixToolset.BootstrapperApplicationApi.nuspec | 46 + .../WixToolset.BootstrapperApplicationApi.props | 18 + .../build/_._ | 0 .../WixToolset.BootstrapperCore.Native.nuspec | 22 - .../WixToolset.BootstrapperCore.Native.proj | 18 - .../build/WixToolset.BootstrapperCore.Native.props | 13 - .../inc/BootstrapperApplication.h | 1606 ------------ .../inc/BootstrapperEngine.h | 460 ---- .../inc/BundleExtension.h | 60 - .../inc/BundleExtensionEngine.h | 200 -- src/api/burn/WixToolset.Mba.Core/BalUtil.cs | 53 - .../BaseBootstrapperApplicationFactory.cs | 53 - .../WixToolset.Mba.Core/BootstrapperApplication.cs | 2164 --------------- .../BootstrapperApplicationData.cs | 101 - .../BootstrapperApplicationFactoryAttribute.cs | 31 - .../WixToolset.Mba.Core/BootstrapperCommand.cs | 239 -- src/api/burn/WixToolset.Mba.Core/BundleInfo.cs | 99 - src/api/burn/WixToolset.Mba.Core/Engine.cs | 349 --- src/api/burn/WixToolset.Mba.Core/EventArgs.cs | 2757 -------------------- .../IBootstrapperApplication.cs | 2013 -------------- .../IBootstrapperApplicationData.cs | 22 - .../IBootstrapperApplicationFactory.cs | 22 - .../WixToolset.Mba.Core/IBootstrapperCommand.cs | 79 - .../WixToolset.Mba.Core/IBootstrapperEngine.cs | 501 ---- src/api/burn/WixToolset.Mba.Core/IBundleInfo.cs | 54 - .../IDefaultBootstrapperApplication.cs | 436 ---- src/api/burn/WixToolset.Mba.Core/IEngine.cs | 230 -- src/api/burn/WixToolset.Mba.Core/IMbaCommand.cs | 35 - .../IOverridableVariableInfo.cs | 15 - .../WixToolset.Mba.Core/IOverridableVariables.cs | 37 - src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs | 100 - .../ManagedBootstrapperApplication.cs | 19 - src/api/burn/WixToolset.Mba.Core/MbaCommand.cs | 38 - src/api/burn/WixToolset.Mba.Core/MbaNative.cs | 18 - src/api/burn/WixToolset.Mba.Core/NativeMethods.cs | 49 - .../WixToolset.Mba.Core/OverridableVariableInfo.cs | 15 - .../WixToolset.Mba.Core/OverridableVariables.cs | 87 - src/api/burn/WixToolset.Mba.Core/PackageInfo.cs | 391 --- src/api/burn/WixToolset.Mba.Core/StrUtil.cs | 54 - src/api/burn/WixToolset.Mba.Core/VerUtil.cs | 146 -- src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs | 129 - .../VerUtilVersionReleaseLabel.cs | 36 - .../WixToolset.Mba.Core/WixToolset.Mba.Core.csproj | 27 - .../WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec | 32 - src/api/burn/api_burn.sln | 4 +- src/api/burn/api_burn_t.proj | 10 +- src/api/burn/balutil/balutil.nuspec | 29 - src/api/burn/balutil/balutil.vcxproj | 3 +- .../burn/balutil/build/WixToolset.BalUtil.props | 18 - src/api/burn/bextutil/bextutil.nuspec | 3 +- src/api/burn/bextutil/bextutil.vcxproj | 2 +- .../burn/bextutil/inc/BextBaseBundleExtension.h | 5 - .../bextutil/inc/BextBaseBundleExtensionProc.h | 8 +- .../burn/bextutil/inc/BextBundleExtensionEngine.h | 3 + src/api/burn/bextutil/inc/IBundleExtension.h | 1 + src/api/burn/bextutil/inc/IBundleExtensionEngine.h | 1 + src/api/burn/bextutil/inc/bextutil.h | 2 + src/api/burn/bextutil/precomp.h | 6 - src/api/burn/inc/BootstrapperApplication.h | 1606 ++++++++++++ src/api/burn/inc/BootstrapperEngine.h | 460 ++++ src/api/burn/inc/BundleExtension.h | 61 + src/api/burn/inc/BundleExtensionEngine.h | 200 ++ src/api/burn/mbanative/mbanative.vcxproj | 2 +- .../test/BalUtilUnitTest/BalUtilUnitTest.vcxproj | 2 +- .../test/BextUtilUnitTest/BextUtilUnitTest.vcxproj | 2 +- src/api/burn/test/BextUtilUnitTest/precomp.h | 6 - .../VerUtilFixture.cs | 115 + ...ixToolsetTest.BootstrapperApplicationApi.csproj | 19 + ...st.BootstrapperApplicationApi.v3.ncrunchproject | 5 + .../test/WixToolsetTest.Mba.Core/VerUtilFixture.cs | 115 - .../WixToolsetTest.Mba.Core.csproj | 19 - .../WixToolsetTest.Mba.Core.v3.ncrunchproject | 5 - src/burn/engine/engine.vcxproj | 10 +- src/burn/engine/precomp.h | 2 - src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj | 2 +- .../PlanTest/BundlePackage_Multiple_manifest.xml | 2 +- .../ExePackage_PerUserArpEntry_manifest.xml | 2 +- .../TestData/PlanTest/Failure_BundleD_manifest.xml | 2 +- .../PlanTest/Slipstream_BundleA_manifest.xml | 2 +- .../Slipstream_BundleA_modified_manifest.xml | 2 +- src/burn/test/BurnUnitTest/precomp.h | 1 - src/clean.cmd | 5 +- src/ext/Bal/Bal.wixext.sln | 6 +- src/ext/Bal/README.md | 4 +- .../Bal/Samples/bafunctions/bafunctions.vcxproj | 2 +- src/ext/Bal/bal.cmd | 11 +- src/ext/Bal/stdbas/stdbas.vcxproj | 2 +- .../test/WixToolsetTest.Bal/BalExtensionFixture.cs | 262 -- .../test/WixToolsetTest.Bal/InternalUIBAFixture.cs | 519 ---- .../WixToolsetTest.Bal/TestData/.Data/fake.exe | 1 - .../WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs | 13 - .../TestData/MBA/AlwaysInstallPrereqsBundle.wxs | 12 - .../WixToolsetTest.Bal/TestData/MBA/Bundle.wxs | 12 - .../TestData/Overridable/Bundle.wxs | 13 - .../TestData/Overridable/WrongCaseBundle.wxl | 4 - .../TestData/Overridable/WrongCaseBundle.wxs | 16 - .../TestData/WixIuiBa/AllPrereqPackages.wxs | 13 - .../WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs | 13 - .../TestData/WixIuiBa/ImplicitPrimaryPackage.wxs | 13 - ...mplicitPrimaryPackageEnableFeatureSelection.wxs | 13 - .../TestData/WixIuiBa/IuibaWarnings.wxs | 13 - .../WixIuiBa/MultipleDefaultPrimaryPackages.wxs | 13 - .../MultipleNonPermanentNonPrimaryPackages.wxs | 13 - .../TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs | 13 - .../TestData/WixIuiBa/NonMsiPrimaryPackage.wxs | 13 - .../WixIuiBa/NonPermanentPrereqPackage.wxs | 13 - .../TestData/WixIuiBa/PermanentPrimaryPackage.wxs | 13 - .../PrimaryPackageEnableFeatureSelection.wxs | 13 - .../TestData/WixIuiBa/PrimaryPrereqPackage.wxs | 13 - .../TestData/WixIuiBa/SinglePrimaryPackage.wxs | 13 - .../TestData/WixIuiBa/UrlPrereqPackage.wxs | 19 - .../TestData/WixStdBa/Bundle.wxs | 12 - .../TestData/WixStdBa/Data/test.msi | Bin 32768 -> 0 bytes .../WixStdBa/DisplayInternalUIConditionBundle.wxs | 12 - .../WixToolsetTest.Bal/WixToolsetTest.Bal.csproj | 25 - .../WixToolsetTest.Bal.v3.ncrunchproject | 5 - .../BalExtensionFixture.cs | 262 ++ .../InternalUIBAFixture.cs | 519 ++++ .../TestData/.Data/fake.exe | 1 + .../TestData/Dncba/Bundle.wxs | 13 + .../TestData/MBA/AlwaysInstallPrereqsBundle.wxs | 12 + .../TestData/MBA/Bundle.wxs | 12 + .../TestData/Overridable/Bundle.wxs | 13 + .../TestData/Overridable/WrongCaseBundle.wxl | 4 + .../TestData/Overridable/WrongCaseBundle.wxs | 16 + .../TestData/WixIuiBa/AllPrereqPackages.wxs | 13 + .../WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs | 13 + .../TestData/WixIuiBa/ImplicitPrimaryPackage.wxs | 13 + ...mplicitPrimaryPackageEnableFeatureSelection.wxs | 13 + .../TestData/WixIuiBa/IuibaWarnings.wxs | 13 + .../WixIuiBa/MultipleDefaultPrimaryPackages.wxs | 13 + .../MultipleNonPermanentNonPrimaryPackages.wxs | 13 + .../TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs | 13 + .../TestData/WixIuiBa/NonMsiPrimaryPackage.wxs | 13 + .../WixIuiBa/NonPermanentPrereqPackage.wxs | 13 + .../TestData/WixIuiBa/PermanentPrimaryPackage.wxs | 13 + .../PrimaryPackageEnableFeatureSelection.wxs | 13 + .../TestData/WixIuiBa/PrimaryPrereqPackage.wxs | 13 + .../TestData/WixIuiBa/SinglePrimaryPackage.wxs | 13 + .../TestData/WixIuiBa/UrlPrereqPackage.wxs | 19 + .../TestData/WixStdBa/Bundle.wxs | 12 + .../TestData/WixStdBa/Data/test.msi | Bin 0 -> 32768 bytes .../WixStdBa/DisplayInternalUIConditionBundle.wxs | 12 + .../WixToolsetTest.BootstrapperApplications.csproj | 25 + ...Test.BootstrapperApplications.v3.ncrunchproject | 5 + .../Bal/test/examples/Directory.wixproj.targets | 2 +- .../FrameworkDependentBundle.wxs | 2 +- .../FrameworkDependentBundle.wxs | 2 +- .../examples/EarliestCoreMBA/EarliestCoreBA.cs | 2 +- .../EarliestCoreMBA/Example.EarliestCoreMBA.csproj | 2 +- .../Bal/test/examples/EarliestCoreMBA/Program.cs | 2 +- .../test/examples/FullFramework2Bundle/Bundle.wxs | 2 +- .../Example.FullFramework2MBA.csproj | 6 +- .../examples/FullFramework2MBA/FullFramework2BA.cs | 2 +- .../Bal/test/examples/FullFramework2MBA/Program.cs | 2 +- .../test/examples/FullFramework4Bundle/Bundle.wxs | 2 +- .../Example.FullFramework4MBA.csproj | 2 +- .../examples/FullFramework4MBA/FullFramework4BA.cs | 2 +- .../Bal/test/examples/FullFramework4MBA/Program.cs | 2 +- .../FrameworkDependentBundle.wxs | 2 +- .../FrameworkDependentBundle.wxs | 2 +- .../LatestCoreMBA/Example.LatestCoreMBA.csproj | 2 +- .../test/examples/LatestCoreMBA/LatestCoreBA.cs | 2 +- src/ext/Bal/test/examples/LatestCoreMBA/Program.cs | 2 +- .../examples/TestEngine/Example.TestEngine.vcxproj | 2 +- .../WPFCoreBundleFDD/FrameworkDependentBundle.wxs | 2 +- .../examples/WPFCoreMBA/Example.WPFCoreMBA.csproj | 2 +- src/ext/Bal/test/examples/WPFCoreMBA/Program.cs | 2 +- src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs | 2 +- .../WixToolset.Bal.wixext.csproj | 16 + .../WixToolset.Bal.wixext.nuspec | 22 + .../WixToolset.Bal.wixext.targets | 11 + src/ext/Bal/wixext/BalBurnBackendExtension.cs | 4 +- src/ext/Bal/wixext/BalCompiler.cs | 4 +- src/ext/Bal/wixext/BalErrors.cs | 2 +- src/ext/Bal/wixext/BalExtensionData.cs | 4 +- src/ext/Bal/wixext/BalExtensionFactory.cs | 2 +- src/ext/Bal/wixext/BalWarnings.cs | 2 +- src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs | 2 +- .../Symbols/WixBalBAFactoryAssemblySymbol.cs | 6 +- .../Bal/wixext/Symbols/WixBalBAFunctionsSymbol.cs | 8 +- .../Symbols/WixBalBootstrapperApplicationSymbol.cs | 6 +- .../Bal/wixext/Symbols/WixBalConditionSymbol.cs | 8 +- .../Bal/wixext/Symbols/WixBalPackageInfoSymbol.cs | 6 +- .../wixext/Symbols/WixPrereqInformationSymbol.cs | 6 +- .../Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs | 6 +- .../wixext/Symbols/WixStdbaCommandLineSymbol.cs | 6 +- .../Bal/wixext/Symbols/WixStdbaOptionsSymbol.cs | 8 +- .../Symbols/WixStdbaOverridableVariableSymbol.cs | 8 +- src/ext/Bal/wixext/WixToolset.Bal.wixext.csproj | 22 - src/ext/Bal/wixext/WixToolset.Bal.wixext.targets | 11 - ...xToolset.BootstrapperApplications.wixext.csproj | 22 + ...Toolset.BootstrapperApplications.wixext.targets | 11 + src/ext/Bal/wixiuiba/wixiuiba.vcxproj | 2 +- src/ext/Bal/wixlib/bal.wixproj | 23 - src/ext/Bal/wixlib/bal_arm64.wxs | 6 - src/ext/Bal/wixlib/bal_platform.wxi | 34 - src/ext/Bal/wixlib/bal_x64.wxs | 7 - src/ext/Bal/wixlib/bal_x86.wxs | 7 - src/ext/Bal/wixlib/bas.wixproj | 23 + src/ext/Bal/wixlib/bas_arm64.wxs | 6 + src/ext/Bal/wixlib/bas_platform.wxi | 34 + src/ext/Bal/wixlib/bas_x64.wxs | 7 + src/ext/Bal/wixlib/bas_x86.wxs | 7 + src/ext/Bal/wixprqba/wixprqba.vcxproj | 2 +- src/ext/Bal/wixstdba/wixstdba.vcxproj | 2 +- src/ext/NetFx/be/precomp.h | 5 - .../WixToolsetTest.Netfx/NetfxExtensionFixture.cs | 16 +- src/ext/NetFx/wixlib/netfx.wixproj | 2 +- src/ext/Util/be/precomp.h | 5 - src/ext/WixExt.props | 3 +- .../SetBuildNumber/Directory.Packages.props.pp | 5 +- .../WixAdditionalTools/WixAdditionalTools.wixproj | 2 +- src/test/burn/TestBA/Program.cs | 2 +- src/test/burn/TestBA/TestBA.cs | 2 +- src/test/burn/TestBA/TestBA.csproj | 2 +- src/test/burn/TestBA/TestBA_x64.csproj | 2 +- .../BafRelatedBundleVariableTesting.vcxproj | 2 +- .../BAFunctionsTests/BundleAv1/BundleAv1.wixproj | 3 +- .../BAFunctionsTests/BundleAv2/BundleAv2.wixproj | 4 +- .../BundleA/BundleA.wixproj | 4 +- .../BundleA_arm64/BundleA_arm64.wixproj | 4 +- .../BundleA_x64/BundleA_x64.wixproj | 4 +- .../BundleApu_x64/BundleApu_x64.wixproj | 4 +- .../BundleB/BundleB.wixproj | 3 +- .../BundleB_x64/BundleB_x64.wixproj | 4 +- .../BundleC/BundleC.wixproj | 4 +- .../BundleC_x64/BundleC_x64.wixproj | 4 +- .../BundleD/BundleD.wixproj | 4 +- .../BundleD_x64/BundleD_x64.wixproj | 4 +- .../BundlePackageUninstallFailureBundle.wixproj | 4 +- .../MultipleBundlePackagesBundle.wixproj | 4 +- .../MultipleBundlePackagesWithRemoteBundle.wixproj | 2 +- .../UpgradeBundlePackageBundle.props | 2 +- .../V3BundlePackageBundle.wixproj | 4 +- .../TestData/CacheTests/BundleA/BundleA.wixproj | 4 +- .../TestData/CacheTests/BundleB/BundleB.wixproj | 4 +- .../TestData/CacheTests/BundleC/BundleC.wixproj | 4 +- .../ContainerTests/BundleA/BundleA.wixproj | 4 +- .../ContainerTests/BundleB/BundleB.wixproj | 4 +- .../DependencyTests/BundleAv1/BundleAv1.wixproj | 4 +- .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 4 +- .../DependencyTests/BundleAv2/BundleAv2.wixproj | 4 +- .../DependencyTests/BundleB/BundleB.wixproj | 4 +- .../DependencyTests/BundleC/BundleC.wixproj | 4 +- .../DependencyTests/BundleD/BundleD.wixproj | 4 +- .../DependencyTests/BundleE/BundleE.wixproj | 4 +- .../DependencyTests/BundleF/BundleF.wixproj | 4 +- .../BundleF_AddOnA/BundleF_AddOnA.wixproj | 4 +- .../BundleF_AddOnB/BundleF_AddOnB.wixproj | 4 +- .../BundleF_PatchAv1_0_1.wixproj | 4 +- .../BundleF_PatchAv1_0_2.wixproj | 4 +- .../DependencyTests/BundleFv2/BundleFv2.wixproj | 4 +- .../DependencyTests/BundleHv1/BundleHv1.wixproj | 4 +- .../DependencyTests/BundleHv2/BundleHv2.wixproj | 4 +- .../DependencyTests/BundleJ/BundleJ.wixproj | 4 +- .../BundleJ_Patch/BundleJ_Patch.wixproj | 4 +- .../DependencyTests/BundleKv1/BundleKv1.wixproj | 4 +- .../DependencyTests/BundleKv2/BundleKv2.wixproj | 4 +- .../DependencyTests/BundleL/BundleL.wixproj | 4 +- .../DependencyTests/BundleM/BundleM.wixproj | 4 +- .../DependencyTests/BundleNv1/BundleNv1.wixproj | 4 +- .../BundleNv1_0_1/BundleNv1_0_1.wixproj | 4 +- .../DependencyTests/BundleNv2/BundleNv2.wixproj | 4 +- .../ElevationTests/BundleA/BundleA.wixproj | 4 +- .../BrokenPerUserArpEntryExePackage.wixproj | 4 +- .../CustomExitCodeExePackage.wixproj | 4 +- .../PerMachineArpEntryExePackage.wixproj | 4 +- .../PerMachineArpEntryExePackageFailure.wixproj | 4 +- ...chineArpEntryExePackageUninstallFailure.wixproj | 4 +- ...neArpEntryWithUninstallStringExePackage.wixproj | 2 +- .../PerUserArpEntryExePackage.wixproj | 4 +- .../TestData/FailureTests/BundleA/BundleA.wixproj | 4 +- .../TestData/FailureTests/BundleB/BundleB.wixproj | 4 +- .../TestData/FailureTests/BundleC/BundleC.wixproj | 4 +- .../TestData/FailureTests/BundleD/BundleD.wixproj | 4 +- .../FeatureTests/BundleAv1/BundleAv1.wixproj | 4 +- .../BundleAv1_0_1/BundleAv1_0_1.wixproj | 4 +- .../FilesInUseTests/BundleA/BundleA.wixproj | 4 +- .../WixStdBaBundle/WixStdBaBundle.wixproj | 4 +- .../BundleAv1/BundleAv1.wixproj | 4 +- .../BundleAv2/BundleAv2.wixproj | 4 +- .../BundleCv1/BundleCv1.wixproj | 4 +- .../BundleCv2/BundleCv2.wixproj | 4 +- .../TestData/LayoutTests/BundleA/BundleA.wixproj | 4 +- .../TestData/LayoutTests/BundleB/BundleB.wixproj | 4 +- .../NonCompressedBundle.wixproj | 4 +- .../BafThmutilTesting/BafThmUtilTesting.vcxproj | 2 +- .../burn/TestData/Manual/BundleA/BundleA.wixproj | 4 +- .../burn/TestData/Manual/BundleB/BundleB.wixproj | 2 +- .../burn/TestData/Manual/BundleC/BundleC.wixproj | 4 +- .../BundleAv1/BundleAv1.wixproj | 4 +- .../BundleAv2/BundleAv2.wixproj | 4 +- .../BundleBv1/BundleBv1.wixproj | 4 +- .../BundleBv2/BundleBv2.wixproj | 4 +- .../TestData/PatchTests/BundleA/BundleA.wixproj | 4 +- .../PatchTests/BundlePatchA/BundlePatchA.wixproj | 4 +- .../PatchTests/BundlePatchA2/BundlePatchA2.wixproj | 4 +- .../TestData/PrereqBaTests/BundleA/BundleA.wixproj | 4 +- .../TestData/PrereqBaTests/BundleA/BundleA.wxs | 2 +- .../TestData/PrereqBaTests/BundleB/BundleB.wixproj | 4 +- .../TestData/PrereqBaTests/BundleB/BundleB.wxs | 2 +- .../TestData/PrereqBaTests/BundleC/BundleC.wixproj | 4 +- .../TestData/PrereqBaTests/BundleC/BundleC.wxs | 2 +- .../TestData/PrereqBaTests/BundleD/BundleD.wixproj | 4 +- .../TestData/PrereqBaTests/BundleD/BundleD.wxs | 2 +- .../TestData/PrereqBaTests/BundleE/BundleE.wixproj | 4 +- .../TestData/PrereqBaTests/BundleE/BundleE.wxs | 2 +- .../PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj | 2 +- .../RegistrationTests/BundleA/BundleA.wixproj | 4 +- .../RollbackBoundaryTests/BundleA/BundleA.wixproj | 4 +- .../SlipstreamTests/BundleA/BundleA.wixproj | 4 +- .../BundleAReverse/BundleAReverse.wixproj | 4 +- .../SlipstreamTests/BundleB/BundleB.wixproj | 4 +- .../SlipstreamTests/BundleC/BundleC.wixproj | 4 +- .../SlipstreamTests/BundleD/BundleD.wixproj | 4 +- .../BundleOnlyA/BundleOnlyA.wixproj | 4 +- .../BundleOnlyPatchA/BundleOnlyPatchA.wixproj | 4 +- .../burn/TestData/TestBA/TestBAWixlib/TestBA.wxs | 4 +- .../burn/TestData/TestBA/TestBAWixlib/WixBA.wxs | 2 +- .../TestBA/TestBAWixlib/testbawixlib.wixproj | 4 +- .../TestBA/TestBAWixlib_x64/TestBA_x64.wxs | 4 +- .../TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs | 2 +- .../TestBAWixlib_x64/testbawixlib_x64.wixproj | 6 +- .../UpdateBundleTests/BundleAv1/BundleAv1.wixproj | 4 +- .../UpdateBundleTests/BundleAv2/BundleAv2.wixproj | 4 +- .../UpdateBundleTests/BundleBv1/BundleBv1.wixproj | 4 +- .../UpdateBundleTests/BundleBv2/BundleBv2.wixproj | 4 +- .../BundleAv1/BundleAv1.wixproj | 4 +- .../BundleAv1x64/BundleAv1x64.wixproj | 6 +- .../BundleAv2/BundleAv2.wixproj | 4 +- .../BundleAv2wixstdba/BundleAv2wixstdba.wixproj | 4 +- .../BundleAv2x64/BundleAv2x64.wixproj | 6 +- .../BundleAv3/BundleAv3.wixproj | 4 +- .../BundleAv3wixstdba/BundleAv3wixstdba.wixproj | 4 +- .../TestData/VariableTests/BundleA/BundleA.wixproj | 4 +- .../TestData/VariableTests/BundleB/BundleB.wixproj | 4 +- .../ArchSpecificBundle/ArchSpecificBundle.wixproj | 4 +- .../EmbeddedUIBundle/EmbeddedUIBundle.wixproj | 4 +- .../InternalUIBundle/InternalUIBundle.wixproj | 4 +- .../BundleA/BundleA_BadUpdateFeed.wixproj | 4 +- .../WixStdBaTests/BundleA/BundleA_v11.wixproj | 4 +- .../WixStdBaTests/BundleA/BundleA_v12.wixproj | 4 +- .../WixStdBaTests/BundleA/BundleA_v13.wixproj | 4 +- .../WixStdBaTests/BundleA_v10/BundleA_v10.wixproj | 4 +- src/test/burn/WixTestTools/WixTestTools.csproj | 2 +- .../burn/WixToolset.WixBA/InstallationViewModel.cs | 2 +- src/test/burn/WixToolset.WixBA/Model.cs | 2 +- src/test/burn/WixToolset.WixBA/Program.cs | 2 +- .../burn/WixToolset.WixBA/ProgressViewModel.cs | 2 +- src/test/burn/WixToolset.WixBA/RootViewModel.cs | 2 +- src/test/burn/WixToolset.WixBA/UpdateViewModel.cs | 2 +- .../WixToolset.WixBA/WixBA.BootstrapperCore.config | 16 - src/test/burn/WixToolset.WixBA/WixBA.cs | 2 +- .../burn/WixToolset.WixBA/WixToolset.WixBA.csproj | 6 +- .../WixToolset.WixBA/WixToolset.WixBA_x64.csproj | 6 +- .../WixToolsetTest.BurnE2E/BundlePackageTests.cs | 2 +- src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/DependencyTests.cs | 4 +- .../burn/WixToolsetTest.BurnE2E/ExePackageTests.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/FailureTests.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/FeatureTests.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/LongPathTests.cs | 2 +- .../WixToolsetTest.BurnE2E/RegistrationTests.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs | 2 +- .../Utilities/TestBAController.cs | 2 +- .../burn/WixToolsetTest.BurnE2E/VariableTests.cs | 2 +- .../WixToolsetTest.BurnE2E.csproj | 2 +- 403 files changed, 14607 insertions(+), 14680 deletions(-) create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BaseBootstrapperApplicationFactory.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationData.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationFactoryAttribute.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/BundleInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationData.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationFactory.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IBundleInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IDefaultBootstrapperApplication.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IMbaCommand.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariableInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariables.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/IPackageInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/ManagedBootstrapperApplication.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/MbaCommand.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/MbaNative.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/NativeMethods.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariableInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariables.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/PackageInfo.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/StrUtil.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtil.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersion.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.csproj create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.nuspec create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/build/WixToolset.BootstrapperApplicationApi.props create mode 100644 src/api/burn/WixToolset.BootstrapperApplicationApi/build/_._ delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.nuspec delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/build/WixToolset.BootstrapperCore.Native.props delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtension.h delete mode 100644 src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h delete mode 100644 src/api/burn/WixToolset.Mba.Core/BalUtil.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationData.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationFactoryAttribute.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BootstrapperCommand.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/BundleInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/Engine.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/EventArgs.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationData.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBootstrapperCommand.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBootstrapperEngine.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IBundleInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IEngine.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IMbaCommand.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IOverridableVariableInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IOverridableVariables.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/ManagedBootstrapperApplication.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/MbaCommand.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/MbaNative.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/NativeMethods.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/OverridableVariableInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/PackageInfo.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/StrUtil.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/VerUtil.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs delete mode 100644 src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj delete mode 100644 src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec delete mode 100644 src/api/burn/balutil/balutil.nuspec delete mode 100644 src/api/burn/balutil/build/WixToolset.BalUtil.props create mode 100644 src/api/burn/inc/BootstrapperApplication.h create mode 100644 src/api/burn/inc/BootstrapperEngine.h create mode 100644 src/api/burn/inc/BundleExtension.h create mode 100644 src/api/burn/inc/BundleExtensionEngine.h create mode 100644 src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/VerUtilFixture.cs create mode 100644 src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.csproj create mode 100644 src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.v3.ncrunchproject delete mode 100644 src/api/burn/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs delete mode 100644 src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj delete mode 100644 src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/AlwaysInstallPrereqsBundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxl delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/AllPrereqPackages.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/IuibaWarnings.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PermanentPrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPrereqPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/SinglePrimaryPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/UrlPrereqPackage.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj delete mode 100644 src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/.Data/fake.exe create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Dncba/Bundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/AlwaysInstallPrereqsBundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/Bundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/Bundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxl create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/AllPrereqPackages.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PermanentPrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPrereqPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/SinglePrimaryPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/UrlPrereqPackage.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Bundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Data/test.msi create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj create mode 100644 src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.v3.ncrunchproject create mode 100644 src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.csproj create mode 100644 src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.nuspec create mode 100644 src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.targets delete mode 100644 src/ext/Bal/wixext/WixToolset.Bal.wixext.csproj delete mode 100644 src/ext/Bal/wixext/WixToolset.Bal.wixext.targets create mode 100644 src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.csproj create mode 100644 src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.targets delete mode 100644 src/ext/Bal/wixlib/bal.wixproj delete mode 100644 src/ext/Bal/wixlib/bal_arm64.wxs delete mode 100644 src/ext/Bal/wixlib/bal_platform.wxi delete mode 100644 src/ext/Bal/wixlib/bal_x64.wxs delete mode 100644 src/ext/Bal/wixlib/bal_x86.wxs create mode 100644 src/ext/Bal/wixlib/bas.wixproj create mode 100644 src/ext/Bal/wixlib/bas_arm64.wxs create mode 100644 src/ext/Bal/wixlib/bas_platform.wxi create mode 100644 src/ext/Bal/wixlib/bas_x64.wxs create mode 100644 src/ext/Bal/wixlib/bas_x86.wxs delete mode 100644 src/test/burn/WixToolset.WixBA/WixBA.BootstrapperCore.config diff --git a/src/api/api.cmd b/src/api/api.cmd index c0ba7f29..42453449 100644 --- a/src/api/api.cmd +++ b/src/api/api.cmd @@ -28,7 +28,7 @@ msbuild api_t.proj -p:Configuration=%_C% -tl -nologo -warnaserror -bl:%_L%\api_b :: Test dotnet test ^ %_B%\net6.0\WixToolsetTest.Data.dll ^ - %_B%\net6.0\win-x86\WixToolsetTest.Mba.Core.dll ^ + %_B%\net6.0\win-x86\WixToolsetTest.BootstrapperApplicationApi.dll ^ %_B%\x86\BalUtilUnitTest.dll ^ %_B%\x86\BextUtilUnitTest.dll ^ --nologo -l "trx;LogFileName=%_L%\TestResults\api.trx" || exit /b @@ -37,19 +37,15 @@ dotnet test ^ :clean @rd /s/q "..\..\build\api" 2> nul -@del "..\..\build\artifacts\WixToolset.BalUtil.*.nupkg" 2> nul @del "..\..\build\artifacts\WixToolset.BextUtil.*.nupkg" 2> nul -@del "..\..\build\artifacts\WixToolset.BootstrapperCore.Native.*.nupkg" 2> nul @del "..\..\build\artifacts\WixToolset.Data.*.nupkg" 2> nul @del "..\..\build\artifacts\WixToolset.Extensibility.*.nupkg" 2> nul -@del "..\..\build\artifacts\WixToolset.Mba.Core.*.nupkg" 2> nul +@del "..\..\build\artifacts\WixToolset.BootstrapperApplicationApi.*.nupkg" 2> nul @del "%_L%\TestResults\api.trx" 2> nul -@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.balutil" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bextutil" 2> nul -@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrappercore.native" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.data" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.extensibility" 2> nul -@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.mba.core" 2> nul +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplicationapi" 2> nul @exit /b :end diff --git a/src/api/api.sln b/src/api/api.sln index bdde8794..70df4141 100644 --- a/src/api/api.sln +++ b/src/api/api.sln @@ -23,9 +23,9 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BalUtilUnitTest", "burn\tes EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BextUtilUnitTest", "burn\test\BextUtilUnitTest\BextUtilUnitTest.vcxproj", "{B69E6422-49B0-4E28-92F9-B8A7410A6ED9}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Mba.Core", "burn\test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj", "{17DA3E92-40C5-4328-9BA5-1FE459A13719}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BootstrapperApplicationApi", "burn\test\WixToolsetTest.BootstrapperApplicationApi\WixToolsetTest.BootstrapperApplicationApi.csproj", "{17DA3E92-40C5-4328-9BA5-1FE459A13719}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Mba.Core", "burn\WixToolset.Mba.Core\WixToolset.Mba.Core.csproj", "{47029283-43EC-4F22-9417-A02B28594912}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BootstrapperApplicationApi", "burn\WixToolset.BootstrapperApplicationApi\WixToolset.BootstrapperApplicationApi.csproj", "{47029283-43EC-4F22-9417-A02B28594912}" EndProject Global GlobalSection(SolutionConfigurationPlatforms) = preSolution diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs new file mode 100644 index 00000000..25257554 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BalUtil.cs @@ -0,0 +1,53 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + internal static class BalUtil + { + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalEscapeStringFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalFormatStringFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzFormat, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetStringVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetVersionVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern int BalGetRelatedBundleVariableFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + ref StrUtil.StrHandle psczOut + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + [return: MarshalAs(UnmanagedType.Bool)] + internal static extern bool BalVariableExistsFromEngine( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable + ); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BaseBootstrapperApplicationFactory.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BaseBootstrapperApplicationFactory.cs new file mode 100644 index 00000000..88b136a6 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BaseBootstrapperApplicationFactory.cs @@ -0,0 +1,53 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + /// + /// This is no longer used. + /// + [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] + public abstract class BaseBootstrapperApplicationFactory : IBootstrapperApplicationFactory + { + /// + /// This is no longer used. + /// + /// This is no longer used. + /// This is no longer used. + public void Create(IntPtr pArgs, IntPtr pResults) + { + throw new NotImplementedException(); + } + + /// + /// This is no longer used. + /// + /// This is no longer used. + /// This is no longer used. + /// This is no longer used. + protected abstract IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand); + + /// + /// This is no longer used. + /// + /// This is no longer used. + /// This is no longer used. + /// This is no longer used. + public static void InitializeFromCreateArgs(IntPtr pArgs, out IEngine engine, out IBootstrapperCommand bootstrapperCommand) + { + throw new NotImplementedException(); + } + + /// + /// This is no longer used. + /// + /// This is no longer used. + /// This is no longer used. + public static void StoreBAInCreateResults(IntPtr pResults, IBootstrapperApplication ba) + { + throw new NotImplementedException(); + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs new file mode 100644 index 00000000..f9fca748 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplication.cs @@ -0,0 +1,2164 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + using System.Threading; + + /// + /// The default bootstrapper application. + /// + [ClassInterface(ClassInterfaceType.None)] + public abstract class BootstrapperApplication : MarshalByRefObject, IDefaultBootstrapperApplication + { + /// + /// Gets the for interaction with the engine. + /// + protected IEngine engine; + + /// + public event EventHandler Create; + + /// + public event EventHandler Destroy; + + /// + public event EventHandler Startup; + + /// + public event EventHandler Shutdown; + + /// + public event EventHandler DetectBegin; + + /// + public event EventHandler DetectForwardCompatibleBundle; + + /// + public event EventHandler DetectUpdateBegin; + + /// + public event EventHandler DetectUpdate; + + /// + public event EventHandler DetectUpdateComplete; + + /// + public event EventHandler DetectRelatedBundle; + + /// + public event EventHandler DetectPackageBegin; + + /// + public event EventHandler DetectCompatibleMsiPackage; + + /// + public event EventHandler DetectRelatedMsiPackage; + + /// + public event EventHandler DetectPatchTarget; + + /// + public event EventHandler DetectMsiFeature; + + /// + public event EventHandler DetectPackageComplete; + + /// + public event EventHandler DetectComplete; + + /// + public event EventHandler PlanBegin; + + /// + public event EventHandler PlanRelatedBundle; + + /// + public event EventHandler PlanRelatedBundleType; + + /// + public event EventHandler PlanRollbackBoundary; + + /// + public event EventHandler PlanPackageBegin; + + /// + public event EventHandler PlanCompatibleMsiPackageBegin; + + /// + public event EventHandler PlanCompatibleMsiPackageComplete; + + /// + public event EventHandler PlanPatchTarget; + + /// + public event EventHandler PlanMsiFeature; + + /// + public event EventHandler PlanMsiPackage; + + /// + public event EventHandler PlanPackageComplete; + + /// + public event EventHandler PlannedCompatiblePackage; + + /// + public event EventHandler PlannedPackage; + + /// + public event EventHandler PlanComplete; + + /// + public event EventHandler ApplyBegin; + + /// + public event EventHandler ElevateBegin; + + /// + public event EventHandler ElevateComplete; + + /// + public event EventHandler Progress; + + /// + public event EventHandler Error; + + /// + public event EventHandler RegisterBegin; + + /// + public event EventHandler RegisterComplete; + + /// + public event EventHandler UnregisterBegin; + + /// + public event EventHandler UnregisterComplete; + + /// + public event EventHandler CacheBegin; + + /// + public event EventHandler CachePackageBegin; + + /// + public event EventHandler CacheAcquireBegin; + + /// + public event EventHandler CacheAcquireProgress; + + /// + public event EventHandler CacheAcquireResolving; + + /// + public event EventHandler CacheAcquireComplete; + + /// + public event EventHandler CacheVerifyBegin; + + /// + public event EventHandler CacheVerifyProgress; + + /// + public event EventHandler CacheVerifyComplete; + + /// + public event EventHandler CachePackageComplete; + + /// + public event EventHandler CacheComplete; + + /// + public event EventHandler ExecuteBegin; + + /// + public event EventHandler ExecutePackageBegin; + + /// + public event EventHandler ExecutePatchTarget; + + /// + public event EventHandler ExecuteMsiMessage; + + /// + public event EventHandler ExecuteFilesInUse; + + /// + public event EventHandler ExecutePackageComplete; + + /// + public event EventHandler ExecuteComplete; + + /// + public event EventHandler ApplyComplete; + + /// + public event EventHandler ApplyDowngrade; + + /// + public event EventHandler ExecuteProgress; + + /// + public event EventHandler LaunchApprovedExeBegin; + + /// + public event EventHandler LaunchApprovedExeComplete; + + /// + public event EventHandler BeginMsiTransactionBegin; + + /// + public event EventHandler BeginMsiTransactionComplete; + + /// + public event EventHandler CommitMsiTransactionBegin; + + /// + public event EventHandler CommitMsiTransactionComplete; + + /// + public event EventHandler RollbackMsiTransactionBegin; + + /// + public event EventHandler RollbackMsiTransactionComplete; + + /// + public event EventHandler PauseAutomaticUpdatesBegin; + + /// + public event EventHandler PauseAutomaticUpdatesComplete; + + /// + public event EventHandler SystemRestorePointBegin; + + /// + public event EventHandler SystemRestorePointComplete; + + /// + public event EventHandler PlanForwardCompatibleBundle; + + /// + public event EventHandler CacheContainerOrPayloadVerifyBegin; + + /// + public event EventHandler CacheContainerOrPayloadVerifyProgress; + + /// + public event EventHandler CacheContainerOrPayloadVerifyComplete; + + /// + public event EventHandler CachePayloadExtractBegin; + + /// + public event EventHandler CachePayloadExtractProgress; + + /// + public event EventHandler CachePayloadExtractComplete; + + /// + public event EventHandler PlanRestoreRelatedBundle; + + /// + public event EventHandler ExecuteProcessCancel; + + /// + public event EventHandler DetectRelatedBundlePackage; + + /// + public event EventHandler CachePackageNonVitalValidationFailure; + + /// + /// The default constructor. + /// + /// + /// The engine object will be valid after handling the OnCreate() event. + /// + protected BootstrapperApplication() + { + } + + /// + /// This constructor is no longer used. + /// + [Obsolete("This constructor is no longer used. Use the default constructor. The engine object will be valid after handling the OnCreate() event.")] + protected BootstrapperApplication(IEngine engine) + { + throw new NotImplementedException("This constructor is no longer used. Use the default constructor. The engine object will be valid after handling the OnCreate() event."); + } + + /// + /// Entry point that is called when the bootstrapper application is ready to run. + /// + protected abstract void Run(); + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCreate(CreateEventArgs args) + { + this.engine = args.Engine; + + EventHandler handler = this.Create; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDestroy(DestroyEventArgs args) + { + EventHandler handler = this.Destroy; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnStartup(StartupEventArgs args) + { + EventHandler handler = this.Startup; + if (null != handler) + { + handler(this, args); + } + + Thread uiThread = new Thread(this.Run); + uiThread.Name = "UIThread"; + uiThread.SetApartmentState(ApartmentState.STA); + uiThread.Start(); + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnShutdown(ShutdownEventArgs args) + { + EventHandler handler = this.Shutdown; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectBegin(DetectBeginEventArgs args) + { + EventHandler handler = this.DetectBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectForwardCompatibleBundle(DetectForwardCompatibleBundleEventArgs args) + { + EventHandler handler = this.DetectForwardCompatibleBundle; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) + { + EventHandler handler = this.DetectUpdateBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectUpdate(DetectUpdateEventArgs args) + { + EventHandler handler = this.DetectUpdate; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs args) + { + EventHandler handler = this.DetectUpdateComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) + { + EventHandler handler = this.DetectRelatedBundle; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectPackageBegin(DetectPackageBeginEventArgs args) + { + EventHandler handler = this.DetectPackageBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectCompatibleMsiPackage(DetectCompatibleMsiPackageEventArgs args) + { + EventHandler handler = this.DetectCompatibleMsiPackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectRelatedMsiPackage(DetectRelatedMsiPackageEventArgs args) + { + EventHandler handler = this.DetectRelatedMsiPackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectPatchTarget(DetectPatchTargetEventArgs args) + { + EventHandler handler = this.DetectPatchTarget; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectMsiFeature(DetectMsiFeatureEventArgs args) + { + EventHandler handler = this.DetectMsiFeature; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args) + { + EventHandler handler = this.DetectPackageComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectComplete(DetectCompleteEventArgs args) + { + EventHandler handler = this.DetectComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanBegin(PlanBeginEventArgs args) + { + EventHandler handler = this.PlanBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanRelatedBundle(PlanRelatedBundleEventArgs args) + { + EventHandler handler = this.PlanRelatedBundle; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanRelatedBundleType(PlanRelatedBundleTypeEventArgs args) + { + EventHandler handler = this.PlanRelatedBundleType; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + protected virtual void OnPlanRollbackBoundary(PlanRollbackBoundaryEventArgs args) + { + EventHandler handler = this.PlanRollbackBoundary; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanPackageBegin(PlanPackageBeginEventArgs args) + { + EventHandler handler = this.PlanPackageBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanCompatibleMsiPackageBegin(PlanCompatibleMsiPackageBeginEventArgs args) + { + EventHandler handler = this.PlanCompatibleMsiPackageBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanCompatibleMsiPackageComplete(PlanCompatibleMsiPackageCompleteEventArgs args) + { + EventHandler handler = this.PlanCompatibleMsiPackageComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanPatchTarget(PlanPatchTargetEventArgs args) + { + EventHandler handler = this.PlanPatchTarget; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) + { + EventHandler handler = this.PlanMsiFeature; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanMsiPackage(PlanMsiPackageEventArgs args) + { + EventHandler handler = this.PlanMsiPackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanPackageComplete(PlanPackageCompleteEventArgs args) + { + EventHandler handler = this.PlanPackageComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlannedCompatiblePackage(PlannedCompatiblePackageEventArgs args) + { + EventHandler handler = this.PlannedCompatiblePackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlannedPackage(PlannedPackageEventArgs args) + { + EventHandler handler = this.PlannedPackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanComplete(PlanCompleteEventArgs args) + { + EventHandler handler = this.PlanComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnApplyBegin(ApplyBeginEventArgs args) + { + EventHandler handler = this.ApplyBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnElevateBegin(ElevateBeginEventArgs args) + { + EventHandler handler = this.ElevateBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnElevateComplete(ElevateCompleteEventArgs args) + { + EventHandler handler = this.ElevateComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnProgress(ProgressEventArgs args) + { + EventHandler handler = this.Progress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnError(ErrorEventArgs args) + { + EventHandler handler = this.Error; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnRegisterBegin(RegisterBeginEventArgs args) + { + EventHandler handler = this.RegisterBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnRegisterComplete(RegisterCompleteEventArgs args) + { + EventHandler handler = this.RegisterComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnUnregisterBegin(UnregisterBeginEventArgs args) + { + EventHandler handler = this.UnregisterBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnUnregisterComplete(UnregisterCompleteEventArgs args) + { + EventHandler handler = this.UnregisterComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheBegin(CacheBeginEventArgs args) + { + EventHandler handler = this.CacheBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePackageBegin(CachePackageBeginEventArgs args) + { + EventHandler handler = this.CachePackageBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheAcquireBegin(CacheAcquireBeginEventArgs args) + { + EventHandler handler = this.CacheAcquireBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) + { + EventHandler handler = this.CacheAcquireProgress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheAcquireResolving(CacheAcquireResolvingEventArgs args) + { + EventHandler handler = this.CacheAcquireResolving; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheAcquireComplete(CacheAcquireCompleteEventArgs args) + { + EventHandler handler = this.CacheAcquireComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheVerifyBegin(CacheVerifyBeginEventArgs args) + { + EventHandler handler = this.CacheVerifyBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) + { + EventHandler handler = this.CacheVerifyProgress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheVerifyComplete(CacheVerifyCompleteEventArgs args) + { + EventHandler handler = this.CacheVerifyComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePackageComplete(CachePackageCompleteEventArgs args) + { + EventHandler handler = this.CachePackageComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheComplete(CacheCompleteEventArgs args) + { + EventHandler handler = this.CacheComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteBegin(ExecuteBeginEventArgs args) + { + EventHandler handler = this.ExecuteBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) + { + EventHandler handler = this.ExecutePackageBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) + { + EventHandler handler = this.ExecutePatchTarget; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) + { + EventHandler handler = this.ExecuteMsiMessage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) + { + EventHandler handler = this.ExecuteFilesInUse; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecutePackageComplete(ExecutePackageCompleteEventArgs args) + { + EventHandler handler = this.ExecutePackageComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteComplete(ExecuteCompleteEventArgs args) + { + EventHandler handler = this.ExecuteComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnApplyComplete(ApplyCompleteEventArgs args) + { + EventHandler handler = this.ApplyComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnApplyDowngrade(ApplyDowngradeEventArgs args) + { + EventHandler handler = this.ApplyDowngrade; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteProgress(ExecuteProgressEventArgs args) + { + EventHandler handler = this.ExecuteProgress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnLaunchApprovedExeBegin(LaunchApprovedExeBeginEventArgs args) + { + EventHandler handler = this.LaunchApprovedExeBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnLaunchApprovedExeComplete(LaunchApprovedExeCompleteEventArgs args) + { + EventHandler handler = this.LaunchApprovedExeComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnBeginMsiTransactionBegin(BeginMsiTransactionBeginEventArgs args) + { + EventHandler handler = this.BeginMsiTransactionBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnBeginMsiTransactionComplete(BeginMsiTransactionCompleteEventArgs args) + { + EventHandler handler = this.BeginMsiTransactionComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCommitMsiTransactionBegin(CommitMsiTransactionBeginEventArgs args) + { + EventHandler handler = this.CommitMsiTransactionBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCommitMsiTransactionComplete(CommitMsiTransactionCompleteEventArgs args) + { + EventHandler handler = this.CommitMsiTransactionComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnRollbackMsiTransactionBegin(RollbackMsiTransactionBeginEventArgs args) + { + EventHandler handler = this.RollbackMsiTransactionBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnRollbackMsiTransactionComplete(RollbackMsiTransactionCompleteEventArgs args) + { + EventHandler handler = this.RollbackMsiTransactionComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPauseAutomaticUpdatesBegin(PauseAutomaticUpdatesBeginEventArgs args) + { + EventHandler handler = this.PauseAutomaticUpdatesBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPauseAutomaticUpdatesComplete(PauseAutomaticUpdatesCompleteEventArgs args) + { + EventHandler handler = this.PauseAutomaticUpdatesComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnSystemRestorePointBegin(SystemRestorePointBeginEventArgs args) + { + EventHandler handler = this.SystemRestorePointBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnSystemRestorePointComplete(SystemRestorePointCompleteEventArgs args) + { + EventHandler handler = this.SystemRestorePointComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanForwardCompatibleBundle(PlanForwardCompatibleBundleEventArgs args) + { + EventHandler handler = this.PlanForwardCompatibleBundle; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheContainerOrPayloadVerifyBegin(CacheContainerOrPayloadVerifyBeginEventArgs args) + { + EventHandler handler = this.CacheContainerOrPayloadVerifyBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) + { + EventHandler handler = this.CacheContainerOrPayloadVerifyProgress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCacheContainerOrPayloadVerifyComplete(CacheContainerOrPayloadVerifyCompleteEventArgs args) + { + EventHandler handler = this.CacheContainerOrPayloadVerifyComplete; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePayloadExtractBegin(CachePayloadExtractBeginEventArgs args) + { + EventHandler handler = this.CachePayloadExtractBegin; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) + { + EventHandler handler = this.CachePayloadExtractProgress; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePayloadExtractComplete(CachePayloadExtractCompleteEventArgs args) + { + EventHandler handler = this.CachePayloadExtractComplete; + if (null != handler) + { + handler(this, args); + } + } + + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnPlanRestoreRelatedBundle(PlanRestoreRelatedBundleEventArgs args) + { + EventHandler handler = this.PlanRestoreRelatedBundle; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnExecuteProcessCancel(ExecuteProcessCancelEventArgs args) + { + EventHandler handler = this.ExecuteProcessCancel; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnDetectRelatedBundlePackage(DetectRelatedBundlePackageEventArgs args) + { + EventHandler handler = this.DetectRelatedBundlePackage; + if (null != handler) + { + handler(this, args); + } + } + + /// + /// Called by the engine, raises the event. + /// + /// Additional arguments for this event. + protected virtual void OnCachePackageNonVitalValidationFailure(CachePackageNonVitalValidationFailureEventArgs args) + { + EventHandler handler = this.CachePackageNonVitalValidationFailure; + if (null != handler) + { + handler(this, args); + } + } + + #region IBootstrapperApplication Members + + int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults) + { + switch (message) + { + default: + return NativeMethods.E_NOTIMPL; + } + } + + void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr) + { + } + + int IBootstrapperApplication.OnCreate(IBootstrapperEngine engine, ref Command command) + { + CreateEventArgs args = new CreateEventArgs(new Engine(engine), command.GetBootstrapperCommand()); + this.OnCreate(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnDestroy(bool reload) + { + DestroyEventArgs args = new DestroyEventArgs(reload); + this.OnDestroy(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnStartup() + { + StartupEventArgs args = new StartupEventArgs(); + this.OnStartup(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action) + { + ShutdownEventArgs args = new ShutdownEventArgs(action); + this.OnShutdown(args); + + action = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectBegin(bool fCached, RegistrationType registrationType, int cPackages, ref bool fCancel) + { + DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, registrationType, cPackages, fCancel); + this.OnDetectBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) + { + DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); + this.OnDetectForwardCompatibleBundle(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectUpdateBegin(string wzUpdateLocation, ref bool fCancel, ref bool fSkip) + { + DetectUpdateBeginEventArgs args = new DetectUpdateBeginEventArgs(wzUpdateLocation, fCancel, fSkip); + this.OnDetectUpdateBegin(args); + + fCancel = args.Cancel; + fSkip = args.Skip; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectUpdate(string wzUpdateLocation, long dw64Size, string wzHash, UpdateHashType hashAlgorithm, string wzVersion, string wzTitle, string wzSummary, string wzContentType, string wzContent, ref bool fCancel, ref bool fStopProcessingUpdates) + { + DetectUpdateEventArgs args = new DetectUpdateEventArgs(wzUpdateLocation, dw64Size, wzHash, hashAlgorithm, wzVersion, wzTitle, wzSummary, wzContentType, wzContent, fCancel, fStopProcessingUpdates); + this.OnDetectUpdate(args); + + fCancel = args.Cancel; + fStopProcessingUpdates = args.StopProcessingUpdates; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectUpdateComplete(int hrStatus, ref bool fIgnoreError) + { + DetectUpdateCompleteEventArgs args = new DetectUpdateCompleteEventArgs(hrStatus, fIgnoreError); + this.OnDetectUpdateComplete(args); + + fIgnoreError = args.IgnoreError; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) + { + DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); + this.OnDetectRelatedBundle(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectPackageBegin(string wzPackageId, ref bool fCancel) + { + DetectPackageBeginEventArgs args = new DetectPackageBeginEventArgs(wzPackageId, fCancel); + this.OnDetectPackageBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectCompatibleMsiPackage(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, ref bool fCancel) + { + DetectCompatibleMsiPackageEventArgs args = new DetectCompatibleMsiPackageEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, fCancel); + this.OnDetectCompatibleMsiPackage(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectRelatedMsiPackage(string wzPackageId, string wzUpgradeCode, string wzProductCode, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel) + { + DetectRelatedMsiPackageEventArgs args = new DetectRelatedMsiPackageEventArgs(wzPackageId, wzUpgradeCode, wzProductCode, fPerMachine, wzVersion, operation, fCancel); + this.OnDetectRelatedMsiPackage(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectPatchTarget(string wzPackageId, string wzProductCode, PackageState patchState, ref bool fCancel) + { + DetectPatchTargetEventArgs args = new DetectPatchTargetEventArgs(wzPackageId, wzProductCode, patchState, fCancel); + this.OnDetectPatchTarget(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectMsiFeature(string wzPackageId, string wzFeatureId, FeatureState state, ref bool fCancel) + { + DetectMsiFeatureEventArgs args = new DetectMsiFeatureEventArgs(wzPackageId, wzFeatureId, state, fCancel); + this.OnDetectMsiFeature(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectPackageComplete(string wzPackageId, int hrStatus, PackageState state, bool fCached) + { + DetectPackageCompleteEventArgs args = new DetectPackageCompleteEventArgs(wzPackageId, hrStatus, state, fCached); + this.OnDetectPackageComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnDetectComplete(int hrStatus, bool fEligibleForCleanup) + { + DetectCompleteEventArgs args = new DetectCompleteEventArgs(hrStatus, fEligibleForCleanup); + this.OnDetectComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlanBegin(int cPackages, ref bool fCancel) + { + PlanBeginEventArgs args = new PlanBeginEventArgs(cPackages, fCancel); + this.OnPlanBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + { + PlanRelatedBundleEventArgs args = new PlanRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); + this.OnPlanRelatedBundle(args); + + pRequestedState = args.State; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleId, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) + { + PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleId, recommendedType, pRequestedType, fCancel); + this.OnPlanRelatedBundleType(args); + + pRequestedType = args.Type; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanRollbackBoundary(string wzRollbackBoundaryId, bool fRecommendedTransaction, ref bool fTransaction, ref bool fCancel) + { + PlanRollbackBoundaryEventArgs args = new PlanRollbackBoundaryEventArgs(wzRollbackBoundaryId, fRecommendedTransaction, fTransaction, fCancel); + this.OnPlanRollbackBoundary(args); + + fTransaction = args.Transaction; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fCached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, ref RequestState pRequestedState, ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, ref bool fCancel) + { + PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestedState, pRequestedCacheType, fCancel); + this.OnPlanPackageBegin(args); + + pRequestedState = args.State; + pRequestedCacheType = args.CacheType; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanCompatibleMsiPackageBegin(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, bool recommendedRemove, ref bool pRequestedRemove, ref bool fCancel) + { + PlanCompatibleMsiPackageBeginEventArgs args = new PlanCompatibleMsiPackageBeginEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, recommendedRemove, pRequestedRemove, fCancel); + this.OnPlanCompatibleMsiPackageBegin(args); + + pRequestedRemove = args.RequestRemove; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanCompatibleMsiPackageComplete(string wzPackageId, string wzCompatiblePackageId, int hrStatus, bool requestedRemove) + { + PlanCompatibleMsiPackageCompleteEventArgs args = new PlanCompatibleMsiPackageCompleteEventArgs(wzPackageId, wzCompatiblePackageId, hrStatus, requestedRemove); + this.OnPlanCompatibleMsiPackageComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlanPatchTarget(string wzPackageId, string wzProductCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + { + PlanPatchTargetEventArgs args = new PlanPatchTargetEventArgs(wzPackageId, wzProductCode, recommendedState, pRequestedState, fCancel); + this.OnPlanPatchTarget(args); + + pRequestedState = args.State; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanMsiFeature(string wzPackageId, string wzFeatureId, FeatureState recommendedState, ref FeatureState pRequestedState, ref bool fCancel) + { + PlanMsiFeatureEventArgs args = new PlanMsiFeatureEventArgs(wzPackageId, wzFeatureId, recommendedState, pRequestedState, fCancel); + this.OnPlanMsiFeature(args); + + pRequestedState = args.State; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanMsiPackage(string wzPackageId, bool fExecute, ActionState action, BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, ref bool fCancel, ref BURN_MSI_PROPERTY actionMsiProperty, ref INSTALLUILEVEL uiLevel, ref bool fDisableExternalUiHandler, ref BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning) + { + PlanMsiPackageEventArgs args = new PlanMsiPackageEventArgs(wzPackageId, fExecute, action, recommendedFileVersioning, fCancel, actionMsiProperty, uiLevel, fDisableExternalUiHandler, fileVersioning); + this.OnPlanMsiPackage(args); + + fCancel = args.Cancel; + actionMsiProperty = args.ActionMsiProperty; + uiLevel = args.UiLevel; + fDisableExternalUiHandler = args.DisableExternalUiHandler; + fileVersioning = args.FileVersioning; + return args.HResult; + } + + int IBootstrapperApplication.OnPlanPackageComplete(string wzPackageId, int hrStatus, RequestState requested) + { + var args = new PlanPackageCompleteEventArgs(wzPackageId, hrStatus, requested); + this.OnPlanPackageComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlannedCompatiblePackage(string wzPackageId, string wzCompatiblePackageId, bool remove) + { + var args = new PlannedCompatiblePackageEventArgs(wzPackageId, wzCompatiblePackageId, remove); + this.OnPlannedCompatiblePackage(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlannedPackage(string wzPackageId, ActionState execute, ActionState rollback, bool fPlannedCache, bool fPlannedUncache) + { + var args = new PlannedPackageEventArgs(wzPackageId, execute, rollback, fPlannedCache, fPlannedUncache); + this.OnPlannedPackage(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlanComplete(int hrStatus) + { + PlanCompleteEventArgs args = new PlanCompleteEventArgs(hrStatus); + this.OnPlanComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnApplyBegin(int dwPhaseCount, ref bool fCancel) + { + ApplyBeginEventArgs args = new ApplyBeginEventArgs(dwPhaseCount, fCancel); + this.OnApplyBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnElevateBegin(ref bool fCancel) + { + ElevateBeginEventArgs args = new ElevateBeginEventArgs(fCancel); + this.OnElevateBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnElevateComplete(int hrStatus) + { + ElevateCompleteEventArgs args = new ElevateCompleteEventArgs(hrStatus); + this.OnElevateComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnProgress(int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) + { + ProgressEventArgs args = new ProgressEventArgs(dwProgressPercentage, dwOverallPercentage, fCancel); + this.OnProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnError(ErrorType errorType, string wzPackageId, int dwCode, string wzError, int dwUIHint, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) + { + ErrorEventArgs args = new ErrorEventArgs(errorType, wzPackageId, dwCode, wzError, dwUIHint, rgwzData, nRecommendation, pResult); + this.OnError(args); + + pResult = args.Result; + return args.HResult; + } + + int IBootstrapperApplication.OnRegisterBegin(RegistrationType recommendedRegistrationType, ref bool fCancel, ref RegistrationType registrationType) + { + RegisterBeginEventArgs args = new RegisterBeginEventArgs(recommendedRegistrationType, fCancel, registrationType); + this.OnRegisterBegin(args); + + fCancel = args.Cancel; + registrationType = args.RegistrationType; + return args.HResult; + } + + int IBootstrapperApplication.OnRegisterComplete(int hrStatus) + { + RegisterCompleteEventArgs args = new RegisterCompleteEventArgs(hrStatus); + this.OnRegisterComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnCacheBegin(ref bool fCancel) + { + CacheBeginEventArgs args = new CacheBeginEventArgs(fCancel); + this.OnCacheBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCachePackageBegin(string wzPackageId, int cCachePayloads, long dw64PackageCacheSize, bool fVital, ref bool fCancel) + { + CachePackageBeginEventArgs args = new CachePackageBeginEventArgs(wzPackageId, cCachePayloads, dw64PackageCacheSize, fVital, fCancel); + this.OnCachePackageBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheAcquireBegin(string wzPackageOrContainerId, string wzPayloadId, string wzSource, string wzDownloadUrl, string wzPayloadContainerId, CacheOperation recommendation, ref CacheOperation action, ref bool fCancel) + { + CacheAcquireBeginEventArgs args = new CacheAcquireBeginEventArgs(wzPackageOrContainerId, wzPayloadId, wzSource, wzDownloadUrl, wzPayloadContainerId, recommendation, action, fCancel); + this.OnCacheAcquireBegin(args); + + action = args.Action; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheAcquireProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) + { + CacheAcquireProgressEventArgs args = new CacheAcquireProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); + this.OnCacheAcquireProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheAcquireResolving(string wzPackageOrContainerId, string wzPayloadId, string[] searchPaths, int cSearchPaths, bool fFoundLocal, int dwRecommendedSearchPath, string wzDownloadUrl, string wzPayloadContainerId, CacheResolveOperation recommendation, ref int dwChosenSearchPath, ref CacheResolveOperation action, ref bool fCancel) + { + CacheAcquireResolvingEventArgs args = new CacheAcquireResolvingEventArgs(wzPackageOrContainerId, wzPayloadId, searchPaths, fFoundLocal, dwRecommendedSearchPath, wzDownloadUrl, wzPayloadContainerId, recommendation, dwChosenSearchPath, action, fCancel); + this.OnCacheAcquireResolving(args); + + dwChosenSearchPath = args.ChosenSearchPath; + action = args.Action; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheAcquireComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) + { + CacheAcquireCompleteEventArgs args = new CacheAcquireCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); + this.OnCacheAcquireComplete(args); + + action = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) + { + CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); + this.OnCacheVerifyBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, CacheVerifyStep verifyStep, ref bool fCancel) + { + CacheVerifyProgressEventArgs args = new CacheVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep, fCancel); + this.OnCacheVerifyProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) + { + CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); + this.OnCacheVerifyComplete(args); + + action = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnCachePackageComplete(string wzPackageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) + { + CachePackageCompleteEventArgs args = new CachePackageCompleteEventArgs(wzPackageId, hrStatus, recommendation, action); + this.OnCachePackageComplete(args); + + action = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheComplete(int hrStatus) + { + CacheCompleteEventArgs args = new CacheCompleteEventArgs(hrStatus); + this.OnCacheComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteBegin(int cExecutingPackages, ref bool fCancel) + { + ExecuteBeginEventArgs args = new ExecuteBeginEventArgs(cExecutingPackages, fCancel); + this.OnExecuteBegin(args); + + args.Cancel = fCancel; + return args.HResult; + } + + int IBootstrapperApplication.OnExecutePackageBegin(string wzPackageId, bool fExecute, ActionState action, INSTALLUILEVEL uiLevel, bool fDisableExternalUiHandler, ref bool fCancel) + { + ExecutePackageBeginEventArgs args = new ExecutePackageBeginEventArgs(wzPackageId, fExecute, action, uiLevel, fDisableExternalUiHandler, fCancel); + this.OnExecutePackageBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnExecutePatchTarget(string wzPackageId, string wzTargetProductCode, ref bool fCancel) + { + ExecutePatchTargetEventArgs args = new ExecutePatchTargetEventArgs(wzPackageId, wzTargetProductCode, fCancel); + this.OnExecutePatchTarget(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteProgress(string wzPackageId, int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) + { + ExecuteProgressEventArgs args = new ExecuteProgressEventArgs(wzPackageId, dwProgressPercentage, dwOverallPercentage, fCancel); + this.OnExecuteProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteMsiMessage(string wzPackageId, InstallMessage messageType, int dwUIHint, string wzMessage, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) + { + ExecuteMsiMessageEventArgs args = new ExecuteMsiMessageEventArgs(wzPackageId, messageType, dwUIHint, wzMessage, rgwzData, nRecommendation, pResult); + this.OnExecuteMsiMessage(args); + + pResult = args.Result; + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteFilesInUse(string wzPackageId, int cFiles, string[] rgwzFiles, Result nRecommendation, FilesInUseType source, ref Result pResult) + { + ExecuteFilesInUseEventArgs args = new ExecuteFilesInUseEventArgs(wzPackageId, rgwzFiles, nRecommendation, source, pResult); + this.OnExecuteFilesInUse(args); + + pResult = args.Result; + return args.HResult; + } + + int IBootstrapperApplication.OnExecutePackageComplete(string wzPackageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction) + { + ExecutePackageCompleteEventArgs args = new ExecutePackageCompleteEventArgs(wzPackageId, hrStatus, restart, recommendation, pAction); + this.OnExecutePackageComplete(args); + + pAction = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteComplete(int hrStatus) + { + ExecuteCompleteEventArgs args = new ExecuteCompleteEventArgs(hrStatus); + this.OnExecuteComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnUnregisterBegin(RegistrationType recommendedRegistrationType, ref RegistrationType registrationType) + { + UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(recommendedRegistrationType, registrationType); + this.OnUnregisterBegin(args); + + registrationType = args.RegistrationType; + return args.HResult; + } + + int IBootstrapperApplication.OnUnregisterComplete(int hrStatus) + { + UnregisterCompleteEventArgs args = new UnregisterCompleteEventArgs(hrStatus); + this.OnUnregisterComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnApplyComplete(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction) + { + ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart, recommendation, pAction); + this.OnApplyComplete(args); + + pAction = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnApplyDowngrade(int hrRecommendation, ref int hrStatus) + { + ApplyDowngradeEventArgs args = new ApplyDowngradeEventArgs(hrRecommendation, hrStatus); + this.OnApplyDowngrade(args); + + hrStatus = args.Status; + return args.HResult; + } + + int IBootstrapperApplication.OnLaunchApprovedExeBegin(ref bool fCancel) + { + LaunchApprovedExeBeginEventArgs args = new LaunchApprovedExeBeginEventArgs(fCancel); + this.OnLaunchApprovedExeBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnLaunchApprovedExeComplete(int hrStatus, int processId) + { + LaunchApprovedExeCompleteEventArgs args = new LaunchApprovedExeCompleteEventArgs(hrStatus, processId); + this.OnLaunchApprovedExeComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnBeginMsiTransactionBegin(string transactionId, ref bool fCancel) + { + BeginMsiTransactionBeginEventArgs args = new BeginMsiTransactionBeginEventArgs(transactionId, fCancel); + this.OnBeginMsiTransactionBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnBeginMsiTransactionComplete(string transactionId, int hrStatus) + { + BeginMsiTransactionCompleteEventArgs args = new BeginMsiTransactionCompleteEventArgs(transactionId, hrStatus); + this.OnBeginMsiTransactionComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnCommitMsiTransactionBegin(string transactionId, ref bool fCancel) + { + CommitMsiTransactionBeginEventArgs args = new CommitMsiTransactionBeginEventArgs(transactionId, fCancel); + this.OnCommitMsiTransactionBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCommitMsiTransactionComplete(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction) + { + CommitMsiTransactionCompleteEventArgs args = new CommitMsiTransactionCompleteEventArgs(transactionId, hrStatus, restart, recommendation, pAction); + this.OnCommitMsiTransactionComplete(args); + + pAction = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnRollbackMsiTransactionBegin(string transactionId) + { + RollbackMsiTransactionBeginEventArgs args = new RollbackMsiTransactionBeginEventArgs(transactionId); + this.OnRollbackMsiTransactionBegin(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnRollbackMsiTransactionComplete(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction) + { + RollbackMsiTransactionCompleteEventArgs args = new RollbackMsiTransactionCompleteEventArgs(transactionId, hrStatus, restart, recommendation, pAction); + this.OnRollbackMsiTransactionComplete(args); + + pAction = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnPauseAutomaticUpdatesBegin() + { + PauseAutomaticUpdatesBeginEventArgs args = new PauseAutomaticUpdatesBeginEventArgs(); + this.OnPauseAutomaticUpdatesBegin(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPauseAutomaticUpdatesComplete(int hrStatus) + { + PauseAutomaticUpdatesCompleteEventArgs args = new PauseAutomaticUpdatesCompleteEventArgs(hrStatus); + this.OnPauseAutomaticUpdatesComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnSystemRestorePointBegin() + { + SystemRestorePointBeginEventArgs args = new SystemRestorePointBeginEventArgs(); + this.OnSystemRestorePointBegin(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnSystemRestorePointComplete(int hrStatus) + { + SystemRestorePointCompleteEventArgs args = new SystemRestorePointCompleteEventArgs(hrStatus); + this.OnSystemRestorePointComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle) + { + PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle); + this.OnPlanForwardCompatibleBundle(args); + + fCancel = args.Cancel; + fIgnoreBundle = args.IgnoreBundle; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) + { + CacheContainerOrPayloadVerifyBeginEventArgs args = new CacheContainerOrPayloadVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); + this.OnCacheContainerOrPayloadVerifyBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) + { + CacheContainerOrPayloadVerifyProgressEventArgs args = new CacheContainerOrPayloadVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); + this.OnCacheContainerOrPayloadVerifyProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus) + { + CacheContainerOrPayloadVerifyCompleteEventArgs args = new CacheContainerOrPayloadVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus); + this.OnCacheContainerOrPayloadVerifyComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnCachePayloadExtractBegin(string wzContainerId, string wzPayloadId, ref bool fCancel) + { + CachePayloadExtractBeginEventArgs args = new CachePayloadExtractBeginEventArgs(wzContainerId, wzPayloadId, fCancel); + this.OnCachePayloadExtractBegin(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCachePayloadExtractProgress(string wzContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) + { + CachePayloadExtractProgressEventArgs args = new CachePayloadExtractProgressEventArgs(wzContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); + this.OnCachePayloadExtractProgress(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCachePayloadExtractComplete(string wzContainerId, string wzPayloadId, int hrStatus) + { + CachePayloadExtractCompleteEventArgs args = new CachePayloadExtractCompleteEventArgs(wzContainerId, wzPayloadId, hrStatus); + this.OnCachePayloadExtractComplete(args); + + return args.HResult; + } + + int IBootstrapperApplication.OnPlanRestoreRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) + { + PlanRestoreRelatedBundleEventArgs args = new PlanRestoreRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); + this.OnPlanRestoreRelatedBundle(args); + + pRequestedState = args.State; + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnExecuteProcessCancel(string wzPackageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction) + { + ExecuteProcessCancelEventArgs args = new ExecuteProcessCancelEventArgs(wzPackageId, processId, recommendation, pAction); + this.OnExecuteProcessCancel(args); + + pAction = args.Action; + return args.HResult; + } + + int IBootstrapperApplication.OnDetectRelatedBundlePackage(string wzPackageId, string wzProductCode, RelationType relationType, bool fPerMachine, string wzVersion, ref bool fCancel) + { + DetectRelatedBundlePackageEventArgs args = new DetectRelatedBundlePackageEventArgs(wzPackageId, wzProductCode, relationType, fPerMachine, wzVersion, fCancel); + this.OnDetectRelatedBundlePackage(args); + + fCancel = args.Cancel; + return args.HResult; + } + + int IBootstrapperApplication.OnCachePackageNonVitalValidationFailure(string wzPackageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, ref BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action) + { + CachePackageNonVitalValidationFailureEventArgs args = new CachePackageNonVitalValidationFailureEventArgs(wzPackageId, hrStatus, recommendation, action); + this.OnCachePackageNonVitalValidationFailure(args); + + action = args.Action; + return args.HResult; + } + + #endregion + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationData.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationData.cs new file mode 100644 index 00000000..10cb863f --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationData.cs @@ -0,0 +1,101 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.IO; + using System.Xml.XPath; + + /// + /// Utility class for reading BootstrapperApplicationData.xml. + /// + public class BootstrapperApplicationData : IBootstrapperApplicationData + { + /// + /// The default file name for BootstrapperApplicationData. + /// + public const string DefaultFileName = "BootstrapperApplicationData.xml"; + + /// + /// The XML namespace for BootstrapperApplicationData. + /// + public const string XMLNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData"; + + /// + /// The default path of where the BA was extracted to. + /// + public static readonly DirectoryInfo DefaultFolder; + + /// + /// The default path to BootstrapperApplicationData.xml. + /// + public static readonly FileInfo DefaultFile; + + static BootstrapperApplicationData() + { + DefaultFolder = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); + DefaultFile = new FileInfo(Path.Combine(DefaultFolder.FullName, DefaultFileName)); + } + + /// + public FileInfo BADataFile { get; private set; } + + /// + public IBundleInfo Bundle { get; private set; } + + /// + /// Uses the default location for BootstrapperApplicationData.xml. + /// + public BootstrapperApplicationData() : this(DefaultFile) { } + + /// + /// Uses the given file for BootstrapperApplicationData.xml. + /// + /// + public BootstrapperApplicationData(FileInfo baDataFile) + { + this.BADataFile = baDataFile; + + using (FileStream fs = this.BADataFile.OpenRead()) + { + this.Bundle = BundleInfo.ParseBundleFromStream(fs); + } + } + + /// + /// Utility method for parsing BootstrapperApplicationData.xml. + /// + /// + /// + /// + public static string GetAttribute(XPathNavigator node, string attributeName) + { + XPathNavigator attribute = node.SelectSingleNode("@" + attributeName); + + if (attribute == null) + { + return null; + } + + return attribute.Value; + } + + /// + /// Utility method for parsing BootstrapperApplicationData.xml. + /// + /// + /// + /// + public static bool? GetYesNoAttribute(XPathNavigator node, string attributeName) + { + string attributeValue = GetAttribute(node, attributeName); + + if (attributeValue == null) + { + return null; + } + + return attributeValue.Equals("yes", StringComparison.InvariantCulture); + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationFactoryAttribute.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationFactoryAttribute.cs new file mode 100644 index 00000000..9b64e838 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperApplicationFactoryAttribute.cs @@ -0,0 +1,31 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + + /// + /// This is no longer used. + /// + [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] + [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] + public sealed class BootstrapperApplicationFactoryAttribute : Attribute + { + /// + /// This is no longer used. + /// + /// This is no longer used + public BootstrapperApplicationFactoryAttribute(Type bootstrapperApplicationFactoryType) + { + throw new NotImplementedException(); + } + + /// + /// This is no longer used. + /// + public Type BootstrapperApplicationFactoryType + { + get { throw new NotImplementedException(); } + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs new file mode 100644 index 00000000..612e8ce9 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BootstrapperCommand.cs @@ -0,0 +1,239 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.CodeDom.Compiler; + using System.Collections.Generic; + using System.ComponentModel; + using System.Runtime.InteropServices; + + /// + /// Command-line provided to the bootstrapper application. + /// + [Serializable] + [StructLayout(LayoutKind.Sequential)] + [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] + public struct Command + { + // Strings must be declared as pointers so that Marshaling doesn't free them. + [MarshalAs(UnmanagedType.I4)] internal int cbSize; + [MarshalAs(UnmanagedType.U4)] private readonly LaunchAction action; + [MarshalAs(UnmanagedType.U4)] private readonly Display display; + private readonly IntPtr wzCommandLine; + [MarshalAs(UnmanagedType.I4)] private readonly int nCmdShow; + [MarshalAs(UnmanagedType.U4)] private readonly ResumeType resume; + private readonly IntPtr hwndSplashScreen; + [MarshalAs(UnmanagedType.I4)] private readonly RelationType relation; + [MarshalAs(UnmanagedType.Bool)] private readonly bool passthrough; + private readonly IntPtr wzLayoutDirectory; + private readonly IntPtr wzBootstrapperWorkingFolder; + private readonly IntPtr wzBootstrapperApplicationDataPath; + + /// + /// Gets the IBootstrapperCommand for this Command. + /// + /// IBootstrapperCommand + public IBootstrapperCommand GetBootstrapperCommand() + { + return new BootstrapperCommand( + this.action, + this.display, + Marshal.PtrToStringUni(this.wzCommandLine), + this.nCmdShow, + this.resume, + this.hwndSplashScreen, + this.relation, + this.passthrough, + Marshal.PtrToStringUni(this.wzLayoutDirectory), + Marshal.PtrToStringUni(this.wzBootstrapperWorkingFolder), + Marshal.PtrToStringUni(this.wzBootstrapperApplicationDataPath)); + } + } + + /// + /// Default implementation of . + /// + public sealed class BootstrapperCommand : IBootstrapperCommand + { + /// + /// See . + /// + public BootstrapperCommand( + LaunchAction action, + Display display, + string commandLine, + int cmdShow, + ResumeType resume, + IntPtr splashScreen, + RelationType relation, + bool passthrough, + string layoutDirectory, + string bootstrapperWorkingFolder, + string bootstrapperApplicationDataPath) + { + this.Action = action; + this.Display = display; + this.CommandLine = commandLine; + this.CmdShow = cmdShow; + this.Resume = resume; + this.SplashScreen = splashScreen; + this.Relation = relation; + this.Passthrough = passthrough; + this.LayoutDirectory = layoutDirectory; + this.BootstrapperWorkingFolder = bootstrapperWorkingFolder; + this.BootstrapperApplicationDataPath = bootstrapperApplicationDataPath; + } + + /// + public LaunchAction Action { get; } + + /// + public Display Display { get; } + + /// + public string CommandLine { get; } + + /// + public int CmdShow { get; } + + /// + public ResumeType Resume { get; } + + /// + public IntPtr SplashScreen { get; } + + /// + public RelationType Relation { get; } + + /// + public bool Passthrough { get; } + + /// + public string LayoutDirectory { get; } + + /// + public string BootstrapperWorkingFolder { get; } + + /// + public string BootstrapperApplicationDataPath { get; } + + /// + public IMbaCommand ParseCommandLine() + { + var args = ParseCommandLineToArgs(this.CommandLine); + var unknownArgs = new List(); + var variables = new List>(); + var restart = Restart.Unknown; + + foreach (var arg in args) + { + var unknownArg = false; + + if (arg[0] == '-' || arg[0] == '/') + { + var parameter = arg.Substring(1).ToLowerInvariant(); + switch (parameter) + { + case "norestart": + if (restart == Restart.Unknown) + { + restart = Restart.Never; + } + break; + case "forcerestart": + if (restart == Restart.Unknown) + { + restart = Restart.Always; + } + break; + default: + unknownArg = true; + break; + } + } + else + { + var index = arg.IndexOf('='); + if (index == -1) + { + unknownArg = true; + } + else + { + var name = arg.Substring(0, index); + var value = arg.Substring(index + 1); + variables.Add(new KeyValuePair(name, value)); + } + } + + if (unknownArg) + { + unknownArgs.Add(arg); + } + } + + if (restart == Restart.Unknown) + { + restart = this.Display < Display.Full ? Restart.Automatic : Restart.Prompt; + } + + return new MbaCommand + { + Restart = restart, + UnknownCommandLineArgs = unknownArgs.ToArray(), + Variables = variables.ToArray(), + }; + } + + /// + /// Gets the command line arguments as a string array. + /// + /// + /// Array of command line arguments. + /// + /// The command line could not be parsed into an array. + /// + /// This method uses the same parsing as the operating system which handles quotes and spaces correctly. + /// + public static string[] ParseCommandLineToArgs(string commandLine) + { + if (null == commandLine) + { + return new string[0]; + } + + // Parse the filtered command line arguments into a native array. + int argc = 0; + + // CommandLineToArgvW tries to treat the first argument as the path to the process, + // which fails pretty miserably if your first argument is something like + // FOO="C:\Program Files\My Company". So give it something harmless to play with. + IntPtr argv = NativeMethods.CommandLineToArgvW("ignored " + commandLine, out argc); + + if (IntPtr.Zero == argv) + { + // Throw an exception with the last error. + throw new Win32Exception(); + } + + // Marshal each native array pointer to a managed string. + try + { + // Skip "ignored" argument/hack. + string[] args = new string[argc - 1]; + for (int i = 1; i < argc; ++i) + { + IntPtr argvi = Marshal.ReadIntPtr(argv, i * IntPtr.Size); + args[i - 1] = Marshal.PtrToStringUni(argvi); + } + + return args; + } + finally + { + NativeMethods.LocalFree(argv); + } + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/BundleInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/BundleInfo.cs new file mode 100644 index 00000000..14cac881 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/BundleInfo.cs @@ -0,0 +1,99 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Collections.Generic; + using System.IO; + using System.Xml; + using System.Xml.XPath; + + /// + /// Default implementation of . + /// + public class BundleInfo : IBundleInfo + { + /// + public bool PerMachine { get; internal set; } + + /// + public string Name { get; internal set; } + + /// + public string LogVariable { get; internal set; } + + /// + public IOverridableVariables OverridableVariables { get; internal set; } + + /// + public IDictionary Packages { get; internal set; } + + internal BundleInfo() + { + this.Packages = new Dictionary(); + } + + /// + public IPackageInfo AddRelatedBundleAsPackage(string productCode, RelationType relationType, bool perMachine, string version) + { + var package = PackageInfo.GetRelatedBundleAsPackage(productCode, relationType, perMachine, version); + this.Packages.Add(package.Id, package); + return package; + } + + /// + public IPackageInfo AddUpdateBundleAsPackage(string packageId) + { + var package = PackageInfo.GetUpdateBundleAsPackage(packageId); + this.Packages.Add(package.Id, package); + return package; + } + + /// + /// Parses BA manifest from the given stream. + /// + /// + /// + public static IBundleInfo ParseBundleFromStream(Stream stream) + { + XPathDocument manifest = new XPathDocument(stream); + XPathNavigator root = manifest.CreateNavigator(); + return ParseBundleFromXml(root); + } + + /// + /// Parses BA manifest from the given . + /// + /// The root of the BA manifest. + /// + public static IBundleInfo ParseBundleFromXml(XPathNavigator root) + { + BundleInfo bundle = new BundleInfo(); + + XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); + namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); + XPathNavigator bundleNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixBundleProperties", namespaceManager); + + if (bundleNode == null) + { + throw new Exception("Failed to select bundle information."); + } + + bool? perMachine = BootstrapperApplicationData.GetYesNoAttribute(bundleNode, "PerMachine"); + if (perMachine.HasValue) + { + bundle.PerMachine = perMachine.Value; + } + + bundle.Name = BootstrapperApplicationData.GetAttribute(bundleNode, "DisplayName"); + + bundle.LogVariable = BootstrapperApplicationData.GetAttribute(bundleNode, "LogPathVariable"); + + bundle.OverridableVariables = OverridableVariablesInfo.ParseFromXml(root); + + bundle.Packages = PackageInfo.ParsePackagesFromXml(root); + + return bundle; + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs new file mode 100644 index 00000000..487858e0 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/Engine.cs @@ -0,0 +1,349 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.ComponentModel; + using System.Runtime.InteropServices; + using System.Security; + + /// + /// Default implementation of . + /// + public sealed class Engine : IEngine + { + private IBootstrapperEngine engine; + + internal Engine(IBootstrapperEngine engine) + { + this.engine = engine; + } + + /// + public int PackageCount + { + get + { + int count; + this.engine.GetPackageCount(out count); + + return count; + } + } + + /// + public void Apply(IntPtr hwndParent) + { + this.engine.Apply(hwndParent); + } + + /// + public void CloseSplashScreen() + { + this.engine.CloseSplashScreen(); + } + + /// + public int CompareVersions(string version1, string version2) + { + this.engine.CompareVersions(version1, version2, out var result); + return result; + } + + /// + public bool ContainsVariable(string name) + { + return BalUtil.BalVariableExistsFromEngine(this.engine, name); + } + + /// + public void Detect() + { + this.Detect(IntPtr.Zero); + } + + /// + public void Detect(IntPtr hwndParent) + { + this.engine.Detect(hwndParent); + } + + /// + public bool Elevate(IntPtr hwndParent) + { + int ret = this.engine.Elevate(hwndParent); + + if (NativeMethods.S_OK == ret || NativeMethods.E_ALREADYINITIALIZED == ret) + { + return true; + } + else if (NativeMethods.E_CANCELLED == ret) + { + return false; + } + else + { + throw new Win32Exception(ret); + } + } + + /// + public string EscapeString(string input) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalEscapeStringFromEngine(this.engine, input, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToUniString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public bool EvaluateCondition(string condition) + { + bool value; + this.engine.EvaluateCondition(condition, out value); + + return value; + } + + /// + public string FormatString(string format) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalFormatStringFromEngine(this.engine, format, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToUniString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public long GetVariableNumeric(string name) + { + int ret = this.engine.GetVariableNumeric(name, out long value); + if (NativeMethods.S_OK != ret) + { + throw new Win32Exception(ret); + } + + return value; + } + + /// + public SecureString GetVariableSecureString(string name) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalGetStringVariableFromEngine(this.engine, name, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToSecureString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public string GetVariableString(string name) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalGetStringVariableFromEngine(this.engine, name, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToUniString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public string GetVariableVersion(string name) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalGetVersionVariableFromEngine(this.engine, name, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToUniString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public string GetRelatedBundleVariable(string bundleId, string name) + { + StrUtil.StrHandle handle = new StrUtil.StrHandle(); + try + { + int ret = BalUtil.BalGetRelatedBundleVariableFromEngine(this.engine, bundleId, name, ref handle); + if (ret != NativeMethods.S_OK) + { + throw new Win32Exception(ret); + } + + return handle.ToUniString(); + } + finally + { + handle.Dispose(); + } + } + + /// + public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments) + { + this.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, 0); + } + + /// + public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout) + { + this.engine.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout); + } + /// + + public void Log(LogLevel level, string message) + { + this.engine.Log(level, message); + } + + /// + public void Plan(LaunchAction action) + { + this.engine.Plan(action); + } + + /// + public void SetUpdate(string localSource, string downloadSource, long size, UpdateHashType hashType, string hash, string updatePackageId) + { + this.engine.SetUpdate(localSource, downloadSource, size, hashType, hash, updatePackageId); + } + + /// + public void SetUpdateSource(string url) + { + this.engine.SetUpdateSource(url); + } + + /// + public void SetLocalSource(string packageOrContainerId, string payloadId, string path) + { + this.engine.SetLocalSource(packageOrContainerId, payloadId, path); + } + + /// + public void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password) + { + this.engine.SetDownloadSource(packageOrContainerId, payloadId, url, user, password); + } + + /// + public void SetVariableNumeric(string name, long value) + { + this.engine.SetVariableNumeric(name, value); + } + + /// + public void SetVariableString(string name, SecureString value, bool formatted) + { + IntPtr pValue = Marshal.SecureStringToCoTaskMemUnicode(value); + try + { + this.engine.SetVariableString(name, pValue, formatted); + } + finally + { + Marshal.FreeCoTaskMem(pValue); + } + } + + /// + public void SetVariableString(string name, string value, bool formatted) + { + IntPtr pValue = Marshal.StringToCoTaskMemUni(value); + try + { + this.engine.SetVariableString(name, pValue, formatted); + } + finally + { + Marshal.FreeCoTaskMem(pValue); + } + } + + /// + public void SetVariableVersion(string name, string value) + { + IntPtr pValue = Marshal.StringToCoTaskMemUni(value); + try + { + this.engine.SetVariableVersion(name, pValue); + } + finally + { + Marshal.FreeCoTaskMem(pValue); + } + } + + /// + public int SendEmbeddedError(int errorCode, string message, int uiHint) + { + int result = 0; + this.engine.SendEmbeddedError(errorCode, message, uiHint, out result); + return result; + } + + /// + public int SendEmbeddedProgress(int progressPercentage, int overallPercentage) + { + int result = 0; + this.engine.SendEmbeddedProgress(progressPercentage, overallPercentage, out result); + return result; + } + + /// + public void Quit(int exitCode) + { + this.engine.Quit(exitCode); + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs new file mode 100644 index 00000000..e1649d43 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/EventArgs.cs @@ -0,0 +1,2757 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Collections.Generic; + using System.Collections.ObjectModel; + using System.Runtime.InteropServices; + + /// + /// Base class for BA classes. + /// + [Serializable] + public abstract class HResultEventArgs : EventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public HResultEventArgs() + { + } + + /// + /// Gets or sets the of the operation. This is passed back to the engine. + /// + public int HResult { get; set; } + } + + /// + /// Base class for cancellable BA classes. + /// + [Serializable] + public abstract class CancellableHResultEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CancellableHResultEventArgs(bool cancelRecommendation) + { + this.Cancel = cancelRecommendation; + } + + /// + /// Gets or sets whether to cancel the operation. This is passed back to the engine. + /// + public bool Cancel { get; set; } + } + + /// + /// Base class for classes that must return a . + /// + [Serializable] + public abstract class ResultEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ResultEventArgs(Result recommendation, Result result) + { + this.Recommendation = recommendation; + this.Result = result; + } + + /// + /// Gets the recommended of the operation. + /// + public Result Recommendation { get; private set; } + + /// + /// Gets or sets the of the operation. This is passed back to the engine. + /// + public Result Result { get; set; } + } + + /// + /// Base class for classes that receive status from the engine. + /// + [Serializable] + public abstract class StatusEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public StatusEventArgs(int hrStatus) + { + this.Status = hrStatus; + } + + /// + /// Gets the return code of the operation. + /// + public int Status { get; private set; } + } + + /// + /// Base class for classes that receive status from the engine and return an action. + /// + public abstract class ActionEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ActionEventArgs(int hrStatus, T recommendation, T action) + : base(hrStatus) + { + this.Recommendation = recommendation; + this.Action = action; + } + + /// + /// Gets the recommended action from the engine. + /// + public T Recommendation { get; private set; } + + /// + /// Gets or sets the action to be performed. This is passed back to the engine. + /// + public T Action { get; set; } + } + + /// + /// Base class for cancellable action BA classes. + /// + [Serializable] + public abstract class CancellableActionEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CancellableActionEventArgs(bool cancelRecommendation, T recommendation, T action) + : base(cancelRecommendation) + { + this.Recommendation = recommendation; + this.Action = action; + } + + /// + /// Gets the recommended action from the engine. + /// + public T Recommendation { get; private set; } + + /// + /// Gets or sets the action to be performed. This is passed back to the engine. + /// + public T Action { get; set; } + } + + /// + /// Base class for cache progress events. + /// + [Serializable] + public abstract class CacheProgressBaseEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheProgressBaseEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + this.Progress = progress; + this.Total = total; + this.OverallPercentage = overallPercentage; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + + /// + /// Gets the number of bytes cached thus far. + /// + public long Progress { get; private set; } + + /// + /// Gets the total bytes to cache. + /// + public long Total { get; private set; } + + /// + /// Gets the overall percentage of progress of caching. + /// + public int OverallPercentage { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class CreateEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CreateEventArgs(IEngine engine, IBootstrapperCommand command) + { + this.Engine = engine; + this.Command = command; + } + + /// + /// Engine running the application. + /// + public IEngine Engine { get; } + + /// + /// Command line arguments. + /// + public IBootstrapperCommand Command { get; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class DestroyEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DestroyEventArgs(bool reload) + { + this.Reload = reload; + } + + /// + /// Bootstrapper application is being reloaded. + /// + public bool Reload { get; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class StartupEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public StartupEventArgs() + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class ShutdownEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ShutdownEventArgs(BOOTSTRAPPER_SHUTDOWN_ACTION action) + { + this.Action = action; + } + + /// + /// The action for OnShutdown. + /// + public BOOTSTRAPPER_SHUTDOWN_ACTION Action { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectBeginEventArgs(bool cached, RegistrationType registrationType, int packageCount, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.Cached = cached; + this.RegistrationType = registrationType; + this.PackageCount = packageCount; + } + + /// + /// Gets whether the bundle is cached. + /// + public bool Cached { get; private set; } + + /// + /// Gets the bundle's registration state. + /// + public RegistrationType RegistrationType { get; private set; } + + /// + /// Gets the number of packages to detect. + /// + public int PackageCount { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectForwardCompatibleBundleEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.BundleId = bundleId; + this.RelationType = relationType; + this.BundleTag = bundleTag; + this.PerMachine = perMachine; + this.Version = version; + this.MissingFromCache = missingFromCache; + } + + /// + /// Gets the identity of the forward compatible bundle detected. + /// + public string BundleId { get; private set; } + + /// + /// Gets the relationship type of the forward compatible bundle. + /// + public RelationType RelationType { get; private set; } + + /// + /// Gets the tag of the forward compatible bundle. + /// + public string BundleTag { get; private set; } + + /// + /// Gets whether the detected forward compatible bundle is per machine. + /// + public bool PerMachine { get; private set; } + + /// + /// Gets the version of the forward compatible bundle detected. + /// + public string Version { get; private set; } + + /// + /// Whether the forward compatible bundle is missing from the package cache. + /// + public bool MissingFromCache { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation) + : base(cancelRecommendation) + { + this.UpdateLocation = updateLocation; + this.Skip = skipRecommendation; + } + + /// + /// Gets the identity of the bundle to detect. + /// + public string UpdateLocation { get; private set; } + + /// + /// Whether to skip checking for bundle updates. + /// + public bool Skip { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectUpdateEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectUpdateEventArgs(string updateLocation, long size, string hash, UpdateHashType hashAlgorithm, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) + : base(cancelRecommendation) + { + this.UpdateLocation = updateLocation; + this.Size = size; + this.Hash = hash; + this.HashAlgorithm = hashAlgorithm; + this.Version = version; + this.Title = title; + this.Summary = summary; + this.ContentType = contentType; + this.Content = content; + this.StopProcessingUpdates = stopRecommendation; + } + + /// + /// Gets the identity of the bundle to detect. + /// + public string UpdateLocation { get; private set; } + + /// + /// Gets the size of the updated bundle. + /// + public long Size { get; private set; } + + /// + /// File hash of the updated bundle. + /// + public string Hash { get; } + + /// + /// The algorithm of the updated bundle's hash. + /// + public UpdateHashType HashAlgorithm { get; } + + /// + /// Gets the version of the updated bundle. + /// + public string Version { get; private set; } + + /// + /// Gets the title of the the updated bundle. + /// + public string Title { get; private set; } + + /// + /// Gets the summary of the updated bundle. + /// + public string Summary { get; private set; } + + /// + /// Gets the content type of the content of the updated bundle. + /// + public string ContentType { get; private set; } + + /// + /// Gets the content of the updated bundle. + /// + public string Content { get; private set; } + + /// + /// Tells the engine to stop giving the rest of the updates found in the feed. + /// + public bool StopProcessingUpdates { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectUpdateCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation) + : base(hrStatus) + { + this.IgnoreError = ignoreRecommendation; + } + + /// + /// If Status is an error, then set this to true to ignore it and continue detecting. + /// + public bool IgnoreError { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectRelatedBundleEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.ProductCode = productCode; + this.RelationType = relationType; + this.BundleTag = bundleTag; + this.PerMachine = perMachine; + this.Version = version; + this.MissingFromCache = missingFromCache; + } + + /// + /// Gets the identity of the related bundle detected. + /// + public string ProductCode { get; private set; } + + /// + /// Gets the relationship type of the related bundle. + /// + public RelationType RelationType { get; private set; } + + /// + /// Gets the tag of the related package bundle. + /// + public string BundleTag { get; private set; } + + /// + /// Gets whether the detected bundle is per machine. + /// + public bool PerMachine { get; private set; } + + /// + /// Gets the version of the related bundle detected. + /// + public string Version { get; private set; } + + /// + /// Whether the related bundle is missing from the package cache. + /// + public bool MissingFromCache { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectPackageBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + } + + /// + /// Gets the identity of the package to detect. + /// + public string PackageId { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectCompatibleMsiPackageEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectCompatibleMsiPackageEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.CompatiblePackageId = compatiblePackageId; + this.CompatiblePackageVersion = compatiblePackageVersion; + } + + /// + /// Gets the identity of the package that was not detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the compatible package that was detected. + /// + public string CompatiblePackageId { get; private set; } + + /// + /// Gets the version of the compatible package that was detected. + /// + public string CompatiblePackageVersion { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.UpgradeCode = upgradeCode; + this.ProductCode = productCode; + this.PerMachine = perMachine; + this.Version = version; + this.Operation = operation; + } + + /// + /// Gets the identity of the product's package detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the upgrade code of the related package detected. + /// + public string UpgradeCode { get; private set; } + + /// + /// Gets the identity of the related package detected. + /// + public string ProductCode { get; private set; } + + /// + /// Gets whether the detected package is per machine. + /// + public bool PerMachine { get; private set; } + + /// + /// Gets the version of the related package detected. + /// + public string Version { get; private set; } + + /// + /// Gets the operation that will be taken on the detected package. + /// + public RelatedOperation Operation { get; private set; } + } + + /// + /// Event arguments for + /// + public class DetectPatchTargetEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectPatchTargetEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ProductCode = productCode; + this.State = state; + } + + /// + /// Gets the identity of the patch's package. + /// + public string PackageId { get; private set; } + + /// + /// Gets the product code of the target. + /// + public string ProductCode { get; private set; } + + /// + /// Gets the detected patch state for the target. + /// + public PackageState State { get; private set; } + } + + /// + /// Event arguments for + /// + public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.FeatureId = featureId; + this.State = state; + } + + /// + /// Gets the identity of the feature's package detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the feature detected. + /// + public string FeatureId { get; private set; } + + /// + /// Gets the detected feature state. + /// + public FeatureState State { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class DetectPackageCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectPackageCompleteEventArgs(string packageId, int hrStatus, PackageState state, bool cached) + : base(hrStatus) + { + this.PackageId = packageId; + this.State = state; + this.Cached = cached; + } + + /// + /// Gets the identity of the package detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the state of the specified package. + /// + public PackageState State { get; private set; } + + /// + /// Gets whether any part of the package is cached. + /// + public bool Cached { get; private set; } + } + + /// + /// Event arguments used when the detection phase has completed. + /// + [Serializable] + public class DetectCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectCompleteEventArgs(int hrStatus, bool eligibleForCleanup) + : base(hrStatus) + { + this.EligibleForCleanup = eligibleForCleanup; + } + + /// + /// Indicates whether the engine will uninstall the bundle if shutdown without running Apply. + /// + public bool EligibleForCleanup { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanBeginEventArgs(int packageCount, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageCount = packageCount; + } + + /// + /// Gets the number of packages to plan for. + /// + public int PackageCount { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.BundleId = bundleId; + this.RecommendedState = recommendedState; + this.State = state; + } + + /// + /// Gets the identity of the bundle to plan for. + /// + public string BundleId { get; private set; } + + /// + /// Gets the recommended requested state for the bundle. + /// + public RequestState RecommendedState { get; private set; } + + /// + /// Gets or sets the requested state for the bundle. + /// + public RequestState State { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanRelatedBundleTypeEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.BundleId = bundleId; + this.RecommendedType = recommendedType; + this.Type = type; + } + + /// + /// Gets the identity of the bundle to plan for. + /// + public string BundleId { get; private set; } + + /// + /// Gets the recommended plan type for the bundle. + /// + public RelatedBundlePlanType RecommendedType { get; private set; } + + /// + /// Gets or sets the plan type for the bundle. + /// + public RelatedBundlePlanType Type { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanPackageBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool cached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, RequestState state, BOOTSTRAPPER_CACHE_TYPE cacheType, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.CurrentState = currentState; + this.Cached = cached; + this.InstallCondition = installCondition; + this.RepairCondition = repairCondition; + this.RecommendedState = recommendedState; + this.RecommendedCacheType = recommendedCacheType; + this.State = state; + this.CacheType = cacheType; + } + + /// + /// Gets the identity of the package to plan for. + /// + public string PackageId { get; private set; } + + /// + /// Gets the current state of the package. + /// + public PackageState CurrentState { get; private set; } + + /// + /// Gets whether any part of the package is cached. + /// + public bool Cached { get; private set; } + + /// + /// Gets the evaluated result of the package's install condition. + /// + public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT InstallCondition { get; private set; } + + /// + /// Gets the evaluated result of the package's repair condition. + /// + public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT RepairCondition { get; private set; } + + /// + /// Gets the recommended requested state for the package. + /// + public RequestState RecommendedState { get; private set; } + + /// + /// The authored cache type of the package. + /// + public BOOTSTRAPPER_CACHE_TYPE RecommendedCacheType { get; private set; } + + /// + /// Gets or sets the requested state for the package. + /// + public RequestState State { get; set; } + + /// + /// Gets or sets the requested cache type for the package. + /// + public BOOTSTRAPPER_CACHE_TYPE CacheType { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanCompatibleMsiPackageBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanCompatibleMsiPackageBeginEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool recommendedRemove, bool requestRemove, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.CompatiblePackageId = compatiblePackageId; + this.CompatiblePackageVersion = compatiblePackageVersion; + this.RecommendedRemove = recommendedRemove; + this.RequestRemove = requestRemove; + } + + /// + /// Gets the identity of the package that was not detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the compatible package detected. + /// + public string CompatiblePackageId { get; private set; } + + /// + /// Gets the version of the compatible package detected. + /// + public string CompatiblePackageVersion { get; private set; } + + /// + /// Gets the recommended state to use for the compatible package for planning. + /// + public bool RecommendedRemove { get; private set; } + + /// + /// Gets or sets whether to uninstall the compatible package. + /// + public bool RequestRemove { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanCompatibleMsiPackageCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanCompatibleMsiPackageCompleteEventArgs(string packageId, string compatiblePackageId, int hrStatus, bool requestedRemove) + : base(hrStatus) + { + this.PackageId = packageId; + this.CompatiblePackageId = compatiblePackageId; + this.RequestedRemove = requestedRemove; + } + + /// + /// Gets the identity of the package planned for. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the compatible package detected. + /// + public string CompatiblePackageId { get; private set; } + + /// + /// Gets the requested state of the package. + /// + public bool RequestedRemove { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanRollbackBoundaryEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanRollbackBoundaryEventArgs(string rollbackBoundaryId, bool recommendedTransaction, bool transaction, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.RollbackBoundaryId = rollbackBoundaryId; + this.RecommendedTransaction = recommendedTransaction; + this.Transaction = transaction; + } + + /// + /// Gets the identity of the rollback boundary to plan for. + /// + public string RollbackBoundaryId { get; private set; } + + /// + /// Whether or not the rollback boundary was authored to use an MSI transaction. + /// + public bool RecommendedTransaction { get; private set; } + + /// + /// Whether or not an MSI transaction will be used in the rollback boundary. + /// If is false, setting the value to true has no effect. + /// If is true, setting the value to false will cause the packages inside this rollback boundary to be executed without a wrapping MSI transaction. + /// + public bool Transaction { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanPatchTargetEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanPatchTargetEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ProductCode = productCode; + this.RecommendedState = recommendedState; + this.State = state; + } + + /// + /// Gets the identity of the patch's package. + /// + public string PackageId { get; private set; } + + /// + /// Gets the product code of the target. + /// + public string ProductCode { get; private set; } + + /// + /// Gets the recommended state of the patch to use by planning for the target. + /// + public RequestState RecommendedState { get; private set; } + + /// + /// Gets or sets the state of the patch to use by planning for the target. + /// + public RequestState State { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.FeatureId = featureId; + this.RecommendedState = recommendedState; + this.State = state; + } + + /// + /// Gets the identity of the feature's package to plan. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the feature to plan. + /// + public string FeatureId { get; private set; } + + /// + /// Gets the recommended feature state to use by planning. + /// + public FeatureState RecommendedState { get; private set; } + + /// + /// Gets or sets the feature state to use by planning. + /// + public FeatureState State { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanMsiPackageEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ShouldExecute = shouldExecute; + this.Action = action; + this.RecommendedFileVersioning = recommendedFileVersioning; + this.ActionMsiProperty = actionMsiProperty; + this.UiLevel = uiLevel; + this.DisableExternalUiHandler = disableExternalUiHandler; + this.FileVersioning = fileVersioning; + } + + /// + /// Gets identity of the package planned for. + /// + public string PackageId { get; private set; } + + /// + /// Gets whether the package is planned to execute or roll back. + /// + public bool ShouldExecute { get; private set; } + + /// + /// Gets the action planned for the package. + /// + public ActionState Action { get; private set; } + + /// + /// Gets the recommended file versioning for the package. + /// + public BOOTSTRAPPER_MSI_FILE_VERSIONING RecommendedFileVersioning { get; private set; } + + /// + /// Gets or sets the requested MSI property to add. + /// + public BURN_MSI_PROPERTY ActionMsiProperty { get; set; } + + /// + /// Gets or sets the requested internal UI level. + /// + public INSTALLUILEVEL UiLevel { get; set; } + + /// + /// Gets or sets whether Burn is requested to set up an external UI handler. + /// + public bool DisableExternalUiHandler { get; set; } + + /// + /// Gets or sets the requested file versioning. + /// + public BOOTSTRAPPER_MSI_FILE_VERSIONING FileVersioning { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanPackageCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanPackageCompleteEventArgs(string packageId, int hrStatus, RequestState requested) + : base(hrStatus) + { + this.PackageId = packageId; + this.Requested = requested; + } + + /// + /// Gets the identity of the package planned for. + /// + public string PackageId { get; private set; } + + /// + /// Gets the requested state for the package. + /// + public RequestState Requested { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlannedCompatiblePackageEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlannedCompatiblePackageEventArgs(string packageId, string compatiblePackageId, bool remove) + { + this.PackageId = packageId; + this.CompatiblePackageId = compatiblePackageId; + this.Remove = remove; + } + + /// + /// Gets the identity of the package planned for. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the compatible package detected. + /// + public string CompatiblePackageId { get; private set; } + + /// + /// Gets the planned state of the package. + /// + public bool Remove { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlannedPackageEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlannedPackageEventArgs(string packageId, ActionState execute, ActionState rollback, bool cache, bool uncache) + { + this.PackageId = packageId; + this.Execute = execute; + this.Rollback = rollback; + this.Cache = cache; + this.Uncache = uncache; + } + + /// + /// Gets the identity of the package planned for. + /// + public string PackageId { get; private set; } + + /// + /// Gets the planned execution action. + /// + public ActionState Execute { get; private set; } + + /// + /// Gets the planned rollback action. + /// + public ActionState Rollback { get; private set; } + + /// + /// Gets whether the package will be cached. + /// + public bool Cache { get; private set; } + + /// + /// Gets whether the package will be removed from the package cache. + /// + public bool Uncache { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class PlanCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanForwardCompatibleBundleEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle) + : base(cancelRecommendation) + { + this.BundleId = bundleId; + this.RelationType = relationType; + this.BundleTag = bundleTag; + this.PerMachine = perMachine; + this.Version = version; + this.RecommendedIgnoreBundle = recommendedIgnoreBundle; + this.IgnoreBundle = ignoreBundle; + } + + /// + /// Gets the identity of the forward compatible bundle detected. + /// + public string BundleId { get; private set; } + + /// + /// Gets the relationship type of the forward compatible bundle. + /// + public RelationType RelationType { get; private set; } + + /// + /// Gets the tag of the forward compatible bundle. + /// + public string BundleTag { get; private set; } + + /// + /// Gets whether the forward compatible bundle is per machine. + /// + public bool PerMachine { get; private set; } + + /// + /// Gets the version of the forward compatible bundle. + /// + public string Version { get; private set; } + + /// + /// Gets the recommendation of whether the engine should use the forward compatible bundle. + /// + public bool RecommendedIgnoreBundle { get; set; } + + /// + /// Gets or sets whether the engine will use the forward compatible bundle. + /// + public bool IgnoreBundle { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ApplyBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PhaseCount = phaseCount; + } + + /// + /// Gets the number of phases that the engine will go through in apply. + /// There are currently two possible phases: cache and execute. + /// + public int PhaseCount { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ElevateBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ElevateBeginEventArgs(bool cancelRecommendation) + : base(cancelRecommendation) + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class ElevateCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ElevateCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ProgressEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.ProgressPercentage = progressPercentage; + this.OverallPercentage = overallPercentage; + } + + /// + /// Gets the percentage from 0 to 100 completed for a package. + /// + public int ProgressPercentage { get; private set; } + + /// + /// Gets the percentage from 0 to 100 completed for the bundle. + /// + public int OverallPercentage { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ErrorEventArgs : ResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result) + : base(recommendation, result) + { + this.ErrorType = errorType; + this.PackageId = packageId; + this.ErrorCode = errorCode; + this.ErrorMessage = errorMessage; + this.UIHint = dwUIHint; + this.Data = new ReadOnlyCollection(data ?? new string[] { }); + } + + /// + /// Gets the type of error that occurred. + /// + public ErrorType ErrorType { get; private set; } + + /// + /// Gets the identity of the package that yielded the error. + /// + public string PackageId { get; private set; } + + /// + /// Gets the error code. + /// + public int ErrorCode { get; private set; } + + /// + /// Gets the error message. + /// + public string ErrorMessage { get; private set; } + + /// + /// Gets the recommended display flags for an error dialog. + /// + public int UIHint { get; private set; } + + /// + /// Gets the extended data for the error. + /// + public IList Data { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class RegisterBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public RegisterBeginEventArgs(RegistrationType recommendedRegistrationType, bool cancelRecommendation, RegistrationType registrationType) + : base(cancelRecommendation) + { + this.RecommendedRegistrationType = recommendedRegistrationType; + this.RegistrationType = registrationType; + } + + /// + /// Gets the recommended registration type. + /// + public RegistrationType RecommendedRegistrationType { get; private set; } + + /// + /// Gets or sets the registration type. + /// + public RegistrationType RegistrationType { get; set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class RegisterCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public RegisterCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class UnregisterBeginEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public UnregisterBeginEventArgs(RegistrationType recommendedRegistrationType, RegistrationType registrationType) + { + this.RecommendedRegistrationType = recommendedRegistrationType; + this.RegistrationType = registrationType; + } + + /// + /// Gets the recommended registration type. + /// + public RegistrationType RecommendedRegistrationType { get; private set; } + + /// + /// Gets or sets the registration type. + /// + public RegistrationType RegistrationType { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class UnregisterCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public UnregisterCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CacheBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheBeginEventArgs(bool cancelRecommendation) + : base(cancelRecommendation) + { + } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheAcquireBeginEventArgs : CancellableActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheAcquireBeginEventArgs(string packageOrContainerId, string payloadId, string source, string downloadUrl, string payloadContainerId, CacheOperation recommendation, CacheOperation action, bool cancelRecommendation) + : base(cancelRecommendation, recommendation, action) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + this.Source = source; + this.DownloadUrl = downloadUrl; + this.PayloadContainerId = payloadContainerId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload (if acquiring a payload). + /// + public string PayloadId { get; private set; } + + /// + /// Gets the source of the container or payload. + /// + public string Source { get; private set; } + + /// + /// Gets the optional URL to download container or payload. + /// + public string DownloadUrl { get; private set; } + + /// + /// Gets the optional identity of the container that contains the payload being acquired. + /// + public string PayloadContainerId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheAcquireProgressEventArgs : CacheProgressBaseEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) + { + } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheAcquireCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheAcquireCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload (if acquiring a payload). + /// + public string PayloadId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheVerifyProgressEventArgs : CacheProgressBaseEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, CacheVerifyStep verifyStep, bool cancelRecommendation) + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) + { + this.Step = verifyStep; + } + + /// + /// Gets the current verification step. + /// + public CacheVerifyStep Step { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CacheVerifyCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class CacheCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecuteBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageCount = packageCount; + } + + /// + /// Gets the number of packages to act on. + /// + public int PackageCount { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ShouldExecute = shouldExecute; + this.Action = action; + this.UiLevel = uiLevel; + this.DisableExternalUiHandler = disableExternalUiHandler; + } + + /// + /// Gets the identity of the package to act on. + /// + public string PackageId { get; private set; } + + /// + /// Gets whether the package is being executed or rolled back. + /// + public bool ShouldExecute { get; private set; } + + /// + /// Gets the action about to be executed. + /// + public ActionState Action { get; private set; } + + /// + /// Gets the internal UI level (if this is an MSI or MSP package). + /// + public INSTALLUILEVEL UiLevel { get; private set; } + + /// + /// Gets whether Burn will set up an external UI handler (if this is an MSI or MSP package). + /// + public bool DisableExternalUiHandler { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.TargetProductCode = targetProductCode; + } + + /// + /// Gets the identity of the package to act on. + /// + public string PackageId { get; private set; } + + /// + /// Gets the product code being targeted. + /// + public string TargetProductCode { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecuteMsiMessageEventArgs : ResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result) + : base(recommendation, result) + { + this.PackageId = packageId; + this.MessageType = messageType; + this.UIHint = dwUIHint; + this.Message = message; + this.Data = new ReadOnlyCollection(data ?? new string[] { }); + } + + /// + /// Gets the identity of the package that yielded this message. + /// + public string PackageId { get; private set; } + + /// + /// Gets the type of this message. + /// + public InstallMessage MessageType { get; private set; } + + /// + /// Gets the recommended display flags for this message. + /// + public int UIHint { get; private set; } + + /// + /// Gets the message. + /// + public string Message { get; private set; } + + /// + /// Gets the extended data for the message. + /// + public IList Data { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecuteFilesInUseEventArgs : ResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, FilesInUseType source, Result result) + : base(recommendation, result) + { + this.PackageId = packageId; + this.Files = new ReadOnlyCollection(files ?? new string[] { }); + this.Source = source; + } + + /// + /// Gets the identity of the package that yielded the files in use message. + /// + public string PackageId { get; private set; } + + /// + /// Gets the list of files in use. + /// + public IList Files { get; private set; } + + /// + /// Gets the source of the message. + /// + public FilesInUseType Source { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecutePackageCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.PackageId = packageId; + this.Restart = restart; + } + + /// + /// Gets the identity of the package that was acted on. + /// + public string PackageId { get; private set; } + + /// + /// Gets the package restart state after being applied. + /// + public ApplyRestart Restart { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class ExecuteCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ApplyCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.Restart = restart; + } + + /// + /// Gets the apply restart state when complete. + /// + public ApplyRestart Restart { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ApplyDowngradeEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ApplyDowngradeEventArgs(int hrRecommendation, int hrStatus) + { + this.Recommendation = hrRecommendation; + this.Status = hrStatus; + } + + /// + /// Gets the recommended HRESULT. + /// + public int Recommendation { get; private set; } + + /// + /// Gets or sets the HRESULT for Apply. + /// + public int Status { get; set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheAcquireResolvingEventArgs : CancellableActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheAcquireResolvingEventArgs(string packageOrContainerId, string payloadId, string[] searchPaths, bool foundLocal, int recommendedSearchPath, string downloadUrl, string payloadContainerId, CacheResolveOperation recommendation, int chosenSearchPath, CacheResolveOperation action, bool cancel) + : base(cancel, recommendation, action) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + this.SearchPaths = searchPaths; + this.FoundLocal = foundLocal; + this.RecommendedSearchPath = recommendedSearchPath; + this.DownloadUrl = downloadUrl; + this.PayloadContainerId = payloadContainerId; + this.ChosenSearchPath = chosenSearchPath; + } + + /// + /// Gets the identity of the package or container that is being acquired. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identity of the payload that is being acquired. + /// + public string PayloadId { get; private set; } + + /// + /// Gets the search paths used for source resolution. + /// + public string[] SearchPaths { get; private set; } + + /// + /// Gets whether indicates that a file was found at that search path. + /// + public bool FoundLocal { get; private set; } + + /// + /// When is true, the index to for the recommended local file. + /// + public int RecommendedSearchPath { get; private set; } + + /// + /// Gets the optional URL to download container or payload. + /// + public string DownloadUrl { get; private set; } + + /// + /// Gets the optional identity of the container that contains the payload being acquired. + /// + public string PayloadContainerId { get; private set; } + + /// + /// Gets or sets the index to to use when is set to . + /// + public int ChosenSearchPath { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CachePackageBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool vital, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.CachePayloads = cachePayloads; + this.PackageCacheSize = packageCacheSize; + this.Vital = vital; + } + + /// + /// Gets the identity of the package that is being cached. + /// + public string PackageId { get; private set; } + + /// + /// Gets number of payloads to be cached. + /// + public long CachePayloads { get; private set; } + + /// + /// Gets the size on disk required by the specific package. + /// + public long PackageCacheSize { get; private set; } + + /// + /// If caching a package is not vital, then acquisition will be skipped unless the BA opts in through . + /// + public bool Vital { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CachePackageCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.PackageId = packageId; + } + + /// + /// Gets the identity of the package that was cached. + /// + public string PackageId { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecuteProgressEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ProgressPercentage = progressPercentage; + this.OverallPercentage = overallPercentage; + } + + /// + /// Gets the identity of the package that was executed. + /// + public string PackageId { get; private set; } + + /// + /// Gets the percentage from 0 to 100 of the execution progress for a single payload. + /// + public int ProgressPercentage { get; private set; } + + /// + /// Gets the percentage from 0 to 100 of the execution progress for all payloads. + /// + public int OverallPercentage { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation) + : base(cancelRecommendation) + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class LaunchApprovedExeCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId) + : base(hrStatus) + { + this.ProcessId = processId; + } + + /// + /// Gets the ProcessId of the process that was launched. + /// This is only valid if the status reports success. + /// + public int ProcessId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class BeginMsiTransactionBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.TransactionId = transactionId; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class BeginMsiTransactionCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) + : base(hrStatus) + { + this.TransactionId = transactionId; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class CommitMsiTransactionBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.TransactionId = transactionId; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class CommitMsiTransactionCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.TransactionId = transactionId; + this.Restart = restart; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + + /// + /// Gets the package restart state after being applied. + /// + public ApplyRestart Restart { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class RollbackMsiTransactionBeginEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public RollbackMsiTransactionBeginEventArgs(string transactionId) + { + this.TransactionId = transactionId; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class RollbackMsiTransactionCompleteEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.TransactionId = transactionId; + this.Restart = restart; + } + + /// + /// Gets the MSI transaction Id. + /// + public string TransactionId { get; private set; } + + /// + /// Gets the package restart state after being applied. + /// + public ApplyRestart Restart { get; private set; } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class PauseAutomaticUpdatesBeginEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PauseAutomaticUpdatesBeginEventArgs() + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class PauseAutomaticUpdatesCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PauseAutomaticUpdatesCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class SystemRestorePointBeginEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public SystemRestorePointBeginEventArgs() + { + } + } + + /// + /// Event arguments for . + /// + [Serializable] + public class SystemRestorePointCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public SystemRestorePointCompleteEventArgs(int hrStatus) + : base(hrStatus) + { + } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheContainerOrPayloadVerifyBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheContainerOrPayloadVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CacheContainerOrPayloadVerifyProgressEventArgs : CacheProgressBaseEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheContainerOrPayloadVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) + : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CacheContainerOrPayloadVerifyCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CacheContainerOrPayloadVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus) + : base(hrStatus) + { + this.PackageOrContainerId = packageOrContainerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container or package. + /// + public string PackageOrContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CachePayloadExtractBeginEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePayloadExtractBeginEventArgs(string containerId, string payloadId, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.ContainerId = containerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container. + /// + public string ContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// EventArgs for . + /// + [Serializable] + public class CachePayloadExtractProgressEventArgs : CacheProgressBaseEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePayloadExtractProgressEventArgs(string containerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) + : base(containerId, payloadId, progress, total, overallPercentage, cancelRecommendation) + { + } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CachePayloadExtractCompleteEventArgs : StatusEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePayloadExtractCompleteEventArgs(string containerId, string payloadId, int hrStatus) + : base(hrStatus) + { + this.ContainerId = containerId; + this.PayloadId = payloadId; + } + + /// + /// Gets the identifier of the container. + /// + public string ContainerId { get; private set; } + + /// + /// Gets the identifier of the payload. + /// + public string PayloadId { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class PlanRestoreRelatedBundleEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public PlanRestoreRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.BundleId = bundleId; + this.RecommendedState = recommendedState; + this.State = state; + } + + /// + /// Gets the identity of the bundle to plan for. + /// + public string BundleId { get; private set; } + + /// + /// Gets the recommended requested state for the bundle. + /// + public RequestState RecommendedState { get; private set; } + + /// + /// Gets or sets the requested state for the bundle. + /// + public RequestState State { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class ExecuteProcessCancelEventArgs : HResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public ExecuteProcessCancelEventArgs(string packageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION action) + { + this.PackageId = packageId; + this.ProcessId = processId; + this.Recommendation = recommendation; + this.Action = action; + } + + /// + /// Gets the identity of the package. + /// + public string PackageId { get; private set; } + + /// + /// Gets the process id. + /// + public int ProcessId { get; private set; } + + /// + /// Gets the recommended action from the engine. + /// + public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Recommendation { get; private set; } + + /// + /// Gets or sets the action to be performed. This is passed back to the engine. + /// + public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Action { get; set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class DetectRelatedBundlePackageEventArgs : CancellableHResultEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public DetectRelatedBundlePackageEventArgs(string packageId, string productCode, RelationType relationType, bool perMachine, string version, bool cancelRecommendation) + : base(cancelRecommendation) + { + this.PackageId = packageId; + this.ProductCode = productCode; + this.RelationType = relationType; + this.PerMachine = perMachine; + this.Version = version; + } + + /// + /// Gets the identity of the product's package detected. + /// + public string PackageId { get; private set; } + + /// + /// Gets the identity of the related bundle detected. + /// + public string ProductCode { get; private set; } + + /// + /// Gets the relationship type of the related bundle. + /// + public RelationType RelationType { get; private set; } + + /// + /// Gets whether the detected bundle is per machine. + /// + public bool PerMachine { get; private set; } + + /// + /// Gets the version of the related bundle detected. + /// + public string Version { get; private set; } + } + + /// + /// Event arguments for + /// + [Serializable] + public class CachePackageNonVitalValidationFailureEventArgs : ActionEventArgs + { + /// + /// This class is for events raised by the engine. + /// It is not intended to be instantiated by user code. + /// + public CachePackageNonVitalValidationFailureEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action) + : base(hrStatus, recommendation, action) + { + this.PackageId = packageId; + } + + /// + /// Gets the identity of the package that was being validated. + /// + public string PackageId { get; private set; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs new file mode 100644 index 00000000..ad7f8dd7 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplication.cs @@ -0,0 +1,2013 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + /// + /// Allows customization of the bootstrapper application. + /// + [ComImport] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [Guid("53C31D56-49C0-426B-AB06-099D717C67FE")] + public interface IBootstrapperApplication + { + /// + /// Low level method that is called directly from the engine. + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int BAProc( + int message, + IntPtr pvArgs, + IntPtr pvResults + ); + + /// + /// Low level method that is called directly from the engine. + /// + void BAProcFallback( + int message, + IntPtr pvArgs, + IntPtr pvResults, + ref int phr + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCreate(IBootstrapperEngine engine, ref Command command); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDestroy(bool reload); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnStartup(); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectBegin( + [MarshalAs(UnmanagedType.Bool)] bool fCached, + [MarshalAs(UnmanagedType.U4)] RegistrationType registrationType, + [MarshalAs(UnmanagedType.U4)] int cPackages, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectForwardCompatibleBundle( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RelationType relationType, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, + [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectUpdateBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, + [MarshalAs(UnmanagedType.Bool)] ref bool fSkip + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectUpdate( + [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, + [MarshalAs(UnmanagedType.U8)] long dw64Size, + [MarshalAs(UnmanagedType.LPWStr)] string wzHash, + [MarshalAs(UnmanagedType.U4)] UpdateHashType hashAlgorithm, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.LPWStr)] string wzTitle, + [MarshalAs(UnmanagedType.LPWStr)] string wzSummary, + [MarshalAs(UnmanagedType.LPWStr)] string wzContentType, + [MarshalAs(UnmanagedType.LPWStr)] string wzContent, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, + [MarshalAs(UnmanagedType.Bool)] ref bool fStopProcessingUpdates + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectUpdateComplete( + int hrStatus, + [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreError + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectRelatedBundle( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RelationType relationType, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, + [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectPackageBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectCompatibleMsiPackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectRelatedMsiPackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzUpgradeCode, + [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, + [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectPatchTarget( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, + [MarshalAs(UnmanagedType.U4)] PackageState patchState, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectMsiFeature( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, + [MarshalAs(UnmanagedType.U4)] FeatureState state, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectPackageComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int hrStatus, + [MarshalAs(UnmanagedType.U4)] PackageState state, + [MarshalAs(UnmanagedType.Bool)] bool fCached + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectComplete( + int hrStatus, + [MarshalAs(UnmanagedType.Bool)] bool fEligibleForCleanup + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanBegin( + [MarshalAs(UnmanagedType.U4)] int cPackages, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanRelatedBundle( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, + [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanRollbackBoundary( + [MarshalAs(UnmanagedType.LPWStr)] string wzRollbackBoundaryId, + [MarshalAs(UnmanagedType.Bool)] bool fRecommendedTransaction, + [MarshalAs(UnmanagedType.Bool)] ref bool fTransaction, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanPackageBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] PackageState state, + [MarshalAs(UnmanagedType.Bool)] bool fCached, + [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, + [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, + [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, + [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, + [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, + [MarshalAs(UnmanagedType.U4)] ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanCompatibleMsiPackageBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, + [MarshalAs(UnmanagedType.Bool)] bool fRecommendedRemove, + [MarshalAs(UnmanagedType.Bool)] ref bool fRequestRemove, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanCompatibleMsiPackageComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, + int hrStatus, + [MarshalAs(UnmanagedType.Bool)] bool fRequestedRemove + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanPatchTarget( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, + [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, + [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanMsiFeature( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, + [MarshalAs(UnmanagedType.U4)] FeatureState recommendedState, + [MarshalAs(UnmanagedType.U4)] ref FeatureState pRequestedState, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanMsiPackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.Bool)] bool fExecute, + [MarshalAs(UnmanagedType.U4)] ActionState action, + [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, + [MarshalAs(UnmanagedType.U4)] ref BURN_MSI_PROPERTY actionMsiProperty, + [MarshalAs(UnmanagedType.U4)] ref INSTALLUILEVEL uiLevel, + [MarshalAs(UnmanagedType.Bool)] ref bool fDisableExternalUiHandler, + [MarshalAs(UnmanagedType.U4)] ref BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanPackageComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int hrStatus, + [MarshalAs(UnmanagedType.U4)] RequestState requested + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlannedCompatiblePackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, + [MarshalAs(UnmanagedType.Bool)] bool fRemove + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlannedPackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] ActionState execute, + [MarshalAs(UnmanagedType.U4)] ActionState rollback, + [MarshalAs(UnmanagedType.Bool)] bool fPlannedCache, + [MarshalAs(UnmanagedType.Bool)] bool fPlannedUncache + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnApplyBegin( + [MarshalAs(UnmanagedType.U4)] int dwPhaseCount, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnElevateBegin( + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnElevateComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnProgress( + [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnError( + [MarshalAs(UnmanagedType.U4)] ErrorType errorType, + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] int dwCode, + [MarshalAs(UnmanagedType.LPWStr)] string wzError, + [MarshalAs(UnmanagedType.I4)] int dwUIHint, + [MarshalAs(UnmanagedType.U4)] int cData, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, + [MarshalAs(UnmanagedType.I4)] Result nRecommendation, + [MarshalAs(UnmanagedType.I4)] ref Result pResult + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnRegisterBegin( + [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, + [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnRegisterComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheBegin( + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePackageBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] int cCachePayloads, + [MarshalAs(UnmanagedType.U8)] long dw64PackageCacheSize, + [MarshalAs(UnmanagedType.Bool)] bool fVital, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheAcquireBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPWStr)] string wzSource, + [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, + [MarshalAs(UnmanagedType.U4)] CacheOperation recommendation, + [MarshalAs(UnmanagedType.I4)] ref CacheOperation action, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheAcquireProgress( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.U8)] long dw64Progress, + [MarshalAs(UnmanagedType.U8)] long dw64Total, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheAcquireResolving( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3, ArraySubType = UnmanagedType.LPWStr), In] string[] searchPaths, + [MarshalAs(UnmanagedType.U4)] int cSearchPaths, + [MarshalAs(UnmanagedType.Bool)] bool fFoundLocal, + [MarshalAs(UnmanagedType.U4)] int dwRecommendedSearchPath, + [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, + [MarshalAs(UnmanagedType.I4)] CacheResolveOperation recommendation, + [MarshalAs(UnmanagedType.U4)] ref int dwChosenSearchPath, + [MarshalAs(UnmanagedType.I4)] ref CacheResolveOperation action, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheAcquireComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + int hrStatus, + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, + ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheVerifyBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheVerifyProgress( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.U8)] long dw64Progress, + [MarshalAs(UnmanagedType.U8)] long dw64Total, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.I4)] CacheVerifyStep verifyStep, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheVerifyComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + int hrStatus, + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, + ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePackageComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int hrStatus, + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, + ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action + ); + + /// + /// See . + /// + /// + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteBegin( + [MarshalAs(UnmanagedType.U4)] int cExecutingPackages, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecutePackageBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.Bool)] bool fExecute, + [MarshalAs(UnmanagedType.U4)] ActionState action, + [MarshalAs(UnmanagedType.U4)] INSTALLUILEVEL uiLevel, + [MarshalAs(UnmanagedType.Bool)] bool fDisableExternalUiHandler, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecutePatchTarget( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzTargetProductCode, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteProgress( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteMsiMessage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] InstallMessage messageType, + [MarshalAs(UnmanagedType.I4)] int dwUIHint, + [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, + [MarshalAs(UnmanagedType.U4)] int cData, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, + [MarshalAs(UnmanagedType.I4)] Result nRecommendation, + [MarshalAs(UnmanagedType.I4)] ref Result pResult + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteFilesInUse( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.U4)] int cFiles, + [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzFiles, + [MarshalAs(UnmanagedType.I4)] Result nRecommendation, + [MarshalAs(UnmanagedType.I4)] FilesInUseType source, + [MarshalAs(UnmanagedType.I4)] ref Result pResult + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecutePackageComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int hrStatus, + [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, + [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, + [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnUnregisterBegin( + [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, + [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnUnregisterComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnApplyComplete( + int hrStatus, + [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, + [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, + [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnLaunchApprovedExeBegin( + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnLaunchApprovedExeComplete( + int hrStatus, + int processId + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnBeginMsiTransactionBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnBeginMsiTransactionComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCommitMsiTransactionBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCommitMsiTransactionComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, + int hrStatus, + [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, + [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, + [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnRollbackMsiTransactionBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnRollbackMsiTransactionComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, + int hrStatus, + [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, + [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, + [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPauseAutomaticUpdatesBegin( + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPauseAutomaticUpdatesComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnSystemRestorePointBegin( + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnSystemRestorePointComplete( + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanForwardCompatibleBundle( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RelationType relationType, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, + [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.Bool)] bool fRecommendedIgnoreBundle, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, + [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheContainerOrPayloadVerifyBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheContainerOrPayloadVerifyProgress( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.U8)] long dw64Progress, + [MarshalAs(UnmanagedType.U8)] long dw64Total, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCacheContainerOrPayloadVerifyComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePayloadExtractBegin( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePayloadExtractProgress( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.U8)] long dw64Progress, + [MarshalAs(UnmanagedType.U8)] long dw64Total, + [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePayloadExtractComplete( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanRestoreRelatedBundle( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, + [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnPlanRelatedBundleType( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RelatedBundlePlanType recommendedType, + [MarshalAs(UnmanagedType.U4)] ref RelatedBundlePlanType pRequestedType, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnApplyDowngrade( + [MarshalAs(UnmanagedType.I4)] int hrRecommended, + [MarshalAs(UnmanagedType.I4)] ref int hrStatus + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnExecuteProcessCancel( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int processId, + [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, + [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnDetectRelatedBundlePackage( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.U4)] RelationType relationType, + [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.Bool)] ref bool fCancel + ); + + /// + /// See . + /// + [PreserveSig] + [return: MarshalAs(UnmanagedType.I4)] + int OnCachePackageNonVitalValidationFailure( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, + int hrStatus, + BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, + ref BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action + ); + } + + /// + /// The display level for the BA. + /// + public enum Display + { + /// + /// Invalid value. + /// + Unknown, + + /// + /// The bundle is being run through the Burn protocol by an external application. + /// + Embedded, + + /// + /// No UI should be shown. + /// + None, + + /// + /// The UI should not require any interaction from the user. + /// + Passive, + + /// + /// The UI should be fully interactive. + /// + Full, + } + + /// + /// Messages from Windows Installer (msi.h). + /// + public enum InstallMessage + { + /// + /// premature termination, possibly fatal OOM + /// + FatalExit, + + /// + /// formatted error message + /// + Error = 0x01000000, + + /// + /// formatted warning message + /// + Warning = 0x02000000, + + /// + /// user request message + /// + User = 0x03000000, + + /// + /// informative message for log + /// + Info = 0x04000000, + + /// + /// list of files in use that need to be replaced + /// + FilesInUse = 0x05000000, + + /// + /// request to determine a valid source location + /// + ResolveSource = 0x06000000, + + /// + /// insufficient disk space message + /// + OutOfDiskSpace = 0x07000000, + + /// + /// start of action: action name & description + /// + ActionStart = 0x08000000, + + /// + /// formatted data associated with individual action item + /// + ActionData = 0x09000000, + + /// + /// progress gauge info: units so far, total + /// + Progress = 0x0a000000, + + /// + /// product info for dialog: language Id, dialog caption + /// + CommonData = 0x0b000000, + + /// + /// sent prior to UI initialization, no string data + /// + Initialize = 0x0c000000, + + /// + /// sent after UI termination, no string data + /// + Terminate = 0x0d000000, + + /// + /// sent prior to display or authored dialog or wizard + /// + ShowDialog = 0x0e000000, + + /// + /// log only, to log performance number like action time + /// + Performance = 0x0f000000, + + /// + /// the list of apps that the user can request Restart Manager to shut down and restart + /// + RMFilesInUse = 0x19000000, + + /// + /// sent prior to server-side install of a product + /// + InstallStart = 0x1a000000, + + /// + /// sent after server-side install + /// + InstallEnd = 0x1B000000, + } + + /// + /// The action to perform when a reboot is necessary. + /// + public enum Restart + { + /// + /// Invalid value. + /// + Unknown, + + /// + /// The bundle should never initiate a restart. + /// + Never, + + /// + /// The bundle should prompt the user whether to restart. + /// + Prompt, + + /// + /// The bundle should restart if necessary. + /// + Automatic, + + /// + /// The bundle should always restart when given the option. + /// + Always, + } + + /// + /// The display name to use when registering in Add/Remove Programs. + /// + public enum RegistrationType + { + /// + /// No registration. + /// The engine will ignore None if it recommended InProgress or Full. + /// + None, + + /// + /// The in-progress display name. + /// + InProgress, + + /// + /// The default display name. + /// + Full, + } + + /// + /// Result codes (based on Dialog Box Command IDs from WinUser.h). + /// + public enum Result + { + /// + /// An error occurred. + /// + Error = -1, + + /// + /// Invalid value. + /// + None, + + /// + /// IDOK + /// + Ok, + + /// + /// IDCANCEL + /// + Cancel, + + /// + /// IDABORT + /// + Abort, + + /// + /// IDRETRY + /// + Retry, + + /// + /// IDIGNORE + /// + Ignore, + + /// + /// IDYES + /// + Yes, + + /// + /// IDNO + /// + No, + + /// + /// IDCLOSE + /// + Close, + + /// + /// IDHELP + /// + Help, + + /// + /// IDTRYAGAIN + /// + TryAgain, + + /// + /// IDCONTINUE + /// + Continue, + } + + /// + /// Describes why a bundle or packaged is being resumed. + /// + public enum ResumeType + { + /// + /// No resume information. + /// + None, + + /// + /// Resume information exists but is invalid. + /// + Invalid, + + /// + /// The bundle was re-launched after an unexpected interruption. + /// + Interrupted, + + /// + /// The bundle was re-launched after a reboot. + /// + Reboot, + + /// + /// The bundle was re-launched after being suspended. + /// + Suspend, + + /// + /// The bundle was launched from Add/Remove Programs. + /// + Arp, + } + + /// + /// Indicates what caused the error. + /// + public enum ErrorType + { + /// + /// The error occurred trying to elevate. + /// + Elevate, + + /// + /// The error came from the Windows Installer. + /// + WindowsInstaller, + + /// + /// The error came from an EXE Package. + /// + ExePackage, + + /// + /// The error came while trying to authenticate with an HTTP server. + /// + HttpServerAuthentication, + + /// + /// The error came while trying to authenticate with an HTTP proxy. + /// + HttpProxyAuthentication, + + /// + /// The error occurred during apply. + /// + Apply, + }; + + /// + /// Indicates the source of the FilesInUse message. + /// + public enum FilesInUseType + { + /// + /// Generated from INSTALLMESSAGE_FILESINUSE. + /// + Msi, + /// + /// Generated from INSTALLMESSAGE_RMFILESINUSE. + /// + MsiRm, + /// + /// Generated from MMIO_CLOSE_APPS. + /// + Netfx, + } + + /// + /// The calculated operation for the related MSI package. + /// + public enum RelatedOperation + { + /// + /// No relation. + /// + None, + + /// + /// The related bundle or package will be downgraded. + /// + Downgrade, + + /// + /// The related package will be upgraded as a minor revision. + /// + MinorUpdate, + + /// + /// The related bundle or package will be upgraded as a major revision. + /// + MajorUpgrade, + + /// + /// The related bundle will be removed. + /// + Remove, + + /// + /// The related bundle will be installed. + /// + Install, + + /// + /// The related bundle will be repaired. + /// + Repair, + }; + + /// + /// The cache operation used to acquire a container or payload. + /// + public enum CacheOperation + { + /// + /// There is no source available. + /// + None, + + /// + /// Copy the payload or container from the chosen local source. + /// + Copy, + + /// + /// Download the payload or container using the download URL. + /// + Download, + + /// + /// Extract the payload from the container. + /// + Extract, + } + + /// + /// The source to be used to acquire a container or payload. + /// + public enum CacheResolveOperation + { + /// + /// There is no source available. + /// + None, + + /// + /// Copy the payload or container from the chosen local source. + /// + Local, + + /// + /// Download the payload or container from the download URL. + /// + Download, + + /// + /// Extract the payload from the container. + /// + Container, + + /// + /// Look again for the payload or container locally. + /// + Retry, + } + + /// + /// The current step when verifying a container or payload. + /// + public enum CacheVerifyStep + { + /// + /// Copying or moving the file from the working path to the unverified path. + /// Not used during Layout. + /// + Stage, + /// + /// Hashing the file. + /// + Hash, + /// + /// Copying or moving the file to the final location. + /// + Finalize, + } + + /// + /// The restart state after a package or all packages were applied. + /// + public enum ApplyRestart + { + /// + /// Package or chain does not require a restart. + /// + None, + + /// + /// Package or chain requires a restart but it has not been initiated yet. + /// + RestartRequired, + + /// + /// Package or chain has already initiated the restart. + /// + RestartInitiated + } + + /// + /// The relation type for related bundles. + /// + public enum RelationType + { + /// + /// No relation. + /// + None, + + /// + /// The related bundle is detected by the running bundle. + /// This relationship is reversed for + /// + Detect, + + /// + /// The related bundle shares an upgrade code with the running bundle. + /// This relationship is reversed for + /// + Upgrade, + + /// + /// The related bundle is an add-on for the running bundle. + /// This relationship is reversed for + /// + Addon, + + /// + /// The related bundle is a patch for the running bundle. + /// This relationship is reversed for + /// + Patch, + + /// + /// The running bundle is an add-on for the related bundle. + /// This relationship is reversed for + /// + DependentAddon, + + /// + /// The running bundle is a patch for the related bundle. + /// This relationship is reversed for + /// + DependentPatch, + + /// + /// The related bundle is a newer version of the running bundle. + /// This relationship is reversed for + /// + Update, + + /// + /// The related bundle is in the running bundle's chain. + /// This relationship is reversed for + /// + ChainPackage, + } + + /// + /// The planned relation type for related bundles. + /// + public enum RelatedBundlePlanType + { + /// + /// Don't execute the related bundle. + /// + None, + + /// + /// The running bundle is a downgrade for the related bundle. + /// + Downgrade, + + /// + /// The running bundle is an upgrade for the related bundle. + /// + Upgrade, + + /// + /// The related bundle is an add-on of the running bundle. + /// + Addon, + + /// + /// The related bundle is a patch for the running bundle. + /// + Patch, + + /// + /// The running bundle is an add-on for the related bundle. + /// + DependentAddon, + + /// + /// The running bundle is a patch for the related bundle. + /// + DependentPatch, + } + + /// + /// One or more reasons why the application is requested to be closed or is being closed. + /// + [Flags] + public enum EndSessionReasons + { + /// + /// The system is shutting down or restarting (it is not possible to determine which event is occurring). + /// + Unknown, + + /// + /// The application is using a file that must be replaced, the system is being serviced, or system resources are exhausted. + /// + CloseApplication, + + /// + /// The application is forced to shut down. + /// + Critical = 0x40000000, + + /// + /// The user is logging off. + /// + Logoff = unchecked((int)0x80000000) + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to restart. + /// The engine will not launch again after the machine is rebooted. + /// Ignored if reboot was already initiated by . + /// + Restart, + } + + /// + /// The cache strategy to be used for the package. + /// + public enum BOOTSTRAPPER_CACHE_TYPE + { + /// + /// The package will be cached in order to securely run the package, but will always be cleaned from the cache at the end. + /// + Remove, + + /// + /// The package will be cached in order to run the package, and then kept in the cache until the package is uninstalled. + /// + Keep, + + /// + /// The package will always be cached and stay in the cache, unless the package and bundle are both being uninstalled. + /// + Force, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to try the acquisition of the payload again. + /// Ignored if hrStatus is a success. + /// + Retry, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to ignore non-vital package failures and continue with the caching. + /// Ignored if hrStatus is a success or the package is vital. + /// + Ignore, + + /// + /// Instructs the engine to try the acquisition and verification of the package again. + /// Ignored if hrStatus is a success. + /// + Retry, + } + + /// + /// The available actions for + /// + public enum BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to try to acquire the package so execution can use it. + /// Most of the time this is used for installing the package during rollback. + /// + Acquire, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Ignored if hrStatus is a success. + /// + RetryVerification, + + /// + /// Ignored if hrStatus is a success. + /// + RetryAcquisition, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to ignore non-vital package failures and continue with the install. + /// Ignored if hrStatus is a success or the package is vital. + /// + Ignore, + + /// + /// Instructs the engine to try the execution of the package again. + /// Ignored if hrStatus is a success. + /// + Retry, + + /// + /// Instructs the engine to stop processing the chain and restart. + /// The engine will launch again after the machine is restarted. + /// + Restart, + + /// + /// Instructs the engine to stop processing the chain and suspend the current state. + /// + Suspend, + } + + /// + /// The available actions for and . + /// + public enum BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to stop processing the chain and restart. + /// The engine will launch again after the machine is restarted. + /// + Restart, + }; + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION + { + /// + /// Instructs the engine to stop waiting for the process to exit. + /// The package is immediately considered to have failed with ERROR_INSTALL_USEREXIT. + /// The engine will never rollback the package. + /// + Abandon, + + /// + /// Instructs the engine to wait for the process to exit. + /// Once the process has exited, the package is considered to have failed with ERROR_INSTALL_USEREXIT. + /// This allows the engine to rollback the package if necessary. + /// + Wait, + } + + /// + /// The result of evaluating a condition from a package. + /// + public enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT + { + /// + /// No condition was authored. + /// + Default, + + /// + /// Evaluated to false. + /// + False, + + /// + /// Evaluated to true. + /// + True, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION + { + /// + /// Instructs the engine that the source can't be found. + /// + None, + + /// + /// Instructs the engine to try the local source again. + /// + Retry, + + /// + /// Instructs the engine to try the download source. + /// + Download, + } + + /// + /// The available actions for . + /// + public enum BOOTSTRAPPER_SHUTDOWN_ACTION + { + /// + /// Instructs the engine to not take any special action. + /// + None, + + /// + /// Instructs the engine to restart. + /// The engine will not launch again after the machine is rebooted. + /// Ignored if reboot was already initiated by . + /// + Restart, + + /// + /// Instructs the engine to unload the bootstrapper application and + /// restart the engine which will load the bootstrapper application again. + /// Typically used to switch from a native bootstrapper application to a managed one. + /// + ReloadBootstrapper, + + /// + /// Opts out of the engine behavior of trying to uninstall itself when no non-permanent packages are installed. + /// + SkipCleanup, + } + + /// + /// The file versioning options for REINSTALLMODE, see https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode. + /// + public enum BOOTSTRAPPER_MSI_FILE_VERSIONING + { + /// + /// o + /// + Older, + /// + /// e + /// + Equal, + /// + /// a + /// + All, + } + + /// + /// The property Burn will add so the MSI can know the planned action for the package. + /// + public enum BURN_MSI_PROPERTY + { + /// + /// No property will be added. + /// + None, + + /// + /// Add BURNMSIINSTALL=1 + /// + Install, + + /// + /// Add BURNMSIMODFIY=1 + /// + Modify, + + /// + /// Add BURNMSIREPAIR=1 + /// + Repair, + + /// + /// Add BURNMSIUNINSTALL=1 + /// + Uninstall, + } + + /// + /// From msi.h + /// https://docs.microsoft.com/en-us/windows/win32/api/msi/nf-msi-msisetinternalui + /// + [Flags] + public enum INSTALLUILEVEL + { + /// + /// UI level is unchanged + /// + NoChange = 0, + + /// + /// default UI is used + /// + Default = 1, + + /// + /// completely silent installation + /// + None = 2, + + /// + /// simple progress and error handling + /// + Basic = 3, + + /// + /// authored UI, wizard dialogs suppressed + /// + Reduced = 4, + + /// + /// authored UI with wizards, progress, errors + /// + Full = 5, + + /// + /// display success/failure dialog at end of install + /// + EndDialog = 0x80, + + /// + /// display only progress dialog + /// + ProgressOnly = 0x40, + + /// + /// do not display the cancel button in basic UI + /// + HideCancel = 0x20, + + /// + /// force display of source resolution even if quiet + /// + SourceResOnly = 0x100, + + /// + /// show UAC prompt even if quiet + /// Can only be used if on Windows Installer 5.0 or later + /// + UacOnly = 0x200, + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationData.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationData.cs new file mode 100644 index 00000000..d26d89c1 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationData.cs @@ -0,0 +1,22 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System.IO; + + /// + /// Interface for BootstrapperApplicationData.xml. + /// + public interface IBootstrapperApplicationData + { + /// + /// The BootstrapperApplicationData.xml file. + /// + FileInfo BADataFile { get; } + + /// + /// The BA manifest. + /// + IBundleInfo Bundle { get; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationFactory.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationFactory.cs new file mode 100644 index 00000000..ac90c0b7 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperApplicationFactory.cs @@ -0,0 +1,22 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.CodeDom.Compiler; + using System.Runtime.InteropServices; + + /// + /// This is no longer used. + /// + [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] + public interface IBootstrapperApplicationFactory + { + /// + /// This is no longer used. + /// + /// This is no longer used. + /// This is no longer used. + void Create(IntPtr pArgs, IntPtr pResults); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs new file mode 100644 index 00000000..a1f8bfe0 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperCommand.cs @@ -0,0 +1,79 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + + /// + /// Command information passed from the engine for the BA to perform. + /// + public interface IBootstrapperCommand + { + /// + /// Gets the action for the BA to perform. + /// + LaunchAction Action { get; } + + /// + /// Gets the display level for the BA. + /// + Display Display { get; } + + /// + /// Gets the command line arguments. + /// + /// + /// Command line arguments not handled by the engine. + /// + string CommandLine { get; } + + /// + /// Hint for the initial visibility of the window. + /// + int CmdShow { get; } + + /// + /// Gets the method of how the engine was resumed from a previous installation step. + /// + ResumeType Resume { get; } + + /// + /// Gets the handle to the splash screen window. If no splash screen was displayed this value will be IntPtr.Zero. + /// + IntPtr SplashScreen { get; } + + /// + /// If this was run from a related bundle, specifies the relation type. + /// + RelationType Relation { get; } + + /// + /// If this was run from a backward compatible bundle. + /// + bool Passthrough { get; } + + /// + /// Gets layout directory. + /// + string LayoutDirectory { get; } + + /// + /// Gets bootstrapper working folder. + /// + string BootstrapperWorkingFolder { get; } + + /// + /// Gets path to BootstrapperApplicationData.xml. + /// + string BootstrapperApplicationDataPath { get; } + + /// + /// Parses the command line arguments into an . + /// + /// + /// The parsed information. + /// + /// The command line could not be parsed. + IMbaCommand ParseCommandLine(); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs new file mode 100644 index 00000000..1e91cd31 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBootstrapperEngine.cs @@ -0,0 +1,501 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.CodeDom.Compiler; + using System.Runtime.InteropServices; + using System.Text; + + /// + /// Allows calls into the bootstrapper engine. + /// + [ComImport] + [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] + [Guid("6480D616-27A0-44D7-905B-81512C29C2FB")] + [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] + public interface IBootstrapperEngine + { + /// + /// See . + /// + void GetPackageCount( + [MarshalAs(UnmanagedType.U4)] out int pcPackages + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableNumeric( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + out long pllValue + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableString( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + + /// + /// See . + /// + [PreserveSig] + int GetVariableVersion( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + + /// + /// See . + /// + [PreserveSig] + int FormatString( + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, + ref IntPtr pcchOut + ); + + /// + /// See . + /// + [PreserveSig] + int EscapeString( + [MarshalAs(UnmanagedType.LPWStr)] string wzIn, + [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, + ref IntPtr pcchOut + ); + + /// + /// See . + /// + void EvaluateCondition( + [MarshalAs(UnmanagedType.LPWStr)] string wzCondition, + [MarshalAs(UnmanagedType.Bool)] out bool pf + ); + + /// + /// See . + /// + void Log( + [MarshalAs(UnmanagedType.U4)] LogLevel level, + [MarshalAs(UnmanagedType.LPWStr)] string wzMessage + ); + + /// + /// See . + /// + void SendEmbeddedError( + [MarshalAs(UnmanagedType.U4)] int dwErrorCode, + [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, + [MarshalAs(UnmanagedType.U4)] int dwUIHint, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + void SendEmbeddedProgress( + [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, + [MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + void SetUpdate( + [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, + [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, + [MarshalAs(UnmanagedType.U8)] long qwValue, + [MarshalAs(UnmanagedType.U4)] UpdateHashType hashType, + [MarshalAs(UnmanagedType.LPWStr)] string wzHash, + [MarshalAs(UnmanagedType.LPWStr)] string wzUpdatePackageId + ); + + /// + /// See . + /// + void SetLocalSource( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPath + ); + + /// + /// See . + /// + void SetDownloadSource( + [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, + [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, + [MarshalAs(UnmanagedType.LPWStr)] string wzUrl, + [MarshalAs(UnmanagedType.LPWStr)] string wzUser, + [MarshalAs(UnmanagedType.LPWStr)] string wzPassword + ); + + /// + /// See . + /// + void SetVariableNumeric( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + long llValue + ); + + /// + /// See . + /// + void SetVariableString( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + [MarshalAs(UnmanagedType.Bool)] bool fFormatted + ); + + /// + /// See . + /// + void SetVariableVersion( + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue + ); + + /// + /// See . + /// + void CloseSplashScreen(); + + /// + /// See . + /// + void Detect( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Plan( + [MarshalAs(UnmanagedType.U4)] LaunchAction action + ); + + /// + /// See . + /// + [PreserveSig] + int Elevate( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Apply( + IntPtr hwndParent + ); + + /// + /// See . + /// + void Quit( + [MarshalAs(UnmanagedType.U4)] int dwExitCode + ); + + /// + /// See . + /// + void LaunchApprovedExe( + IntPtr hwndParent, + [MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId, + [MarshalAs(UnmanagedType.LPWStr)] string wzArguments, + [MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout + ); + + /// + /// Sets the URL to the update feed. + /// + void SetUpdateSource( + [MarshalAs(UnmanagedType.LPWStr)] string url + ); + + /// + /// See . + /// + void CompareVersions( + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion1, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion2, + [MarshalAs(UnmanagedType.I4)] out int pnResult + ); + + /// + /// See . + /// + [PreserveSig] + int GetRelatedBundleVariable( + [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, + [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, + IntPtr wzValue, + ref IntPtr pcchValue + ); + } + + /// + /// The installation action for the bundle or current package. + /// + public enum ActionState + { + /// + /// No action. + /// + None, + + /// + /// Uninstall action. + /// + Uninstall, + + /// + /// Install action. + /// + Install, + + /// + /// Modify action. + /// + Modify, + + /// + /// Repair action. + /// + Repair, + + /// + /// Minor upgrade action. + /// + MinorUpgrade, + } + + /// + /// The action for the bundle to perform. + /// + public enum LaunchAction + { + /// + /// Invalid action. + /// + Unknown, + + /// + /// Provide help information. + /// + Help, + + /// + /// Layout the bundle on disk, normally to prepare for offline installation. + /// + Layout, + + /// + /// Same as Uninstall, except it will always remove itself from the package cache and Add/Remove Programs. + /// This should only be used to remove corrupt bundles since it might not properly clean up its packages. + /// + UnsafeUninstall, + + /// + /// Uninstall the bundle. + /// + Uninstall, + + /// + /// Cache the bundle and its packages. + /// + Cache, + + /// + /// Install the bundle. + /// + Install, + + /// + /// Modify the bundle. + /// + Modify, + + /// + /// Repair the bundle + /// + Repair, + + /// + /// Launch the update registered with and then exit without waiting for it to complete. + /// + UpdateReplace, + + /// + /// Launch the update registered with as an embedded bundle. + /// + UpdateReplaceEmbedded, + } + + /// + /// The message log level. + /// + public enum LogLevel + { + /// + /// No logging level (generic). + /// + None, + + /// + /// User messages. + /// + Standard, + + /// + /// Verbose messages. + /// + Verbose, + + /// + /// Messages for debugging. + /// + Debug, + + /// + /// Error messages. + /// + Error, + } + + /// + /// Type of hash used for update bundle. + /// + public enum UpdateHashType + { + /// + /// No hash provided. + /// + None, + + /// + /// SHA-512 based hash provided. + /// + Sha512, + } + + /// + /// Describes the state of an installation package. + /// + public enum PackageState + { + /// + /// Invalid state. + /// + Unknown, + + /// + /// The package is not on the machine (except possibly MspPackage) and should not be installed. + /// + Obsolete, + + /// + /// The package is not installed. + /// + Absent, + + /// + /// The package is installed. + /// + Present, + + /// + /// The package is on the machine but not active, so only uninstall operations are allowed. + /// + Superseded, + + /// + /// This value is no longer used. See the DetectPackageCompleteEventArgs.Cached value instead. + /// + [Obsolete("Use DetectPackageCompleteEventArgs.Cached instead.")] + Cached = Present, + } + + /// + /// Indicates the state desired for an installation package. + /// + public enum RequestState + { + /// + /// No change requested. + /// + None, + + /// + /// As long as there are no dependents, the package will be uninstalled. + /// There are some packages that can't be uninstalled, such as an ExePackage without an UninstallCommand. + /// + ForceAbsent, + + /// + /// Request the package to not be installed on the machine. + /// + Absent, + + /// + /// Request the package to be cached and not be installed on the machine. + /// + Cache, + + /// + /// Request the package to be installed on the machine. + /// + Present, + + /// + /// Force the bundle to install the package. + /// + ForcePresent, + + /// + /// Request the package to be repaired. + /// + Repair, + } + + /// + /// Indicates the state of a feature. + /// See https://learn.microsoft.com/en-us/windows/win32/api/msi/nf-msi-msiqueryfeaturestatew. + /// + public enum FeatureState + { + /// + /// Invalid state. + /// + Unknown, + + /// + /// INSTALLSTATE_ABSENT + /// + Absent, + + /// + /// INSTALLSTATE_ADVERTISED + /// + Advertised, + + /// + /// INSTALLSTATE_LOCAL + /// + Local, + + /// + /// INSTALLSTATE_SOURCE + /// + Source, + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IBundleInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBundleInfo.cs new file mode 100644 index 00000000..a4d07597 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IBundleInfo.cs @@ -0,0 +1,54 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System.Collections.Generic; + + /// + /// BA manifest data. + /// + public interface IBundleInfo + { + /// + /// The name of the variable that contains the path to the bundle's log. + /// + string LogVariable { get; } + + /// + /// Bundle/@Name + /// + string Name { get; } + + /// + /// Variables that were marked with bal:Overridable="yes". + /// + IOverridableVariables OverridableVariables { get; } + + /// + /// The packages in the bundle's chain. + /// + IDictionary Packages { get; } + + /// + /// Whether the bundle is per-machine or per-user. + /// + bool PerMachine { get; } + + /// + /// Adds a related bundle as a package. + /// + /// + /// + /// + /// + /// The created . + IPackageInfo AddRelatedBundleAsPackage(string productCode, RelationType relationType, bool perMachine, string version); + + /// + /// Adds an update bundle as a package. + /// + /// Package id added as update bundle. + /// The created . + IPackageInfo AddUpdateBundleAsPackage(string packageId); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IDefaultBootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IDefaultBootstrapperApplication.cs new file mode 100644 index 00000000..ad51b2be --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IDefaultBootstrapperApplication.cs @@ -0,0 +1,436 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + + /// + /// Interface for built-in implementation of . + /// + public interface IDefaultBootstrapperApplication : IBootstrapperApplication + { + /// + /// Fired when the engine has begun installing the bundle. + /// + event EventHandler ApplyBegin; + + /// + /// Fired when the engine has completed installing the bundle. + /// + event EventHandler ApplyComplete; + + /// + /// Fired when the plan determined that nothing should happen to prevent downgrading. + /// + event EventHandler ApplyDowngrade; + + /// + /// Fired when the engine is about to begin an MSI transaction. + /// + event EventHandler BeginMsiTransactionBegin; + + /// + /// Fired when the engine has completed beginning an MSI transaction. + /// + event EventHandler BeginMsiTransactionComplete; + + /// + /// Fired when the engine has begun acquiring the payload or container. + /// The BA can change the source using + /// or . + /// + event EventHandler CacheAcquireBegin; + + /// + /// Fired when the engine has completed the acquisition of the payload or container. + /// The BA can change the source using + /// or . + /// + event EventHandler CacheAcquireComplete; + + /// + /// Fired when the engine has progress acquiring the payload or container. + /// + event EventHandler CacheAcquireProgress; + + /// + /// Fired by the engine to allow the BA to override the acquisition action. + /// + event EventHandler CacheAcquireResolving; + + /// + /// Fired when the engine has begun caching the installation sources. + /// + event EventHandler CacheBegin; + + /// + /// Fired after the engine has cached the installation sources. + /// + event EventHandler CacheComplete; + + /// + /// Fired when the engine begins the verification of the payload or container that was already in the package cache. + /// + event EventHandler CacheContainerOrPayloadVerifyBegin; + + /// + /// Fired when the engine has completed the verification of the payload or container that was already in the package cache. + /// + event EventHandler CacheContainerOrPayloadVerifyComplete; + + /// + /// Fired when the engine has progress verifying the payload or container that was already in the package cache. + /// + event EventHandler CacheContainerOrPayloadVerifyProgress; + + /// + /// Fired when the engine has begun caching a specific package. + /// + event EventHandler CachePackageBegin; + + /// + /// Fired when the engine has completed caching a specific package. + /// + event EventHandler CachePackageComplete; + + /// + /// Fired when the engine failed validating a package in the package cache that is non-vital to execution. + /// + event EventHandler CachePackageNonVitalValidationFailure; + + /// + /// Fired when the engine begins the extraction of the payload from the container. + /// + event EventHandler CachePayloadExtractBegin; + + /// + /// Fired when the engine has completed the extraction of the payload from the container. + /// + event EventHandler CachePayloadExtractComplete; + + /// + /// Fired when the engine has progress extracting the payload from the container. + /// + event EventHandler CachePayloadExtractProgress; + + /// + /// Fired when the engine begins the verification of the acquired payload or container. + /// + event EventHandler CacheVerifyBegin; + + /// + /// Fired when the engine has completed the verification of the acquired payload or container. + /// + event EventHandler CacheVerifyComplete; + + /// + /// Fired when the engine has progress verifying the payload or container. + /// + event EventHandler CacheVerifyProgress; + + /// + /// Fired when the engine is about to commit an MSI transaction. + /// + event EventHandler CommitMsiTransactionBegin; + + /// + /// Fired when the engine has completed comitting an MSI transaction. + /// + event EventHandler CommitMsiTransactionComplete; + + /// + /// Fired when the application is being created. + /// + event EventHandler Create; + + /// + /// Fired when the application is being destroyed. + /// + event EventHandler Destroy; + + /// + /// Fired when the overall detection phase has begun. + /// + event EventHandler DetectBegin; + + /// + /// Fired when a package was not detected but a package using the same provider key was. + /// + event EventHandler DetectCompatibleMsiPackage; + + /// + /// Fired when the detection phase has completed. + /// + event EventHandler DetectComplete; + + /// + /// Fired when a forward compatible bundle is detected. + /// + event EventHandler DetectForwardCompatibleBundle; + + /// + /// Fired when a feature in an MSI package has been detected. + /// + event EventHandler DetectMsiFeature; + + /// + /// Fired when the detection for a specific package has begun. + /// + event EventHandler DetectPackageBegin; + + /// + /// Fired when the detection for a specific package has completed. + /// + event EventHandler DetectPackageComplete; + + /// + /// Fired when the engine detects a target product for an MSP package. + /// + event EventHandler DetectPatchTarget; + + /// + /// Fired when a related bundle has been detected for a bundle. + /// + event EventHandler DetectRelatedBundle; + + /// + /// Fired when a related bundle has been detected for a bundle package. + /// + event EventHandler DetectRelatedBundlePackage; + + /// + /// Fired when a related MSI package has been detected for a package. + /// + event EventHandler DetectRelatedMsiPackage; + + /// + /// Fired when the update detection has found a potential update candidate. + /// + event EventHandler DetectUpdate; + + /// + /// Fired when the update detection phase has begun. + /// + event EventHandler DetectUpdateBegin; + + /// + /// Fired when the update detection phase has completed. + /// + event EventHandler DetectUpdateComplete; + + /// + /// Fired when the engine is about to start the elevated process. + /// + event EventHandler ElevateBegin; + + /// + /// Fired when the engine has completed starting the elevated process. + /// + event EventHandler ElevateComplete; + + /// + /// Fired when the engine has encountered an error. + /// + event EventHandler Error; + + /// + /// Fired when the engine has begun installing packages. + /// + event EventHandler ExecuteBegin; + + /// + /// Fired when the engine has completed installing packages. + /// + event EventHandler ExecuteComplete; + + /// + /// Fired when a package sends a files in use installation message. + /// + event EventHandler ExecuteFilesInUse; + + /// + /// Fired when Windows Installer sends an installation message. + /// + event EventHandler ExecuteMsiMessage; + + /// + /// Fired when the engine has begun installing a specific package. + /// + event EventHandler ExecutePackageBegin; + + /// + /// Fired when the engine has completed installing a specific package. + /// + event EventHandler ExecutePackageComplete; + + /// + /// Fired when a package that spawned a process is cancelled. + /// + event EventHandler ExecuteProcessCancel; + + /// + /// Fired when the engine executes one or more patches targeting a product. + /// + event EventHandler ExecutePatchTarget; + + /// + /// Fired by the engine while executing a package. + /// + event EventHandler ExecuteProgress; + + /// + /// Fired when the engine is about to launch the preapproved executable. + /// + event EventHandler LaunchApprovedExeBegin; + + /// + /// Fired when the engine has completed launching the preapproved executable. + /// + event EventHandler LaunchApprovedExeComplete; + + /// + /// Fired when the engine is about to pause Windows automatic updates. + /// + event EventHandler PauseAutomaticUpdatesBegin; + + /// + /// Fired when the engine has completed pausing Windows automatic updates. + /// + event EventHandler PauseAutomaticUpdatesComplete; + + /// + /// Fired when the engine has begun planning the installation. + /// + event EventHandler PlanBegin; + + /// + /// Fired when the engine plans a new, compatible package using the same provider key. + /// + event EventHandler PlanCompatibleMsiPackageBegin; + + /// + /// Fired when the engine has completed planning the installation of a specific package. + /// + event EventHandler PlanCompatibleMsiPackageComplete; + + /// + /// Fired when the engine has completed planning the installation. + /// + event EventHandler PlanComplete; + + /// + /// Fired when the engine is about to plan a forward compatible bundle. + /// + event EventHandler PlanForwardCompatibleBundle; + + /// + /// Fired when the engine has completed planning a compatible package. + /// + event EventHandler PlannedCompatiblePackage; + + /// + /// Fired when the engine has completed planning a package. + /// + event EventHandler PlannedPackage; + + /// + /// Fired when the engine is about to plan a feature in an MSI package. + /// + event EventHandler PlanMsiFeature; + + /// + /// Fired when the engine is planning an MSI or MSP package. + /// + event EventHandler PlanMsiPackage; + + /// + /// Fired when the engine has begun getting the BA's input for planning a package. + /// + event EventHandler PlanPackageBegin; + + /// + /// Fired when the engine has completed getting the BA's input for planning a package. + /// + event EventHandler PlanPackageComplete; + + /// + /// Fired when the engine is about to plan a target of an MSP package. + /// + event EventHandler PlanPatchTarget; + + /// + /// Fired when the engine has begun planning for a related bundle. + /// + event EventHandler PlanRelatedBundle; + + /// + /// Fired when the engine has begun planning the related bundle relation type. + /// + event EventHandler PlanRelatedBundleType; + + /// + /// Fired when the engine has begun planning an upgrade related bundle for restoring in case of failure. + /// + event EventHandler PlanRestoreRelatedBundle; + + /// + /// Fired when the engine is planning a rollback boundary. + /// + event EventHandler PlanRollbackBoundary; + + /// + /// Fired when the engine has changed progress for the bundle installation. + /// + event EventHandler Progress; + + /// + /// Fired when the engine has begun registering the location and visibility of the bundle. + /// + event EventHandler RegisterBegin; + + /// + /// Fired when the engine has completed registering the location and visibility of the bundle. + /// + event EventHandler RegisterComplete; + + /// + /// Fired when the engine is about to rollback an MSI transaction. + /// + event EventHandler RollbackMsiTransactionBegin; + + /// + /// Fired when the engine has completed rolling back an MSI transaction. + /// + event EventHandler RollbackMsiTransactionComplete; + + /// + /// Fired when the engine is shutting down the bootstrapper application. + /// + event EventHandler Shutdown; + + /// + /// Fired when the engine is starting up the bootstrapper application. + /// + event EventHandler Startup; + + /// + /// Fired when the engine is about to take a system restore point. + /// + event EventHandler SystemRestorePointBegin; + + /// + /// Fired when the engine has completed taking a system restore point. + /// + event EventHandler SystemRestorePointComplete; + + /// + /// Fired when the engine unregisters the bundle. + /// + event EventHandler UnregisterBegin; + + /// + /// Fired when the engine unregistration is complete. + /// + event EventHandler UnregisterComplete; + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs new file mode 100644 index 00000000..8e6a293b --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IEngine.cs @@ -0,0 +1,230 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.ComponentModel; + using System.Security; + + /// + /// High level abstraction over the interface. + /// + public interface IEngine + { + /// + /// Gets the number of packages in the bundle. + /// + int PackageCount { get; } + + /// + /// Install the packages. + /// + /// The parent window for the installation user interface. + void Apply(IntPtr hwndParent); + + /// + /// Close the splash screen if it is still open. Does nothing if the splash screen is not or + /// never was opened. + /// + void CloseSplashScreen(); + + /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 + int CompareVersions(string version1, string version2); + + /// + /// Checks if a variable exists in the engine. + /// + /// The name of the variable. + /// Whether the variable exists. + bool ContainsVariable(string name); + + /// + /// Determine if all installation conditions are fulfilled. + /// + void Detect(); + + /// + /// Determine if all installation conditions are fulfilled. + /// + /// The parent window for the installation user interface. + void Detect(IntPtr hwndParent); + + /// + /// Elevate the install. + /// + /// The parent window of the elevation dialog. + /// true if elevation succeeded; otherwise, false if the user cancelled. + /// A Win32 error occurred. + bool Elevate(IntPtr hwndParent); + + /// + /// Escapes the input string. + /// + /// The string to escape. + /// The escaped string. + /// A Win32 error occurred. + string EscapeString(string input); + + /// + /// Evaluates the string. + /// + /// The string representing the condition to evaluate. + /// Whether the condition evaluated to true or false. + bool EvaluateCondition(string condition); + + /// + /// Formats the input string. + /// + /// The string to format. + /// The formatted string. + /// A Win32 error occurred. + string FormatString(string format); + + /// + /// Gets numeric variables for the engine. + /// + /// The name of the variable. + long GetVariableNumeric(string name); + + /// + /// Gets string variables for the engine using SecureStrings. + /// + /// The name of the variable. + SecureString GetVariableSecureString(string name); + + /// + /// Gets string variables for the engine. + /// + /// The name of the variable. + string GetVariableString(string name); + + /// + /// Gets variables for the engine. + /// + /// The name of the variable. + string GetVariableVersion(string name); + + /// + /// Gets persisted variables from a related bundle. + /// + /// The BundleId of the related bundle. + /// The name of the variable. + string GetRelatedBundleVariable(string bundleId, string name); + + /// + /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. + /// + /// The parent window of the elevation dialog (if the engine hasn't elevated yet). + /// Id of the ApprovedExeForElevation element specified when the bundle was authored. + /// Optional arguments. + void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments); + + /// + /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. + /// + /// The parent window of the elevation dialog (if the engine hasn't elevated yet). + /// Id of the ApprovedExeForElevation element specified when the bundle was authored. + /// Optional arguments. + /// Timeout in milliseconds. When set to something other than zero, the engine will call WaitForInputIdle for the new process with this timeout before calling OnLaunchApprovedExeComplete. + void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout); + + /// + /// Logs the . + /// + /// The logging level. + /// The message to log. + void Log(LogLevel level, string message); + + /// + /// Determine the installation sequencing and costing. + /// + /// The action to perform when planning. + void Plan(LaunchAction action); + + /// + /// Set the update information for a bundle. + /// + /// Optional local source path for the update. Default is "update\[OriginalNameOfBundle].exe". + /// Optional download source for the update. + /// Size of the expected update. + /// Type of the hash expected on the update. + /// Optional hash expected for the update. + /// Optional package id for the update. + void SetUpdate(string localSource, string downloadSource, long size, UpdateHashType hashType, string hash, string updatePackageId); + + /// + /// Sets the URL to the update feed. + /// + /// URL of the update feed. + void SetUpdateSource(string url); + + /// + /// Set the local source for a package or container. + /// + /// The id that uniquely identifies the package or container. + /// The id that uniquely identifies the payload. + /// The new source path. + void SetLocalSource(string packageOrContainerId, string payloadId, string path); + + /// + /// Set the new download URL for a package or container. + /// + /// The id that uniquely identifies the package or container. + /// The id that uniquely identifies the payload. + /// The new url. + /// The user name for proxy authentication. + /// The password for proxy authentication. + void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password); + + /// + /// Sets numeric variables for the engine. + /// + /// The name of the variable. + /// The value to set. + void SetVariableNumeric(string name, long value); + + /// + /// Sets string variables for the engine using SecureStrings. + /// + /// The name of the variable. + /// The value to set. + /// False if the value is a literal string. + void SetVariableString(string name, SecureString value, bool formatted); + + /// + /// Sets string variables for the engine. + /// + /// The name of the variable. + /// The value to set. + /// False if the value is a literal string. + void SetVariableString(string name, string value, bool formatted); + + /// + /// Sets version variables for the engine. + /// + /// The name of the variable. + /// The value to set. + void SetVariableVersion(string name, string value); + + /// + /// Sends error message when embedded. + /// + /// Error code. + /// Error message. + /// UI buttons to show on error dialog. + int SendEmbeddedError(int errorCode, string message, int uiHint); + + /// + /// Sends progress percentages when embedded. + /// + /// Percentage completed thus far. + /// Overall percentage completed. + int SendEmbeddedProgress(int progressPercentage, int overallPercentage); + + /// + /// Shuts down the engine. + /// + /// Exit code indicating reason for shut down. + void Quit(int exitCode); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IMbaCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IMbaCommand.cs new file mode 100644 index 00000000..37640a87 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IMbaCommand.cs @@ -0,0 +1,35 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System.Collections.Generic; + + /// + /// Command information parsed from the command line. + /// + public interface IMbaCommand + { + /// + /// Gets the action to perform if a reboot is required. + /// + Restart Restart { get; } + + /// + /// The command line arguments not parsed into or . + /// + string[] UnknownCommandLineArgs { get; } + + /// + /// The variables that were parsed from the command line. + /// Key = variable name, Value = variable value. + /// + KeyValuePair[] Variables { get; } + + /// + /// Sets overridable variables from the command line. + /// + /// The overridable variable information from . + /// The engine. + void SetOverridableVariables(IOverridableVariables overridableVariables, IEngine engine); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariableInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariableInfo.cs new file mode 100644 index 00000000..173963a8 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariableInfo.cs @@ -0,0 +1,15 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + /// + /// Overridable variable from the BA manifest. + /// + public interface IOverridableVariableInfo + { + /// + /// The Variable name. + /// + string Name { get; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariables.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariables.cs new file mode 100644 index 00000000..2cf7b8d9 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IOverridableVariables.cs @@ -0,0 +1,37 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System.Collections.Generic; + + /// + /// The case sensitivity of variables from the command line. + /// + public enum VariableCommandLineType + { + /// + /// All variable names specified on the command line must match the case specified when building the bundle. + /// + CaseSensitive, + /// + /// Variable names specified on the command line do not have to match the case specified when building the bundle. + /// + CaseInsensitive, + } + + /// + /// Overridable variable information from the BA manifest. + /// + public interface IOverridableVariables + { + /// + /// The of the bundle. + /// + VariableCommandLineType CommandLineType { get; } + + /// + /// Variable Dictionary of variable name to . + /// + IDictionary Variables { get; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/IPackageInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/IPackageInfo.cs new file mode 100644 index 00000000..e2512584 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/IPackageInfo.cs @@ -0,0 +1,100 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + /// + /// Package information from the BA manifest. + /// + public interface IPackageInfo + { + /// + /// The authored cache strategy for this package. + /// + BOOTSTRAPPER_CACHE_TYPE CacheType { get; } + + /// + /// Place for the BA to store it's own custom data for this package. + /// + object CustomData { get; set; } + + /// + /// The package's description. + /// + string Description { get; } + + /// + /// The authored bal:DisplayInternalUICondition. + /// + string DisplayInternalUICondition { get; } + + /// + /// The package's display name. + /// + string DisplayName { get; } + + /// + /// The package's Id. + /// + string Id { get; } + + /// + /// The authored InstallCondition. + /// + string InstallCondition { get; } + + /// + /// The authored RepairCondition. + /// + string RepairCondition { get; } + + /// + /// Whether the bundle should ever recommend the package to be uninstalled. + /// + bool Permanent { get; } + + /// + /// Whether the package should be installed by the prereq BA for managed bootstrapper applications. + /// + bool PrereqPackage { get; } + + /// + /// The file name of the license file to be shown by the prereq BA. + /// + string PrereqLicenseFile { get; } + + /// + /// The URL of the license to be shown by the prereq BA. + /// + string PrereqLicenseUrl { get; } + + /// + /// See + /// + PrimaryPackageType PrimaryPackageType { get; } + + /// + /// The package's ProductCode. + /// + string ProductCode { get; } + + /// + /// The type of the package. + /// + PackageType Type { get; } + + /// + /// The package's UpgradeCode. + /// + string UpgradeCode { get; } + + /// + /// The package's version. + /// + string Version { get; } + + /// + /// Whether the package's failure can be ignored while executing the chain. + /// + bool Vital { get; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/ManagedBootstrapperApplication.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/ManagedBootstrapperApplication.cs new file mode 100644 index 00000000..77c5eaca --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/ManagedBootstrapperApplication.cs @@ -0,0 +1,19 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + /// + /// Managed bootstrapper application entry point. + /// + public static class ManagedBootstrapperApplication + { + /// + /// Run the managed bootstrapper application. + /// + /// Bootstrapper applciation to run. + public static void Run(IBootstrapperApplication application) + { + MbaNative.BootstrapperApplicationRun(application); + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaCommand.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaCommand.cs new file mode 100644 index 00000000..c46b5844 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaCommand.cs @@ -0,0 +1,38 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Collections.Generic; + + /// + /// Default implementation of . + /// + internal sealed class MbaCommand : IMbaCommand + { + public Restart Restart { get; internal set; } + + public string[] UnknownCommandLineArgs { get; internal set; } + + public KeyValuePair[] Variables { get; internal set; } + + internal MbaCommand() { } + + public void SetOverridableVariables(IOverridableVariables overridableVariables, IEngine engine) + { + foreach (var kvp in this.Variables) + { + var key = kvp.Key; + + if (!overridableVariables.Variables.TryGetValue(key, out var overridableVariable)) + { + engine.Log(LogLevel.Error, String.Format("Ignoring attempt to set non-overridable variable: '{0}'.", key)); + } + else + { + engine.SetVariableString(overridableVariable.Name, kvp.Value, false); + } + } + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaNative.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaNative.cs new file mode 100644 index 00000000..6e135fc3 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/MbaNative.cs @@ -0,0 +1,18 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + internal static class MbaNative + { + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern void BalDebuggerCheck(); + + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern void BootstrapperApplicationRun( + [MarshalAs(UnmanagedType.Interface)] IBootstrapperApplication pBA + ); + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/NativeMethods.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/NativeMethods.cs new file mode 100644 index 00000000..4ef9f35e --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/NativeMethods.cs @@ -0,0 +1,49 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + /// + /// Contains native constants, functions, and structures for this assembly. + /// + internal static class NativeMethods + { + #region Error Constants + internal const int S_OK = 0; + internal const int E_MOREDATA = unchecked((int)0x800700ea); + internal const int E_INSUFFICIENT_BUFFER = unchecked((int)0x8007007a); + internal const int E_CANCELLED = unchecked((int)0x800704c7); + internal const int E_ALREADYINITIALIZED = unchecked((int)0x800704df); + internal const int E_NOTFOUND = unchecked((int)0x80070490); + internal const int E_NOTIMPL = unchecked((int)0x80004001); + internal const int E_UNEXPECTED = unchecked((int)0x8000ffff); + #endregion + + #region Functions + [DllImport("shell32.dll", ExactSpelling = true, SetLastError = true)] + internal static extern IntPtr CommandLineToArgvW( + [MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine, + out int pNumArgs + ); + + [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] + internal static extern IntPtr LocalFree( + IntPtr hMem + ); + #endregion + } + + #region SafeHandles + internal abstract class SafeHandleZeroIsDefaultAndInvalid : SafeHandle + { + public SafeHandleZeroIsDefaultAndInvalid() : base(IntPtr.Zero, true) { } + + public override bool IsInvalid + { + get { return this.handle == IntPtr.Zero; } + } + } + #endregion +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariableInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariableInfo.cs new file mode 100644 index 00000000..8b90c588 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariableInfo.cs @@ -0,0 +1,15 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + /// + /// Default implementation of . + /// + internal class OverridableVariableInfo : IOverridableVariableInfo + { + /// + public string Name { get; internal set; } + + internal OverridableVariableInfo() { } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariables.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariables.cs new file mode 100644 index 00000000..98f8ec81 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/OverridableVariables.cs @@ -0,0 +1,87 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Collections.Generic; + using System.Xml; + using System.Xml.XPath; + + /// + /// Default implementation of . + /// + public class OverridableVariablesInfo : IOverridableVariables + { + /// + public VariableCommandLineType CommandLineType { get; internal set; } + + /// + public IDictionary Variables { get; internal set; } + + internal OverridableVariablesInfo() { } + + /// + /// Parses the overridable variable info from the BA manifest. + /// + /// XML root + /// The parsed information. + public static IOverridableVariables ParseFromXml(XPathNavigator root) + { + XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); + namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); + XPathNavigator commandLineNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixStdbaCommandLine", namespaceManager); + XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixStdbaOverridableVariable", namespaceManager); + + var overridableVariables = new OverridableVariablesInfo(); + IEqualityComparer variableNameComparer; + + if (commandLineNode == null) + { + overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; + variableNameComparer = StringComparer.InvariantCulture; + } + else + { + string variablesValue = BootstrapperApplicationData.GetAttribute(commandLineNode, "Variables"); + + if (variablesValue == null) + { + throw new Exception("Failed to get command line variable type."); + } + + if (variablesValue.Equals("caseInsensitive", StringComparison.InvariantCulture)) + { + overridableVariables.CommandLineType = VariableCommandLineType.CaseInsensitive; + variableNameComparer = StringComparer.InvariantCultureIgnoreCase; + } + else if (variablesValue.Equals("caseSensitive", StringComparison.InvariantCulture)) + { + overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; + variableNameComparer = StringComparer.InvariantCulture; + } + else + { + throw new Exception(String.Format("Unknown command line variable type: '{0}'", variablesValue)); + } + } + + overridableVariables.Variables = new Dictionary(variableNameComparer); + + foreach (XPathNavigator node in nodes) + { + var variable = new OverridableVariableInfo(); + + string name = BootstrapperApplicationData.GetAttribute(node, "Name"); + if (name == null) + { + throw new Exception("Failed to get name for overridable variable."); + } + variable.Name = name; + + overridableVariables.Variables.Add(variable.Name, variable); + } + + return overridableVariables; + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/PackageInfo.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/PackageInfo.cs new file mode 100644 index 00000000..e835f9ea --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/PackageInfo.cs @@ -0,0 +1,391 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Collections.Generic; + using System.Xml; + using System.Xml.XPath; + + /// + /// The type of package. + /// + public enum PackageType + { + /// + /// Invalid type. + /// + Unknown, + + /// + /// ExePackage + /// + Exe, + + /// + /// MsiPackage + /// + Msi, + + /// + /// MspPackage + /// + Msp, + + /// + /// MsuPackage + /// + Msu, + + /// + /// Related bundle of type Upgrade + /// + UpgradeBundle, + + /// + /// Related bundle of type Addon + /// + AddonBundle, + + /// + /// Related bundle of type Patch + /// + PatchBundle, + + /// + /// Related bundle of type Update + /// + UpdateBundle, + + /// + /// BundlePackage + /// + ChainBundle, + } + + /// + /// Metadata for BAs like WixInternalUIBootstrapperApplication that only support one main package. + /// + public enum PrimaryPackageType + { + /// + /// Not a primary package. + /// + None, + + /// + /// The default package if no architecture specific package is available for the current architecture. + /// + Default, + + /// + /// The package to use on x86 machines. + /// + X86, + + /// + /// The package to use on x64 machines. + /// + X64, + + /// + /// The package to use on ARM64 machines. + /// + ARM64, + } + + /// + /// Default implementation of . + /// + public class PackageInfo : IPackageInfo + { + /// + public string Id { get; internal set; } + + /// + public string DisplayName { get; internal set; } + + /// + public string Description { get; internal set; } + + /// + public PackageType Type { get; internal set; } + + /// + public bool Permanent { get; internal set; } + + /// + public bool Vital { get; internal set; } + + /// + public string DisplayInternalUICondition { get; internal set; } + + /// + public string ProductCode { get; internal set; } + + /// + public string UpgradeCode { get; internal set; } + + /// + public string Version { get; internal set; } + + /// + public string InstallCondition { get; internal set; } + + /// + public string RepairCondition { get; internal set; } + + /// + public BOOTSTRAPPER_CACHE_TYPE CacheType { get; internal set; } + + /// + public bool PrereqPackage { get; internal set; } + + /// + public string PrereqLicenseFile { get; internal set; } + + /// + public string PrereqLicenseUrl { get; internal set; } + + /// + public PrimaryPackageType PrimaryPackageType { get; internal set; } + + /// + public object CustomData { get; set; } + + internal PackageInfo() { } + + /// + /// Parse packages from BootstrapperApplicationData.xml. + /// + /// The root node. + /// A dictionary of the packages by Id. + public static IDictionary ParsePackagesFromXml(XPathNavigator root) + { + var packagesById = new Dictionary(); + XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); + namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); + XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixPackageProperties", namespaceManager); + + foreach (XPathNavigator node in nodes) + { + var package = new PackageInfo(); + + string id = BootstrapperApplicationData.GetAttribute(node, "Package"); + if (id == null) + { + throw new Exception("Failed to get package identifier for package."); + } + package.Id = id; + + package.DisplayName = BootstrapperApplicationData.GetAttribute(node, "DisplayName"); + + package.Description = BootstrapperApplicationData.GetAttribute(node, "Description"); + + PackageType? packageType = GetPackageTypeAttribute(node, "PackageType"); + if (!packageType.HasValue) + { + throw new Exception("Failed to get package type for package."); + } + package.Type = packageType.Value; + + bool? permanent = BootstrapperApplicationData.GetYesNoAttribute(node, "Permanent"); + if (!permanent.HasValue) + { + throw new Exception("Failed to get permanent settings for package."); + } + package.Permanent = permanent.Value; + + bool? vital = BootstrapperApplicationData.GetYesNoAttribute(node, "Vital"); + if (!vital.HasValue) + { + throw new Exception("Failed to get vital setting for package."); + } + package.Vital = vital.Value; + + package.ProductCode = BootstrapperApplicationData.GetAttribute(node, "ProductCode"); + + package.UpgradeCode = BootstrapperApplicationData.GetAttribute(node, "UpgradeCode"); + + package.Version = BootstrapperApplicationData.GetAttribute(node, "Version"); + + package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition"); + + package.RepairCondition = BootstrapperApplicationData.GetAttribute(node, "RepairCondition"); + + BOOTSTRAPPER_CACHE_TYPE? cacheType = GetCacheTypeAttribute(node, "Cache"); + if (!cacheType.HasValue) + { + throw new Exception("Failed to get cache type for package."); + } + package.CacheType = cacheType.Value; + + packagesById.Add(package.Id, package); + } + + ParseBalPackageInfoFromXml(root, namespaceManager, packagesById); + return packagesById; + } + + /// + /// Parse the cache type attribute. + /// + /// Package node + /// Attribute name + /// The cache type + public static BOOTSTRAPPER_CACHE_TYPE? GetCacheTypeAttribute(XPathNavigator node, string attributeName) + { + string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName); + + if (attributeValue == null) + { + return null; + } + + if (attributeValue.Equals("keep", StringComparison.InvariantCulture)) + { + return BOOTSTRAPPER_CACHE_TYPE.Keep; + } + else if (attributeValue.Equals("force", StringComparison.InvariantCulture)) + { + return BOOTSTRAPPER_CACHE_TYPE.Force; + } + else + { + return BOOTSTRAPPER_CACHE_TYPE.Remove; + } + } + + /// + /// Parse the package type attribute + /// + /// Package node + /// Attribute name + /// The package type + public static PackageType? GetPackageTypeAttribute(XPathNavigator node, string attributeName) + { + string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName); + + if (attributeValue == null) + { + return null; + } + + if (attributeValue.Equals("Bundle", StringComparison.InvariantCulture)) + { + return PackageType.ChainBundle; + } + else if (attributeValue.Equals("Exe", StringComparison.InvariantCulture)) + { + return PackageType.Exe; + } + else if (attributeValue.Equals("Msi", StringComparison.InvariantCulture)) + { + return PackageType.Msi; + } + else if (attributeValue.Equals("Msp", StringComparison.InvariantCulture)) + { + return PackageType.Msp; + } + else if (attributeValue.Equals("Msu", StringComparison.InvariantCulture)) + { + return PackageType.Msu; + } + else + { + return PackageType.Unknown; + } + } + + /// + /// Create from a related bundle. + /// + /// Package id + /// Relation type + /// Whether the related bundle is per-machine + /// The related bundle's version + /// The package info + public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, string version) + { + PackageInfo package = new PackageInfo(); + package.Id = id; + package.Version = version; + + switch (relationType) + { + case RelationType.Addon: + package.Type = PackageType.AddonBundle; + break; + case RelationType.Patch: + package.Type = PackageType.PatchBundle; + break; + case RelationType.Upgrade: + package.Type = PackageType.UpgradeBundle; + break; + default: + throw new Exception(String.Format("Unknown related bundle type: {0}", relationType)); + } + + return package; + } + + /// + /// Create from an update bundle. + /// + /// Package id + /// The package info + public static IPackageInfo GetUpdateBundleAsPackage(string id) + { + PackageInfo package = new PackageInfo(); + package.Id = id; + package.Type = PackageType.UpdateBundle; + + return package; + } + + internal static void ParseBalPackageInfoFromXml(XPathNavigator root, XmlNamespaceManager namespaceManager, Dictionary packagesById) + { + XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixBalPackageInfo", namespaceManager); + + foreach (XPathNavigator node in nodes) + { + string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); + if (id == null) + { + throw new Exception("Failed to get package identifier for WixBalPackageInfo."); + } + + if (!packagesById.TryGetValue(id, out var ipackage)) + { + throw new Exception(String.Format("Failed to find package specified in WixBalPackageInfo: {0}", id)); + } + + var package = (PackageInfo)ipackage; + + package.DisplayInternalUICondition = BootstrapperApplicationData.GetAttribute(node, "DisplayInternalUICondition"); + } + + nodes = root.Select("/p:BootstrapperApplicationData/p:WixPrereqInformation", namespaceManager); + + foreach (XPathNavigator node in nodes) + { + string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); + if (id == null) + { + throw new Exception("Failed to get package identifier for WixPrereqInformation."); + } + + if (!packagesById.TryGetValue(id, out var ipackage)) + { + throw new Exception(String.Format("Failed to find package specified in WixPrereqInformation: {0}", id)); + } + + var package = (PackageInfo)ipackage; + + package.PrereqPackage = true; + package.PrereqLicenseFile = BootstrapperApplicationData.GetAttribute(node, "LicenseFile"); + package.PrereqLicenseUrl = BootstrapperApplicationData.GetAttribute(node, "LicenseUrl"); + } + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/StrUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/StrUtil.cs new file mode 100644 index 00000000..aeeaac47 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/StrUtil.cs @@ -0,0 +1,54 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + using System.Security; + using System.Text; + + internal static class StrUtil + { + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern void StrFree( + IntPtr scz + ); + + internal sealed class StrHandle : SafeHandleZeroIsDefaultAndInvalid + { + protected override bool ReleaseHandle() + { + StrFree(this.handle); + return true; + } + + public string ToUniString() + { + return Marshal.PtrToStringUni(this.handle); + } + + public SecureString ToSecureString() + { + if (this.handle == IntPtr.Zero) + { + return null; + } + + SecureString value = new SecureString(); + char c; + for (int charIndex = 0; ; charIndex++) + { + c = (char)Marshal.ReadInt16(this.handle, charIndex * UnicodeEncoding.CharSize); + if (c == '\0') + { + break; + } + + value.AppendChar(c); + } + + return value; + } + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtil.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtil.cs new file mode 100644 index 00000000..082ee06c --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtil.cs @@ -0,0 +1,146 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + using System.Text; + + /// + /// Managed wrapper for verutil. + /// + public static class VerUtil + { + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern int VerCompareParsedVersions( + VersionHandle pVersion1, + VersionHandle pVersion2 + ); + + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern int VerCompareStringVersions( + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion1, + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion2, + [MarshalAs(UnmanagedType.Bool)] bool fStrict + ); + + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern VersionHandle VerCopyVersion( + VersionHandle pSource + ); + + [DllImport("mbanative.dll", ExactSpelling = true)] + internal static extern void VerFreeVersion( + IntPtr pVersion + ); + + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern VersionHandle VerParseVersion( + [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, + [MarshalAs(UnmanagedType.U4)] uint cchValue, + [MarshalAs(UnmanagedType.Bool)] bool fStrict + ); + + [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] + internal static extern VersionHandle VerVersionFromQword( + [MarshalAs(UnmanagedType.I8)] long qwVersion + ); + + [StructLayout(LayoutKind.Sequential)] + internal struct VersionReleaseLabelStruct + { + public bool fNumeric; + public uint dwValue; + public IntPtr cchLabelOffset; + public int cchLabel; + } + + [StructLayout(LayoutKind.Sequential)] + internal struct VersionStruct + { + public IntPtr sczVersion; + public char chPrefix; + public uint dwMajor; + public uint dwMinor; + public uint dwPatch; + public uint dwRevision; + public int cReleaseLabels; + public IntPtr rgReleaseLabels; + public IntPtr cchMetadataOffset; + public bool fInvalid; + public bool fHasMajor; + public bool fHasMinor; + public bool fHasPatch; + public bool fHasRevision; + } + + internal static string VersionStringFromOffset(IntPtr wzVersion, IntPtr cchOffset, int? cchLength = null) + { + var offset = cchOffset.ToInt64() * UnicodeEncoding.CharSize; + var wz = new IntPtr(wzVersion.ToInt64() + offset); + if (cchLength.HasValue) + { + return Marshal.PtrToStringUni(wz, (int)cchLength); + } + else + { + return Marshal.PtrToStringUni(wz); + } + } + + internal sealed class VersionHandle : SafeHandleZeroIsDefaultAndInvalid + { + protected override bool ReleaseHandle() + { + VerFreeVersion(this.handle); + return true; + } + } + + /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 + public static int CompareParsedVersions(VerUtilVersion version1, VerUtilVersion version2) + { + return VerCompareParsedVersions(version1.GetHandle(), version2.GetHandle()); + } + + /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 + public static int CompareStringVersions(string version1, string version2, bool strict) + { + return VerCompareStringVersions(version1, version2, strict); + } + + /// + /// Clone the version. + /// + /// Source version + /// Cloned version + public static VerUtilVersion CopyVersion(VerUtilVersion version) + { + var handle = VerCopyVersion(version.GetHandle()); + return new VerUtilVersion(handle); + } + + /// + /// Parse a version. + /// + /// Source version + /// Whether to throw exception on invalid version. + /// Parsed version + public static VerUtilVersion ParseVersion(string version, bool strict) + { + var handle = VerParseVersion(version, 0, strict); + return new VerUtilVersion(handle); + } + + /// + /// Parse version from qword. + /// + /// Source version + /// Parsed version + public static VerUtilVersion VersionFromQword(long version) + { + var handle = VerVersionFromQword(version); + return new VerUtilVersion(handle); + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersion.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersion.cs new file mode 100644 index 00000000..65b195a4 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersion.cs @@ -0,0 +1,129 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + /// + /// An enhanced implementation of SemVer 2.0. + /// + public sealed class VerUtilVersion : IDisposable + { + internal VerUtilVersion(VerUtil.VersionHandle handle) + { + this.Handle = handle; + + var pVersion = handle.DangerousGetHandle(); + var version = (VerUtil.VersionStruct)Marshal.PtrToStructure(pVersion, typeof(VerUtil.VersionStruct)); + this.Version = Marshal.PtrToStringUni(version.sczVersion); + this.Prefix = version.chPrefix; + this.Major = version.dwMajor; + this.Minor = version.dwMinor; + this.Patch = version.dwPatch; + this.Revision = version.dwRevision; + this.ReleaseLabels = new VerUtilVersionReleaseLabel[version.cReleaseLabels]; + this.Metadata = VerUtil.VersionStringFromOffset(version.sczVersion, version.cchMetadataOffset); + this.IsInvalid = version.fInvalid; + this.HasMajor = version.fHasMajor; + this.HasMinor = version.fHasMinor; + this.HasPatch = version.fHasPatch; + this.HasRevision = version.fHasRevision; + + for (var i = 0; i < version.cReleaseLabels; ++i) + { + var offset = i * Marshal.SizeOf(typeof(VerUtil.VersionReleaseLabelStruct)); + var pReleaseLabel = new IntPtr(version.rgReleaseLabels.ToInt64() + offset); + this.ReleaseLabels[i] = new VerUtilVersionReleaseLabel(pReleaseLabel, version.sczVersion); + } + } + + /// + /// String version, which would have stripped the leading 'v'. + /// + public string Version { get; private set; } + + /// + /// Prefix character that was stripped from Version, or the null character if there was no prefix. + /// + public char Prefix { get; private set; } + + /// + /// For version A.B.C.D, Major is A. It is 0 if not specified. + /// + public uint Major { get; private set; } + + /// + /// For version A.B.C.D, Minor is B. It is 0 if not specified. + /// + public uint Minor { get; private set; } + + /// + /// For version A.B.C.D, Patch is C. It is 0 if not specified. + /// + public uint Patch { get; private set; } + + /// + /// For version A.B.C.D, Revision is D. It is 0 if not specified. + /// + public uint Revision { get; private set; } + + /// + /// For version X.Y.Z-releaselabels+metadata, ReleaseLabels is the parsed information for releaselabels. + /// + public VerUtilVersionReleaseLabel[] ReleaseLabels { get; private set; } + + /// + /// For version X.Y.Z-releaselabels+metadata, Metadata is the rest of the string after +. + /// For invalid versions, it is all of the string after the point where it was an invalid string. + /// + public string Metadata { get; private set; } + + /// + /// Whether the version conformed to the spec. + /// + public bool IsInvalid { get; private set; } + + /// + /// Whether the Major part was specified. + /// + public bool HasMajor { get; private set; } + + /// + /// Whether the Minor part was specified. + /// + public bool HasMinor { get; private set; } + + /// + /// Whether the Patch part was specified. + /// + public bool HasPatch { get; private set; } + + /// + /// Whether the Revision part was specified. + /// + public bool HasRevision { get; private set; } + + /// + public void Dispose() + { + if (this.Handle != null) + { + this.Handle.Dispose(); + this.Handle = null; + } + } + + private VerUtil.VersionHandle Handle { get; set; } + + internal VerUtil.VersionHandle GetHandle() + { + if (this.Handle == null) + { + throw new ObjectDisposedException(this.Version); + } + + return this.Handle; + } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs new file mode 100644 index 00000000..03603714 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/VerUtilVersionReleaseLabel.cs @@ -0,0 +1,36 @@ +// 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 WixToolset.BootstrapperApplicationApi +{ + using System; + using System.Runtime.InteropServices; + + /// + /// A release label from a . + /// + public sealed class VerUtilVersionReleaseLabel + { + internal VerUtilVersionReleaseLabel(IntPtr pReleaseLabel, IntPtr wzVersion) + { + var releaseLabel = (VerUtil.VersionReleaseLabelStruct)Marshal.PtrToStructure(pReleaseLabel, typeof(VerUtil.VersionReleaseLabelStruct)); + this.IsNumeric = releaseLabel.fNumeric; + this.Value = releaseLabel.dwValue; + this.Label = VerUtil.VersionStringFromOffset(wzVersion, releaseLabel.cchLabelOffset, releaseLabel.cchLabel); + } + + /// + /// Whether the label was parsed as a number. + /// + public bool IsNumeric { get; private set; } + + /// + /// If then the value that was parsed. + /// + public uint Value { get; private set; } + + /// + /// The string version of the label. + /// + public string Label { get; private set; } + } +} diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.csproj b/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.csproj new file mode 100644 index 00000000..2fe6d5bb --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.csproj @@ -0,0 +1,27 @@ + + + + + + netstandard2.0;net462 + WixToolset.BootstrapperApplicationApi + WixToolset.BootstrapperApplicationApi + embedded + Managed Bootstrapper Application API + $(MSBuildThisFileName).nuspec + true + + + + + + + + + + + + + + + diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.nuspec b/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.nuspec new file mode 100644 index 00000000..22099635 --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/WixToolset.BootstrapperApplicationApi.nuspec @@ -0,0 +1,46 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + wix.png + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/build/WixToolset.BootstrapperApplicationApi.props b/src/api/burn/WixToolset.BootstrapperApplicationApi/build/WixToolset.BootstrapperApplicationApi.props new file mode 100644 index 00000000..b276574d --- /dev/null +++ b/src/api/burn/WixToolset.BootstrapperApplicationApi/build/WixToolset.BootstrapperApplicationApi.props @@ -0,0 +1,18 @@ + + + + + + + $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) + + + $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) + + + + + $(MSBuildThisFileDirectory)native\v14\$(PlatformTarget)\balutil.lib;%(AdditionalDependencies) + + + diff --git a/src/api/burn/WixToolset.BootstrapperApplicationApi/build/_._ b/src/api/burn/WixToolset.BootstrapperApplicationApi/build/_._ new file mode 100644 index 00000000..e69de29b diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.nuspec b/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.nuspec deleted file mode 100644 index 37757d7c..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.nuspec +++ /dev/null @@ -1,22 +0,0 @@ - - - - $id$ - $version$ - $title$ - $description$ - $authors$ - wix.png - MS-RL - false - $copyright$ - $projectUrl$ - - - - - - - - - diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj b/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj deleted file mode 100644 index 7f1b27c2..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/WixToolset.BootstrapperCore.Native.proj +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - net6.0 - WixToolset.BootstrapperCore.Native - WiX Bootstrapper native interfaces - - - - - - - - diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/build/WixToolset.BootstrapperCore.Native.props b/src/api/burn/WixToolset.BootstrapperCore.Native/build/WixToolset.BootstrapperCore.Native.props deleted file mode 100644 index 82f81163..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/build/WixToolset.BootstrapperCore.Native.props +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) - - - diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h deleted file mode 100644 index 79b1df80..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperApplication.h +++ /dev/null @@ -1,1606 +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 "BootstrapperEngine.h" - -#if defined(__cplusplus) -extern "C" { -#endif - -const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; -const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; -const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5; - -enum BOOTSTRAPPER_DISPLAY -{ - BOOTSTRAPPER_DISPLAY_UNKNOWN, - BOOTSTRAPPER_DISPLAY_EMBEDDED, - BOOTSTRAPPER_DISPLAY_NONE, - BOOTSTRAPPER_DISPLAY_PASSIVE, - BOOTSTRAPPER_DISPLAY_FULL, -}; - -enum BOOTSTRAPPER_REGISTRATION_TYPE -{ - BOOTSTRAPPER_REGISTRATION_TYPE_NONE, // The engine will ignore NONE if it recommended INPROGRESS or FULL. - BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS, - BOOTSTRAPPER_REGISTRATION_TYPE_FULL, -}; - -enum BOOTSTRAPPER_RESUME_TYPE -{ - BOOTSTRAPPER_RESUME_TYPE_NONE, - BOOTSTRAPPER_RESUME_TYPE_INVALID, // resume information is present but invalid - BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED, // relaunched after an unexpected interruption - BOOTSTRAPPER_RESUME_TYPE_REBOOT, // relaunched after reboot - BOOTSTRAPPER_RESUME_TYPE_SUSPEND, // relaunched after suspend - BOOTSTRAPPER_RESUME_TYPE_ARP, // launched from ARP -}; - -enum BOOTSTRAPPER_ERROR_TYPE -{ - BOOTSTRAPPER_ERROR_TYPE_ELEVATE, // error occurred trying to elevate. - BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER, // error came from windows installer. - BOOTSTRAPPER_ERROR_TYPE_EXE_PACKAGE, // error came from an exe package. - BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER, // error occurred trying to authenticate with HTTP server. - BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY, // error occurred trying to authenticate with HTTP proxy. - BOOTSTRAPPER_ERROR_TYPE_APPLY, // error occurred during apply. -}; - -enum BOOTSTRAPPER_FILES_IN_USE_TYPE -{ - BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI, // INSTALLMESSAGE_FILESINUSE - BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM, // INSTALLMESSAGE_RMFILESINUSE - BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX, // MMIO_CLOSE_APPS -}; - -enum BOOTSTRAPPER_RELATED_OPERATION -{ - BOOTSTRAPPER_RELATED_OPERATION_NONE, - BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE, - BOOTSTRAPPER_RELATED_OPERATION_MINOR_UPDATE, - BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE, - BOOTSTRAPPER_RELATED_OPERATION_REMOVE, - BOOTSTRAPPER_RELATED_OPERATION_INSTALL, - BOOTSTRAPPER_RELATED_OPERATION_REPAIR, -}; - -enum BOOTSTRAPPER_CACHE_OPERATION -{ - // There is no source available. - BOOTSTRAPPER_CACHE_OPERATION_NONE, - // Copy the payload or container from the chosen local source. - BOOTSTRAPPER_CACHE_OPERATION_COPY, - // Download the payload or container using the download URL. - BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD, - // Extract the payload from the container. - BOOTSTRAPPER_CACHE_OPERATION_EXTRACT, -}; - -enum BOOTSTRAPPER_CACHE_RESOLVE_OPERATION -{ - // There is no source available. - BOOTSTRAPPER_CACHE_RESOLVE_NONE, - // Copy the payload or container from the chosen local source. - BOOTSTRAPPER_CACHE_RESOLVE_LOCAL, - // Download the payload or container from the download URL. - BOOTSTRAPPER_CACHE_RESOLVE_DOWNLOAD, - // Extract the payload from the container. - BOOTSTRAPPER_CACHE_RESOLVE_CONTAINER, - // Look again for the payload or container locally. - BOOTSTRAPPER_CACHE_RESOLVE_RETRY, -}; - -enum BOOTSTRAPPER_CACHE_VERIFY_STEP -{ - BOOTSTRAPPER_CACHE_VERIFY_STEP_STAGE, - BOOTSTRAPPER_CACHE_VERIFY_STEP_HASH, - BOOTSTRAPPER_CACHE_VERIFY_STEP_FINALIZE, -}; - -enum BOOTSTRAPPER_APPLY_RESTART -{ - BOOTSTRAPPER_APPLY_RESTART_NONE, - BOOTSTRAPPER_APPLY_RESTART_REQUIRED, - BOOTSTRAPPER_APPLY_RESTART_INITIATED, -}; - -enum BOOTSTRAPPER_RELATION_TYPE -{ - BOOTSTRAPPER_RELATION_NONE, - BOOTSTRAPPER_RELATION_DETECT, - BOOTSTRAPPER_RELATION_UPGRADE, - BOOTSTRAPPER_RELATION_ADDON, - BOOTSTRAPPER_RELATION_PATCH, - BOOTSTRAPPER_RELATION_DEPENDENT_ADDON, - BOOTSTRAPPER_RELATION_DEPENDENT_PATCH, - BOOTSTRAPPER_RELATION_UPDATE, - BOOTSTRAPPER_RELATION_CHAIN_PACKAGE, -}; - -enum BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE -{ - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_ADDON, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_PATCH, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_ADDON, - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_PATCH, -}; - -enum BOOTSTRAPPER_CACHE_TYPE -{ - BOOTSTRAPPER_CACHE_TYPE_REMOVE, - BOOTSTRAPPER_CACHE_TYPE_KEEP, - BOOTSTRAPPER_CACHE_TYPE_FORCE, -}; - -enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT -{ - BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT, - BOOTSTRAPPER_PACKAGE_CONDITION_FALSE, - BOOTSTRAPPER_PACKAGE_CONDITION_TRUE, -}; - -enum BOOTSTRAPPER_MSI_FILE_VERSIONING -{ - BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, //o - BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER_OR_EQUAL, //e - BOOTSTRAPPER_MSI_FILE_VERSIONING_ALL, //a -}; - -enum BOOTSTRAPPER_APPLICATION_MESSAGE -{ - BOOTSTRAPPER_APPLICATION_MESSAGE_UNKNOWN = 65536, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, - BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, -}; - -enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION -{ - BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE, - // Instructs the engine to restart. - // The engine will not launch again after the machine is rebooted. - // Ignored if reboot was already initiated by OnExecutePackageComplete(). - BOOTSTRAPPER_APPLYCOMPLETE_ACTION_RESTART, -}; - -enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION -{ - BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE, - // Instructs the engine to try the acquisition of the payload again. - // Ignored if hrStatus is a success. - BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY, -}; - -enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION -{ - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_NONE, - // Instructs the engine to ignore non-vital package failures and - // continue with the caching. - // Ignored if hrStatus is a success or the package is vital. - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_IGNORE, - // Instructs the engine to try the acquisition and verification of the package again. - // Ignored if hrStatus is a success. - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_RETRY, -}; - -enum BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION -{ - BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_NONE, - // Instructs the engine to try to acquire the package so execution can use it. - // Most of the time this is used for installing the package during rollback. - BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_ACQUIRE, -}; - -enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION -{ - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_NONE, - // Ignored if hrStatus is a success. - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYVERIFICATION, - // Ignored if hrStatus is a success. - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYACQUISITION, -}; - -enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION -{ - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_NONE, - // Instructs the engine to ignore non-vital package failures and - // continue with the install. - // Ignored if hrStatus is a success or the package is vital. - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_IGNORE, - // Instructs the engine to try the execution of the package again. - // Ignored if hrStatus is a success. - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RETRY, - // Instructs the engine to stop processing the chain and restart. - // The engine will launch again after the machine is restarted. - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART, - // Instructs the engine to stop processing the chain and - // suspend the current state. - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_SUSPEND, -}; - -enum BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION -{ - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION_NONE, - // Instructs the engine to stop processing the chain and restart. - // The engine will launch again after the machine is restarted. - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION_RESTART, -}; - -enum BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION -{ - // Instructs the engine to stop waiting for the process to exit. - // The package is immediately considered to have failed with ERROR_INSTALL_USEREXIT. - // The engine will never rollback the package. - BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION_ABANDON, - // Instructs the engine to wait for the process to exit. - // Once the process has exited, the package is considered to have failed with ERROR_INSTALL_USEREXIT. - // This allows the engine to rollback the package if necessary. - BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION_WAIT, -}; - -enum BOOTSTRAPPER_SHUTDOWN_ACTION -{ - BOOTSTRAPPER_SHUTDOWN_ACTION_NONE, - // Instructs the engine to restart. - // The engine will not launch again after the machine is rebooted. - // Ignored if reboot was already initiated by OnExecutePackageComplete(). - BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART, - // Instructs the engine to unload the bootstrapper application and - // restart the engine which will load the bootstrapper application again. - // Typically used to switch from a native bootstrapper application to a managed one. - BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER, - // Opts out of the engine behavior of trying to uninstall itself - // when no non-permanent packages are installed. - BOOTSTRAPPER_SHUTDOWN_ACTION_SKIP_CLEANUP, -}; - -enum BURN_MSI_PROPERTY -{ - BURN_MSI_PROPERTY_NONE, // no property added - BURN_MSI_PROPERTY_INSTALL, // add BURNMSIINSTALL=1 - BURN_MSI_PROPERTY_MODIFY, // add BURNMSIMODIFY=1 - BURN_MSI_PROPERTY_REPAIR, // add BURNMSIREPAIR=1 - BURN_MSI_PROPERTY_UNINSTALL,// add BURNMSIUNINSTALL=1 -}; - -struct BOOTSTRAPPER_COMMAND -{ - DWORD cbSize; - BOOTSTRAPPER_ACTION action; - BOOTSTRAPPER_DISPLAY display; - - LPWSTR wzCommandLine; - INT32 nCmdShow; - - BOOTSTRAPPER_RESUME_TYPE resumeType; - HWND hwndSplashScreen; - - // If this was run from a related bundle, specifies the relation type - BOOTSTRAPPER_RELATION_TYPE relationType; - BOOL fPassthrough; - - LPWSTR wzLayoutDirectory; - LPWSTR wzBootstrapperWorkingFolder; - LPWSTR wzBootstrapperApplicationDataPath; -}; - -struct BA_ONAPPLYBEGIN_ARGS -{ - DWORD dwApiVersion; - DWORD dwPhaseCount; -}; - -struct BA_ONAPPLYBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONAPPLYCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; - // Indicates whether any package required a reboot or initiated the reboot already. - BOOTSTRAPPER_APPLY_RESTART restart; - BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation; -}; - -struct BA_ONAPPLYCOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_APPLYCOMPLETE_ACTION action; -}; - -struct BA_ONAPPLYDOWNGRADE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrRecommended; -}; - -struct BA_ONAPPLYDOWNGRADE_RESULTS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONBEGINMSITRANSACTIONBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; -}; - -struct BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; - HRESULT hrStatus; -}; - -struct BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONCACHEACQUIREBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - LPCWSTR wzSource; - LPCWSTR wzDownloadUrl; - LPCWSTR wzPayloadContainerId; - BOOTSTRAPPER_CACHE_OPERATION recommendation; -}; - -struct BA_ONCACHEACQUIREBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_CACHE_OPERATION action; -}; - -struct BA_ONCACHEACQUIRECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - HRESULT hrStatus; - BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation; -}; - -struct BA_ONCACHEACQUIRECOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action; -}; - -struct BA_ONCACHEACQUIREPROGRESS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - DWORD64 dw64Progress; - DWORD64 dw64Total; - DWORD dwOverallPercentage; -}; - -struct BA_ONCACHEACQUIREPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEACQUIRERESOLVING_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - LPCWSTR* rgSearchPaths; - DWORD cSearchPaths; - BOOL fFoundLocal; - DWORD dwRecommendedSearchPath; - LPCWSTR wzDownloadUrl; - LPCWSTR wzPayloadContainerId; - BOOTSTRAPPER_CACHE_RESOLVE_OPERATION recommendation; -}; - -struct BA_ONCACHEACQUIRERESOLVING_RESULTS -{ - DWORD dwApiVersion; - DWORD dwChosenSearchPath; - BOOTSTRAPPER_CACHE_RESOLVE_OPERATION action; - BOOL fCancel; -}; - -struct BA_ONCACHEBEGIN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONCACHEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHECOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONCACHECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - HRESULT hrStatus; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - DWORD64 dw64Progress; - DWORD64 dw64Total; - DWORD dwOverallPercentage; -}; - -struct BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEPACKAGEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - DWORD cCachePayloads; - DWORD64 dw64PackageCacheSize; - // If caching a package is not vital, then acquisition will be skipped unless the BA opts in through OnCachePackageNonVitalValidationFailure. - BOOL fVital; -}; - -struct BA_ONCACHEPACKAGEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEPACKAGECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - HRESULT hrStatus; - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation; -}; - -struct BA_ONCACHEPACKAGECOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action; -}; - -struct BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - HRESULT hrStatus; - BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation; -}; - -struct BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action; -}; - -struct BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzContainerId; - LPCWSTR wzPayloadId; -}; - -struct BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzContainerId; - LPCWSTR wzPayloadId; - HRESULT hrStatus; -}; - -struct BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzContainerId; - LPCWSTR wzPayloadId; - DWORD64 dw64Progress; - DWORD64 dw64Total; - DWORD dwOverallPercentage; -}; - -struct BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEVERIFYBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; -}; - -struct BA_ONCACHEVERIFYBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCACHEVERIFYCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - HRESULT hrStatus; - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation; -}; - -struct BA_ONCACHEVERIFYCOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action; -}; - -struct BA_ONCACHEVERIFYPROGRESS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - DWORD64 dw64Progress; - DWORD64 dw64Total; - DWORD dwOverallPercentage; - BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep; -}; - -struct BA_ONCACHEVERIFYPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; -}; - -struct BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; - HRESULT hrStatus; - BOOTSTRAPPER_APPLY_RESTART restart; - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation; -}; - -struct BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action; -}; - -struct BA_ONCREATE_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_COMMAND command; - // BOOTSTRAPPER_ACTION action; - // BOOTSTRAPPER_DISPLAY display; - - // LPWSTR wzCommandLine; - // INT32 nCmdShow; - - // BOOTSTRAPPER_RESUME_TYPE resumeType; - // HWND hwndSplashScreen; - - // BOOTSTRAPPER_RELATION_TYPE relationType; - // BOOL fPassthrough; - - // LPWSTR wzLayoutDirectory; - // LPWSTR wzBootstrapperWorkingFolder; - // LPWSTR wzBootstrapperApplicationDataPath; -}; - -struct BA_ONCREATE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONDESTROY_ARGS -{ - DWORD dwApiVersion; - BOOL fReload; -}; - -struct BA_ONDESTROY_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONDETECTBEGIN_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_REGISTRATION_TYPE registrationType; - DWORD cPackages; - BOOL fCached; -}; - -struct BA_ONDETECTBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzCompatiblePackageId; - LPCWSTR wzCompatiblePackageVersion; -}; - -struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; - BOOL fEligibleForCleanup; -}; - -struct BA_ONDETECTCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_RELATION_TYPE relationType; - LPCWSTR wzBundleTag; - BOOL fPerMachine; - LPCWSTR wzVersion; - BOOL fMissingFromCache; -}; - -struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTMSIFEATURE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzFeatureId; - BOOTSTRAPPER_FEATURE_STATE state; -}; - -struct BA_ONDETECTMSIFEATURE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTPACKAGEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; -}; - -struct BA_ONDETECTPACKAGEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTPACKAGECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - HRESULT hrStatus; - BOOTSTRAPPER_PACKAGE_STATE state; - BOOL fCached; -}; - -struct BA_ONDETECTPACKAGECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONDETECTRELATEDBUNDLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_RELATION_TYPE relationType; - LPCWSTR wzBundleTag; - BOOL fPerMachine; - LPCWSTR wzVersion; - BOOL fMissingFromCache; -}; - -struct BA_ONDETECTRELATEDBUNDLE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzBundleId; - BOOTSTRAPPER_RELATION_TYPE relationType; - BOOL fPerMachine; - LPCWSTR wzVersion; -}; - -struct BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTRELATEDMSIPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzUpgradeCode; - LPCWSTR wzProductCode; - BOOL fPerMachine; - LPCWSTR wzVersion; - BOOTSTRAPPER_RELATED_OPERATION operation; -}; - -struct BA_ONDETECTRELATEDMSIPACKAGE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTPATCHTARGET_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzProductCode; - BOOTSTRAPPER_PACKAGE_STATE patchState; -}; - -struct BA_ONDETECTPATCHTARGET_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONDETECTUPDATE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzUpdateLocation; - DWORD64 dw64Size; - LPCWSTR wzHash; - BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm; - LPCWSTR wzVersion; - LPCWSTR wzTitle; - LPCWSTR wzSummary; - LPCWSTR wzContentType; - LPCWSTR wzContent; -}; - -struct BA_ONDETECTUPDATE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOL fStopProcessingUpdates; -}; - -struct BA_ONDETECTUPDATEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzUpdateLocation; -}; - -struct BA_ONDETECTUPDATEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOL fSkip; -}; - -struct BA_ONDETECTUPDATECOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONDETECTUPDATECOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOL fIgnoreError; -}; - -struct BA_ONELEVATEBEGIN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONELEVATEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONELEVATECOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONELEVATECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONERROR_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_ERROR_TYPE errorType; - LPCWSTR wzPackageId; - DWORD dwCode; - LPCWSTR wzError; - DWORD dwUIHint; - DWORD cData; - LPCWSTR* rgwzData; - INT32 nRecommendation; -}; - -struct BA_ONERROR_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -}; - -struct BA_ONEXECUTEBEGIN_ARGS -{ - DWORD dwApiVersion; - DWORD cExecutingPackages; -}; - -struct BA_ONEXECUTEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONEXECUTECOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONEXECUTECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONEXECUTEFILESINUSE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - DWORD cFiles; - LPCWSTR* rgwzFiles; - INT32 nRecommendation; - BOOTSTRAPPER_FILES_IN_USE_TYPE source; -}; - -struct BA_ONEXECUTEFILESINUSE_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -}; - -struct BA_ONEXECUTEMSIMESSAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - INSTALLMESSAGE messageType; - DWORD dwUIHint; - LPCWSTR wzMessage; - DWORD cData; - LPCWSTR* rgwzData; - INT32 nRecommendation; -}; - -struct BA_ONEXECUTEMSIMESSAGE_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -}; - -struct BA_ONEXECUTEPACKAGEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - BOOL fExecute; // false means rollback. - BOOTSTRAPPER_ACTION_STATE action; - INSTALLUILEVEL uiLevel; - BOOL fDisableExternalUiHandler; -}; - -struct BA_ONEXECUTEPACKAGEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONEXECUTEPACKAGECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - HRESULT hrStatus; - // Indicates whether this package requires a reboot or initiated the reboot already. - BOOTSTRAPPER_APPLY_RESTART restart; - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation; -}; - -struct BA_ONEXECUTEPACKAGECOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action; -}; - -struct BA_ONEXECUTEPATCHTARGET_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzTargetProductCode; -}; - -struct BA_ONEXECUTEPATCHTARGET_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONEXECUTEPROCESSCANCEL_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - DWORD dwProcessId; - BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation; -}; - -struct BA_ONEXECUTEPROCESSCANCEL_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION action; -}; - -struct BA_ONEXECUTEPROGRESS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - DWORD dwProgressPercentage; - DWORD dwOverallPercentage; -}; - -struct BA_ONEXECUTEPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; - // Only valid if the operation succeeded. - DWORD dwProcessId; -}; - -struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANBEGIN_ARGS -{ - DWORD dwApiVersion; - DWORD cPackages; -}; - -struct BA_ONPLANBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzCompatiblePackageId; - LPCWSTR wzCompatiblePackageVersion; - BOOL fRecommendedRemove; -}; - -struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOL fRequestRemove; -}; - -struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzCompatiblePackageId; - HRESULT hrStatus; - BOOL fRequestedRemove; -}; - -struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONPLANCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_RELATION_TYPE relationType; - LPCWSTR wzBundleTag; - BOOL fPerMachine; - LPCWSTR wzVersion; - BOOL fRecommendedIgnoreBundle; -}; - -struct BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOL fIgnoreBundle; -}; - -struct BA_ONPLANMSIFEATURE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzFeatureId; - BOOTSTRAPPER_FEATURE_STATE recommendedState; -}; - -struct BA_ONPLANMSIFEATURE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_FEATURE_STATE requestedState; - BOOL fCancel; -}; - -struct BA_ONPLANMSIPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - BOOL fExecute; // false means rollback. - BOOTSTRAPPER_ACTION_STATE action; - BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning; -}; - -struct BA_ONPLANMSIPACKAGE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BURN_MSI_PROPERTY actionMsiProperty; - INSTALLUILEVEL uiLevel; - BOOL fDisableExternalUiHandler; - BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning; -}; - -struct BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzCompatiblePackageId; - BOOL fRemove; -}; - -struct BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANNEDPACKAGE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - BOOTSTRAPPER_ACTION_STATE execute; - BOOTSTRAPPER_ACTION_STATE rollback; - BOOL fPlannedCache; - BOOL fPlannedUncache; -}; - -struct BA_ONPLANNEDPACKAGE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANPACKAGEBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - BOOTSTRAPPER_PACKAGE_STATE state; - BOOL fCached; - BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition; - BOOTSTRAPPER_REQUEST_STATE recommendedState; - BOOTSTRAPPER_CACHE_TYPE recommendedCacheType; - BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition; -}; - -struct BA_ONPLANPACKAGEBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_REQUEST_STATE requestedState; - BOOTSTRAPPER_CACHE_TYPE requestedCacheType; -}; - -struct BA_ONPLANPACKAGECOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - HRESULT hrStatus; - BOOTSTRAPPER_REQUEST_STATE requested; -}; - -struct BA_ONPLANPACKAGECOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONPLANRELATEDBUNDLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_REQUEST_STATE recommendedState; -}; - -struct BA_ONPLANRELATEDBUNDLE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_REQUEST_STATE requestedState; -}; - -struct BA_ONPLANRELATEDBUNDLETYPE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType; -}; - -struct BA_ONPLANRELATEDBUNDLETYPE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE requestedType; -}; - -struct BA_ONPLANRESTORERELATEDBUNDLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - BOOTSTRAPPER_REQUEST_STATE recommendedState; -}; - -struct BA_ONPLANRESTORERELATEDBUNDLE_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_REQUEST_STATE requestedState; -}; - -struct BA_ONPLANROLLBACKBOUNDARY_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzRollbackBoundaryId; - BOOL fRecommendedTransaction; -}; - -struct BA_ONPLANROLLBACKBOUNDARY_RESULTS -{ - DWORD dwApiVersion; - BOOL fTransaction; - BOOL fCancel; -}; - -struct BA_ONPLANPATCHTARGET_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageId; - LPCWSTR wzProductCode; - BOOTSTRAPPER_REQUEST_STATE recommendedState; -}; - -struct BA_ONPLANPATCHTARGET_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_REQUEST_STATE requestedState; -}; - -struct BA_ONPROGRESS_ARGS -{ - DWORD dwApiVersion; - DWORD dwProgressPercentage; - DWORD dwOverallPercentage; -}; - -struct BA_ONPROGRESS_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; -}; - -struct BA_ONREGISTERBEGIN_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType; -}; - -struct BA_ONREGISTERBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOL fCancel; - BOOTSTRAPPER_REGISTRATION_TYPE registrationType; -}; - -struct BA_ONREGISTERCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONREGISTERCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; -}; - -struct BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzTransactionId; - HRESULT hrStatus; - BOOTSTRAPPER_APPLY_RESTART restart; - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation; -}; - -struct BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action; -}; - -struct BA_ONSHUTDOWN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONSHUTDOWN_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_SHUTDOWN_ACTION action; -}; - -struct BA_ONSTARTUP_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONSTARTUP_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS -{ - DWORD dwApiVersion; -}; - -struct BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -struct BA_ONUNREGISTERBEGIN_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType; -}; - -struct BA_ONUNREGISTERBEGIN_RESULTS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_REGISTRATION_TYPE registrationType; -}; - -struct BA_ONUNREGISTERCOMPLETE_ARGS -{ - DWORD dwApiVersion; - HRESULT hrStatus; -}; - -struct BA_ONUNREGISTERCOMPLETE_RESULTS -{ - DWORD dwApiVersion; -}; - -#ifdef TODO_DELETE - -extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_PROC)( - __in BOOTSTRAPPER_APPLICATION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -struct BOOTSTRAPPER_DESTROY_ARGS -{ - DWORD dwApiVersion; - BOOL fReload; -}; - -struct BOOTSTRAPPER_DESTROY_RESULTS -{ - DWORD dwApiVersion; - BOOL fDisableUnloading; // indicates the BA dll must not be unloaded after BootstrapperApplicationDestroy. -}; - -extern "C" typedef void (WINAPI *PFN_BOOTSTRAPPER_APPLICATION_DESTROY)( - __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, - __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults - ); - - - -struct BOOTSTRAPPER_CREATE_ARGS -{ - DWORD dwApiVersion; - DWORD64 qwEngineAPIVersion; - PFN_BOOTSTRAPPER_ENGINE_PROC pfnBootstrapperEngineProc; - LPVOID pvBootstrapperEngineProcContext; - BOOTSTRAPPER_COMMAND* pCommand; -}; - -struct BOOTSTRAPPER_CREATE_RESULTS -{ - DWORD dwApiVersion; - PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBootstrapperApplicationProc; - LPVOID pvBootstrapperApplicationProcContext; -}; - -extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)( - __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, - __inout BOOTSTRAPPER_CREATE_RESULTS* pResults - ); - -#endif - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h deleted file mode 100644 index 7af41d97..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BootstrapperEngine.h +++ /dev/null @@ -1,460 +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. - - -#if defined(__cplusplus) -extern "C" { -#endif - -#define IDERROR -1 -#define IDNOACTION 0 - -#ifndef FACILITY_WIX -#define FACILITY_WIX 500 -#endif - -static const HRESULT E_SUSPECTED_AV_INTERFERENCE = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 2000); - -enum BOOTSTRAPPER_ACTION -{ - BOOTSTRAPPER_ACTION_UNKNOWN, - BOOTSTRAPPER_ACTION_HELP, - BOOTSTRAPPER_ACTION_LAYOUT, - BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL, - BOOTSTRAPPER_ACTION_UNINSTALL, - BOOTSTRAPPER_ACTION_CACHE, - BOOTSTRAPPER_ACTION_INSTALL, - BOOTSTRAPPER_ACTION_MODIFY, - BOOTSTRAPPER_ACTION_REPAIR, - BOOTSTRAPPER_ACTION_UPDATE_REPLACE, - BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED, -}; - -enum BOOTSTRAPPER_ACTION_STATE -{ - BOOTSTRAPPER_ACTION_STATE_NONE, - BOOTSTRAPPER_ACTION_STATE_UNINSTALL, - BOOTSTRAPPER_ACTION_STATE_INSTALL, - BOOTSTRAPPER_ACTION_STATE_MODIFY, - BOOTSTRAPPER_ACTION_STATE_REPAIR, - BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE, -}; - -enum BOOTSTRAPPER_PACKAGE_STATE -{ - BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN, - BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE, - BOOTSTRAPPER_PACKAGE_STATE_ABSENT, - BOOTSTRAPPER_PACKAGE_STATE_PRESENT, - BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED, -}; - -enum BOOTSTRAPPER_REQUEST_STATE -{ - BOOTSTRAPPER_REQUEST_STATE_NONE, - BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT, - BOOTSTRAPPER_REQUEST_STATE_ABSENT, - BOOTSTRAPPER_REQUEST_STATE_CACHE, - BOOTSTRAPPER_REQUEST_STATE_PRESENT, - BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT, - BOOTSTRAPPER_REQUEST_STATE_REPAIR, -}; - -enum BOOTSTRAPPER_FEATURE_STATE -{ - BOOTSTRAPPER_FEATURE_STATE_UNKNOWN, - BOOTSTRAPPER_FEATURE_STATE_ABSENT, - BOOTSTRAPPER_FEATURE_STATE_ADVERTISED, - BOOTSTRAPPER_FEATURE_STATE_LOCAL, - BOOTSTRAPPER_FEATURE_STATE_SOURCE, -}; - -enum BOOTSTRAPPER_LOG_LEVEL -{ - BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) - BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on - BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on - BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code - BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified -}; - -enum BOOTSTRAPPER_UPDATE_HASH_TYPE -{ - BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, - BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512, -}; - -enum BOOTSTRAPPER_ENGINE_MESSAGE -{ - BOOTSTRAPPER_ENGINE_MESSAGE_UNKNOWN, - BOOTSTRAPPER_ENGINE_MESSAGE_GETPACKAGECOUNT, - BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLENUMERIC, - BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLESTRING, - BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLEVERSION, - BOOTSTRAPPER_ENGINE_MESSAGE_FORMATSTRING, - BOOTSTRAPPER_ENGINE_MESSAGE_ESCAPESTRING, - BOOTSTRAPPER_ENGINE_MESSAGE_EVALUATECONDITION, - BOOTSTRAPPER_ENGINE_MESSAGE_LOG, - BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDERROR, - BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDPROGRESS, - BOOTSTRAPPER_ENGINE_MESSAGE_SETUPDATE, - BOOTSTRAPPER_ENGINE_MESSAGE_SETLOCALSOURCE, - BOOTSTRAPPER_ENGINE_MESSAGE_SETDOWNLOADSOURCE, - BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLENUMERIC, - BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLESTRING, - BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLEVERSION, - BOOTSTRAPPER_ENGINE_MESSAGE_CLOSESPLASHSCREEN, - BOOTSTRAPPER_ENGINE_MESSAGE_DETECT, - BOOTSTRAPPER_ENGINE_MESSAGE_PLAN, - BOOTSTRAPPER_ENGINE_MESSAGE_ELEVATE, - BOOTSTRAPPER_ENGINE_MESSAGE_APPLY, - BOOTSTRAPPER_ENGINE_MESSAGE_QUIT, - BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE, - BOOTSTRAPPER_ENGINE_MESSAGE_SETUPDATESOURCE, - BOOTSTRAPPER_ENGINE_MESSAGE_COMPAREVERSIONS, - BOOTSTRAPPER_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, - - BOOTSTRAPPER_APPLICATION_MESSAGE_LAST = 65535 -}; - -typedef struct _BAENGINE_APPLY_ARGS -{ - DWORD dwApiVersion; - DWORD64 hwndParent; -} BAENGINE_APPLY_ARGS; - -typedef struct _BAENGINE_APPLY_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_APPLY_RESULTS; - -typedef struct _BAENGINE_CLOSESPLASHSCREEN_ARGS -{ - DWORD dwApiVersion; -} BAENGINE_CLOSESPLASHSCREEN_ARGS; - -typedef struct _BAENGINE_CLOSESPLASHSCREEN_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_CLOSESPLASHSCREEN_RESULTS; - -typedef struct _BAENGINE_COMPAREVERSIONS_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVersion1; - LPCWSTR wzVersion2; -} BAENGINE_COMPAREVERSIONS_ARGS; - -typedef struct _BAENGINE_COMPAREVERSIONS_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -} BAENGINE_COMPAREVERSIONS_RESULTS; - -typedef struct _BAENGINE_DETECT_ARGS -{ - DWORD dwApiVersion; - DWORD64 hwndParent; -} BAENGINE_DETECT_ARGS; - -typedef struct _BAENGINE_DETECT_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_DETECT_RESULTS; - -typedef struct _BAENGINE_ELEVATE_ARGS -{ - DWORD dwApiVersion; - DWORD64 hwndParent; -} BAENGINE_ELEVATE_ARGS; - -typedef struct _BAENGINE_ELEVATE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_ELEVATE_RESULTS; - -typedef struct _BAENGINE_ESCAPESTRING_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzIn; -} BAENGINE_ESCAPESTRING_ARGS; - -typedef struct _BAENGINE_ESCAPESTRING_RESULTS -{ - DWORD dwApiVersion; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - DWORD cchOut; -} BAENGINE_ESCAPESTRING_RESULTS; - -typedef struct _BAENGINE_EVALUATECONDITION_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzCondition; -} BAENGINE_EVALUATECONDITION_ARGS; - -typedef struct _BAENGINE_EVALUATECONDITION_RESULTS -{ - DWORD dwApiVersion; - BOOL f; -} BAENGINE_EVALUATECONDITION_RESULTS; - -typedef struct _BAENGINE_FORMATSTRING_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzIn; -} BAENGINE_FORMATSTRING_ARGS; - -typedef struct _BAENGINE_FORMATSTRING_RESULTS -{ - DWORD dwApiVersion; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - DWORD cchOut; -} BAENGINE_FORMATSTRING_RESULTS; - -typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS -{ - DWORD dwApiVersion; -} BAENGINE_GETPACKAGECOUNT_ARGS; - -typedef struct _BAENGINE_GETPACKAGECOUNT_RESULTS -{ - DWORD dwApiVersion; - DWORD cPackages; -} BAENGINE_GETPACKAGECOUNT_RESULTS; - -typedef struct _BAENGINE_GETVARIABLENUMERIC_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; -} BAENGINE_GETVARIABLENUMERIC_ARGS; - -typedef struct _BAENGINE_GETVARIABLENUMERIC_RESULTS -{ - DWORD dwApiVersion; - LONGLONG llValue; -} BAENGINE_GETVARIABLENUMERIC_RESULTS; - -typedef struct _BAENGINE_GETVARIABLESTRING_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; -} BAENGINE_GETVARIABLESTRING_ARGS; - -typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS -{ - DWORD dwApiVersion; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - DWORD cchValue; -} BAENGINE_GETVARIABLESTRING_RESULTS; - -typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; -} BAENGINE_GETVARIABLEVERSION_ARGS; - -typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS -{ - DWORD dwApiVersion; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - DWORD cchValue; -} BAENGINE_GETVARIABLEVERSION_RESULTS; - -typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS -{ - DWORD dwApiVersion; - DWORD64 hwndParent; - LPCWSTR wzApprovedExeForElevationId; - LPCWSTR wzArguments; - DWORD dwWaitForInputIdleTimeout; -} BAENGINE_LAUNCHAPPROVEDEXE_ARGS; - -typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_LAUNCHAPPROVEDEXE_RESULTS; - -typedef struct _BAENGINE_SETUPDATESOURCE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzUrl; - LPCWSTR wzAuthorizationHeader; -} BAENGINE_SETUPDATESOURCE_ARGS; - -typedef struct _BAENGINE_SETUPDATESOURCE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETUPDATESOURCE_RESULTS; - -typedef struct _BAENGINE_LOG_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_LOG_LEVEL level; - LPCWSTR wzMessage; -} BAENGINE_LOG_ARGS; - -typedef struct _BAENGINE_LOG_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_LOG_RESULTS; - -typedef struct _BAENGINE_PLAN_ARGS -{ - DWORD dwApiVersion; - BOOTSTRAPPER_ACTION action; -} BAENGINE_PLAN_ARGS; - -typedef struct _BAENGINE_PLAN_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_PLAN_RESULTS; - -typedef struct _BAENGINE_QUIT_ARGS -{ - DWORD dwApiVersion; - DWORD dwExitCode; -} BAENGINE_QUIT_ARGS; - -typedef struct _BAENGINE_QUIT_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_QUIT_RESULTS; - -typedef struct _BAENGINE_SENDEMBEDDEDERROR_ARGS -{ - DWORD dwApiVersion; - DWORD dwErrorCode; - LPCWSTR wzMessage; - DWORD dwUIHint; -} BAENGINE_SENDEMBEDDEDERROR_ARGS; - -typedef struct _BAENGINE_SENDEMBEDDEDERROR_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -} BAENGINE_SENDEMBEDDEDERROR_RESULTS; - -typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS -{ - DWORD dwApiVersion; - DWORD dwProgressPercentage; - DWORD dwOverallProgressPercentage; -} BAENGINE_SENDEMBEDDEDPROGRESS_ARGS; - -typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS -{ - DWORD dwApiVersion; - INT32 nResult; -} BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS; - -typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - LPCWSTR wzUrl; - LPCWSTR wzUser; - LPCWSTR wzPassword; - LPCWSTR wzAuthorizationHeader; -} BAENGINE_SETDOWNLOADSOURCE_ARGS; - -typedef struct _BAENGINE_SETDOWNLOADSOURCE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETDOWNLOADSOURCE_RESULTS; - -typedef struct _BAENGINE_SETLOCALSOURCE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzPackageOrContainerId; - LPCWSTR wzPayloadId; - LPCWSTR wzPath; -} BAENGINE_SETLOCALSOURCE_ARGS; - -typedef struct _BAENGINE_SETLOCALSOURCE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETLOCALSOURCE_RESULTS; - -typedef struct _BAENGINE_SETUPDATE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzLocalSource; - LPCWSTR wzDownloadSource; - DWORD64 qwSize; - BOOTSTRAPPER_UPDATE_HASH_TYPE hashType; - LPCWSTR wzHash; - LPCWSTR wzUpdatePackageId; -} BAENGINE_SETUPDATE_ARGS; - -typedef struct _BAENGINE_SETUPDATE_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETUPDATE_RESULTS; - -typedef struct _BAENGINE_SETVARIABLENUMERIC_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; - LONGLONG llValue; -} BAENGINE_SETVARIABLENUMERIC_ARGS; - -typedef struct _BAENGINE_SETVARIABLENUMERIC_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETVARIABLENUMERIC_RESULTS; - -typedef struct _BAENGINE_SETVARIABLESTRING_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; - LPCWSTR wzValue; - BOOL fFormatted; -} BAENGINE_SETVARIABLESTRING_ARGS; - -typedef struct _BAENGINE_SETVARIABLESTRING_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETVARIABLESTRING_RESULTS; - -typedef struct _BAENGINE_SETVARIABLEVERSION_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzVariable; - LPCWSTR wzValue; -} BAENGINE_SETVARIABLEVERSION_ARGS; - -typedef struct _BAENGINE_SETVARIABLEVERSION_RESULTS -{ - DWORD dwApiVersion; -} BAENGINE_SETVARIABLEVERSION_RESULTS; - -typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS -{ - DWORD dwApiVersion; - LPCWSTR wzBundleId; - LPCWSTR wzVariable; -} BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; - -typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS -{ - DWORD dwApiVersion; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - DWORD cchValue; -} BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; - -// extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_ENGINE_PROC)( -// __in BOOTSTRAPPER_ENGINE_MESSAGE message, -// __in const LPVOID pvArgs, -// __inout LPVOID pvResults, -// __in_opt LPVOID pvContext -// ); - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtension.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtension.h deleted file mode 100644 index be76a1a5..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtension.h +++ /dev/null @@ -1,60 +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. - - -#if defined(__cplusplus) -extern "C" { -#endif - -enum BUNDLE_EXTENSION_MESSAGE -{ - BUNDLE_EXTENSION_MESSAGE_SEARCH, -}; - -typedef struct _BUNDLE_EXTENSION_SEARCH_ARGS -{ - DWORD cbSize; - LPCWSTR wzId; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_SEARCH_ARGS; - -typedef struct _BUNDLE_EXTENSION_SEARCH_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_SEARCH_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_PROC)( - __in BUNDLE_EXTENSION_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -typedef struct _BUNDLE_EXTENSION_CREATE_ARGS -{ - DWORD cbSize; - DWORD64 qwEngineAPIVersion; - PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc; - LPVOID pvBundleExtensionEngineProcContext; - LPCWSTR wzBootstrapperWorkingFolder; - LPCWSTR wzBundleExtensionDataPath; - LPCWSTR wzExtensionId; -} BUNDLE_EXTENSION_CREATE_ARGS; - -typedef struct _BUNDLE_EXTENSION_CREATE_RESULTS -{ - DWORD cbSize; - PFN_BUNDLE_EXTENSION_PROC pfnBundleExtensionProc; - LPVOID pvBundleExtensionProcContext; -} BUNDLE_EXTENSION_CREATE_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_CREATE)( - __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, - __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults - ); - -extern "C" typedef void (WINAPI *PFN_BUNDLE_EXTENSION_DESTROY)(); - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h b/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h deleted file mode 100644 index b585d1a2..00000000 --- a/src/api/burn/WixToolset.BootstrapperCore.Native/inc/BundleExtensionEngine.h +++ /dev/null @@ -1,200 +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. - - -#if defined(__cplusplus) -extern "C" { -#endif - -enum BUNDLE_EXTENSION_LOG_LEVEL -{ - BUNDLE_EXTENSION_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) - BUNDLE_EXTENSION_LOG_LEVEL_STANDARD, // written if reporting is on - BUNDLE_EXTENSION_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on - BUNDLE_EXTENSION_LOG_LEVEL_DEBUG, // reporting useful when debugging code - BUNDLE_EXTENSION_LOG_LEVEL_ERROR, // always gets reported, but can never be specified -}; - -enum BUNDLE_EXTENSION_ENGINE_MESSAGE -{ - BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, - BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, - BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, - BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, -}; - -typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS -{ - DWORD cbSize; - LPCWSTR wzVersion1; - LPCWSTR wzVersion2; -} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS -{ - DWORD cbSize; - int nResult; -} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzIn; -} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - SIZE_T cchOut; -} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS -{ - DWORD cbSize; - LPCWSTR wzCondition; -} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS -{ - DWORD cbSize; - BOOL f; -} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzIn; -} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzOut; - // Should be initialized to the size of wzOut. - SIZE_T cchOut; -} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS -{ - DWORD cbSize; - LONGLONG llValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS -{ - DWORD cbSize; - BUNDLE_EXTENSION_LOG_LEVEL level; - LPCWSTR wzMessage; -} BUNDLE_EXTENSION_ENGINE_LOG_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_LOG_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LONGLONG llValue; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LPCWSTR wzValue; - BOOL fFormatted; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS -{ - DWORD cbSize; - LPCWSTR wzVariable; - LPCWSTR wzValue; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS -{ - DWORD cbSize; -} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS -{ - DWORD cbSize; - LPCWSTR wzBundleId; - LPCWSTR wzVariable; -} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; - -typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS -{ - DWORD cbSize; - LPWSTR wzValue; - // Should be initialized to the size of wzValue. - SIZE_T cchValue; -} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; - -extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_ENGINE_PROC)( - __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, - __in const LPVOID pvArgs, - __inout LPVOID pvResults, - __in_opt LPVOID pvContext - ); - -#if defined(__cplusplus) -} -#endif diff --git a/src/api/burn/WixToolset.Mba.Core/BalUtil.cs b/src/api/burn/WixToolset.Mba.Core/BalUtil.cs deleted file mode 100644 index e8b0b7c0..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BalUtil.cs +++ /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. - -namespace WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - internal static class BalUtil - { - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern int BalEscapeStringFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzIn, - ref StrUtil.StrHandle psczOut - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern int BalFormatStringFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzFormat, - ref StrUtil.StrHandle psczOut - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern int BalGetStringVariableFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - ref StrUtil.StrHandle psczOut - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern int BalGetVersionVariableFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - ref StrUtil.StrHandle psczOut - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern int BalGetRelatedBundleVariableFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - ref StrUtil.StrHandle psczOut - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - [return: MarshalAs(UnmanagedType.Bool)] - internal static extern bool BalVariableExistsFromEngine( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperEngine pEngine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable - ); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs b/src/api/burn/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs deleted file mode 100644 index 25995e27..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BaseBootstrapperApplicationFactory.cs +++ /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. - -namespace WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - /// - /// This is no longer used. - /// - [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] - public abstract class BaseBootstrapperApplicationFactory : IBootstrapperApplicationFactory - { - /// - /// This is no longer used. - /// - /// This is no longer used. - /// This is no longer used. - public void Create(IntPtr pArgs, IntPtr pResults) - { - throw new NotImplementedException(); - } - - /// - /// This is no longer used. - /// - /// This is no longer used. - /// This is no longer used. - /// This is no longer used. - protected abstract IBootstrapperApplication Create(IEngine engine, IBootstrapperCommand bootstrapperCommand); - - /// - /// This is no longer used. - /// - /// This is no longer used. - /// This is no longer used. - /// This is no longer used. - public static void InitializeFromCreateArgs(IntPtr pArgs, out IEngine engine, out IBootstrapperCommand bootstrapperCommand) - { - throw new NotImplementedException(); - } - - /// - /// This is no longer used. - /// - /// This is no longer used. - /// This is no longer used. - public static void StoreBAInCreateResults(IntPtr pResults, IBootstrapperApplication ba) - { - throw new NotImplementedException(); - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs deleted file mode 100644 index 98b34217..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplication.cs +++ /dev/null @@ -1,2164 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - using System.Threading; - - /// - /// The default bootstrapper application. - /// - [ClassInterface(ClassInterfaceType.None)] - public abstract class BootstrapperApplication : MarshalByRefObject, IDefaultBootstrapperApplication - { - /// - /// Gets the for interaction with the engine. - /// - protected IEngine engine; - - /// - public event EventHandler Create; - - /// - public event EventHandler Destroy; - - /// - public event EventHandler Startup; - - /// - public event EventHandler Shutdown; - - /// - public event EventHandler DetectBegin; - - /// - public event EventHandler DetectForwardCompatibleBundle; - - /// - public event EventHandler DetectUpdateBegin; - - /// - public event EventHandler DetectUpdate; - - /// - public event EventHandler DetectUpdateComplete; - - /// - public event EventHandler DetectRelatedBundle; - - /// - public event EventHandler DetectPackageBegin; - - /// - public event EventHandler DetectCompatibleMsiPackage; - - /// - public event EventHandler DetectRelatedMsiPackage; - - /// - public event EventHandler DetectPatchTarget; - - /// - public event EventHandler DetectMsiFeature; - - /// - public event EventHandler DetectPackageComplete; - - /// - public event EventHandler DetectComplete; - - /// - public event EventHandler PlanBegin; - - /// - public event EventHandler PlanRelatedBundle; - - /// - public event EventHandler PlanRelatedBundleType; - - /// - public event EventHandler PlanRollbackBoundary; - - /// - public event EventHandler PlanPackageBegin; - - /// - public event EventHandler PlanCompatibleMsiPackageBegin; - - /// - public event EventHandler PlanCompatibleMsiPackageComplete; - - /// - public event EventHandler PlanPatchTarget; - - /// - public event EventHandler PlanMsiFeature; - - /// - public event EventHandler PlanMsiPackage; - - /// - public event EventHandler PlanPackageComplete; - - /// - public event EventHandler PlannedCompatiblePackage; - - /// - public event EventHandler PlannedPackage; - - /// - public event EventHandler PlanComplete; - - /// - public event EventHandler ApplyBegin; - - /// - public event EventHandler ElevateBegin; - - /// - public event EventHandler ElevateComplete; - - /// - public event EventHandler Progress; - - /// - public event EventHandler Error; - - /// - public event EventHandler RegisterBegin; - - /// - public event EventHandler RegisterComplete; - - /// - public event EventHandler UnregisterBegin; - - /// - public event EventHandler UnregisterComplete; - - /// - public event EventHandler CacheBegin; - - /// - public event EventHandler CachePackageBegin; - - /// - public event EventHandler CacheAcquireBegin; - - /// - public event EventHandler CacheAcquireProgress; - - /// - public event EventHandler CacheAcquireResolving; - - /// - public event EventHandler CacheAcquireComplete; - - /// - public event EventHandler CacheVerifyBegin; - - /// - public event EventHandler CacheVerifyProgress; - - /// - public event EventHandler CacheVerifyComplete; - - /// - public event EventHandler CachePackageComplete; - - /// - public event EventHandler CacheComplete; - - /// - public event EventHandler ExecuteBegin; - - /// - public event EventHandler ExecutePackageBegin; - - /// - public event EventHandler ExecutePatchTarget; - - /// - public event EventHandler ExecuteMsiMessage; - - /// - public event EventHandler ExecuteFilesInUse; - - /// - public event EventHandler ExecutePackageComplete; - - /// - public event EventHandler ExecuteComplete; - - /// - public event EventHandler ApplyComplete; - - /// - public event EventHandler ApplyDowngrade; - - /// - public event EventHandler ExecuteProgress; - - /// - public event EventHandler LaunchApprovedExeBegin; - - /// - public event EventHandler LaunchApprovedExeComplete; - - /// - public event EventHandler BeginMsiTransactionBegin; - - /// - public event EventHandler BeginMsiTransactionComplete; - - /// - public event EventHandler CommitMsiTransactionBegin; - - /// - public event EventHandler CommitMsiTransactionComplete; - - /// - public event EventHandler RollbackMsiTransactionBegin; - - /// - public event EventHandler RollbackMsiTransactionComplete; - - /// - public event EventHandler PauseAutomaticUpdatesBegin; - - /// - public event EventHandler PauseAutomaticUpdatesComplete; - - /// - public event EventHandler SystemRestorePointBegin; - - /// - public event EventHandler SystemRestorePointComplete; - - /// - public event EventHandler PlanForwardCompatibleBundle; - - /// - public event EventHandler CacheContainerOrPayloadVerifyBegin; - - /// - public event EventHandler CacheContainerOrPayloadVerifyProgress; - - /// - public event EventHandler CacheContainerOrPayloadVerifyComplete; - - /// - public event EventHandler CachePayloadExtractBegin; - - /// - public event EventHandler CachePayloadExtractProgress; - - /// - public event EventHandler CachePayloadExtractComplete; - - /// - public event EventHandler PlanRestoreRelatedBundle; - - /// - public event EventHandler ExecuteProcessCancel; - - /// - public event EventHandler DetectRelatedBundlePackage; - - /// - public event EventHandler CachePackageNonVitalValidationFailure; - - /// - /// The default constructor. - /// - /// - /// The engine object will be valid after handling the OnCreate() event. - /// - protected BootstrapperApplication() - { - } - - /// - /// This constructor is no longer used. - /// - [Obsolete("This constructor is no longer used. Use the default constructor. The engine object will be valid after handling the OnCreate() event.")] - protected BootstrapperApplication(IEngine engine) - { - throw new NotImplementedException("This constructor is no longer used. Use the default constructor. The engine object will be valid after handling the OnCreate() event."); - } - - /// - /// Entry point that is called when the bootstrapper application is ready to run. - /// - protected abstract void Run(); - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCreate(CreateEventArgs args) - { - this.engine = args.Engine; - - EventHandler handler = this.Create; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDestroy(DestroyEventArgs args) - { - EventHandler handler = this.Destroy; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnStartup(StartupEventArgs args) - { - EventHandler handler = this.Startup; - if (null != handler) - { - handler(this, args); - } - - Thread uiThread = new Thread(this.Run); - uiThread.Name = "UIThread"; - uiThread.SetApartmentState(ApartmentState.STA); - uiThread.Start(); - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnShutdown(ShutdownEventArgs args) - { - EventHandler handler = this.Shutdown; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectBegin(DetectBeginEventArgs args) - { - EventHandler handler = this.DetectBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectForwardCompatibleBundle(DetectForwardCompatibleBundleEventArgs args) - { - EventHandler handler = this.DetectForwardCompatibleBundle; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectUpdateBegin(DetectUpdateBeginEventArgs args) - { - EventHandler handler = this.DetectUpdateBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectUpdate(DetectUpdateEventArgs args) - { - EventHandler handler = this.DetectUpdate; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectUpdateComplete(DetectUpdateCompleteEventArgs args) - { - EventHandler handler = this.DetectUpdateComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectRelatedBundle(DetectRelatedBundleEventArgs args) - { - EventHandler handler = this.DetectRelatedBundle; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectPackageBegin(DetectPackageBeginEventArgs args) - { - EventHandler handler = this.DetectPackageBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectCompatibleMsiPackage(DetectCompatibleMsiPackageEventArgs args) - { - EventHandler handler = this.DetectCompatibleMsiPackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectRelatedMsiPackage(DetectRelatedMsiPackageEventArgs args) - { - EventHandler handler = this.DetectRelatedMsiPackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectPatchTarget(DetectPatchTargetEventArgs args) - { - EventHandler handler = this.DetectPatchTarget; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectMsiFeature(DetectMsiFeatureEventArgs args) - { - EventHandler handler = this.DetectMsiFeature; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectPackageComplete(DetectPackageCompleteEventArgs args) - { - EventHandler handler = this.DetectPackageComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectComplete(DetectCompleteEventArgs args) - { - EventHandler handler = this.DetectComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanBegin(PlanBeginEventArgs args) - { - EventHandler handler = this.PlanBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanRelatedBundle(PlanRelatedBundleEventArgs args) - { - EventHandler handler = this.PlanRelatedBundle; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanRelatedBundleType(PlanRelatedBundleTypeEventArgs args) - { - EventHandler handler = this.PlanRelatedBundleType; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - protected virtual void OnPlanRollbackBoundary(PlanRollbackBoundaryEventArgs args) - { - EventHandler handler = this.PlanRollbackBoundary; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanPackageBegin(PlanPackageBeginEventArgs args) - { - EventHandler handler = this.PlanPackageBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanCompatibleMsiPackageBegin(PlanCompatibleMsiPackageBeginEventArgs args) - { - EventHandler handler = this.PlanCompatibleMsiPackageBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanCompatibleMsiPackageComplete(PlanCompatibleMsiPackageCompleteEventArgs args) - { - EventHandler handler = this.PlanCompatibleMsiPackageComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanPatchTarget(PlanPatchTargetEventArgs args) - { - EventHandler handler = this.PlanPatchTarget; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanMsiFeature(PlanMsiFeatureEventArgs args) - { - EventHandler handler = this.PlanMsiFeature; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanMsiPackage(PlanMsiPackageEventArgs args) - { - EventHandler handler = this.PlanMsiPackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanPackageComplete(PlanPackageCompleteEventArgs args) - { - EventHandler handler = this.PlanPackageComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlannedCompatiblePackage(PlannedCompatiblePackageEventArgs args) - { - EventHandler handler = this.PlannedCompatiblePackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlannedPackage(PlannedPackageEventArgs args) - { - EventHandler handler = this.PlannedPackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanComplete(PlanCompleteEventArgs args) - { - EventHandler handler = this.PlanComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnApplyBegin(ApplyBeginEventArgs args) - { - EventHandler handler = this.ApplyBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnElevateBegin(ElevateBeginEventArgs args) - { - EventHandler handler = this.ElevateBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnElevateComplete(ElevateCompleteEventArgs args) - { - EventHandler handler = this.ElevateComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnProgress(ProgressEventArgs args) - { - EventHandler handler = this.Progress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnError(ErrorEventArgs args) - { - EventHandler handler = this.Error; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnRegisterBegin(RegisterBeginEventArgs args) - { - EventHandler handler = this.RegisterBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnRegisterComplete(RegisterCompleteEventArgs args) - { - EventHandler handler = this.RegisterComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnUnregisterBegin(UnregisterBeginEventArgs args) - { - EventHandler handler = this.UnregisterBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnUnregisterComplete(UnregisterCompleteEventArgs args) - { - EventHandler handler = this.UnregisterComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheBegin(CacheBeginEventArgs args) - { - EventHandler handler = this.CacheBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePackageBegin(CachePackageBeginEventArgs args) - { - EventHandler handler = this.CachePackageBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheAcquireBegin(CacheAcquireBeginEventArgs args) - { - EventHandler handler = this.CacheAcquireBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheAcquireProgress(CacheAcquireProgressEventArgs args) - { - EventHandler handler = this.CacheAcquireProgress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheAcquireResolving(CacheAcquireResolvingEventArgs args) - { - EventHandler handler = this.CacheAcquireResolving; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheAcquireComplete(CacheAcquireCompleteEventArgs args) - { - EventHandler handler = this.CacheAcquireComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheVerifyBegin(CacheVerifyBeginEventArgs args) - { - EventHandler handler = this.CacheVerifyBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheVerifyProgress(CacheVerifyProgressEventArgs args) - { - EventHandler handler = this.CacheVerifyProgress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheVerifyComplete(CacheVerifyCompleteEventArgs args) - { - EventHandler handler = this.CacheVerifyComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePackageComplete(CachePackageCompleteEventArgs args) - { - EventHandler handler = this.CachePackageComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheComplete(CacheCompleteEventArgs args) - { - EventHandler handler = this.CacheComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteBegin(ExecuteBeginEventArgs args) - { - EventHandler handler = this.ExecuteBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecutePackageBegin(ExecutePackageBeginEventArgs args) - { - EventHandler handler = this.ExecutePackageBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecutePatchTarget(ExecutePatchTargetEventArgs args) - { - EventHandler handler = this.ExecutePatchTarget; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteMsiMessage(ExecuteMsiMessageEventArgs args) - { - EventHandler handler = this.ExecuteMsiMessage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteFilesInUse(ExecuteFilesInUseEventArgs args) - { - EventHandler handler = this.ExecuteFilesInUse; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecutePackageComplete(ExecutePackageCompleteEventArgs args) - { - EventHandler handler = this.ExecutePackageComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteComplete(ExecuteCompleteEventArgs args) - { - EventHandler handler = this.ExecuteComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnApplyComplete(ApplyCompleteEventArgs args) - { - EventHandler handler = this.ApplyComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnApplyDowngrade(ApplyDowngradeEventArgs args) - { - EventHandler handler = this.ApplyDowngrade; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteProgress(ExecuteProgressEventArgs args) - { - EventHandler handler = this.ExecuteProgress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnLaunchApprovedExeBegin(LaunchApprovedExeBeginEventArgs args) - { - EventHandler handler = this.LaunchApprovedExeBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnLaunchApprovedExeComplete(LaunchApprovedExeCompleteEventArgs args) - { - EventHandler handler = this.LaunchApprovedExeComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnBeginMsiTransactionBegin(BeginMsiTransactionBeginEventArgs args) - { - EventHandler handler = this.BeginMsiTransactionBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnBeginMsiTransactionComplete(BeginMsiTransactionCompleteEventArgs args) - { - EventHandler handler = this.BeginMsiTransactionComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCommitMsiTransactionBegin(CommitMsiTransactionBeginEventArgs args) - { - EventHandler handler = this.CommitMsiTransactionBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCommitMsiTransactionComplete(CommitMsiTransactionCompleteEventArgs args) - { - EventHandler handler = this.CommitMsiTransactionComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnRollbackMsiTransactionBegin(RollbackMsiTransactionBeginEventArgs args) - { - EventHandler handler = this.RollbackMsiTransactionBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnRollbackMsiTransactionComplete(RollbackMsiTransactionCompleteEventArgs args) - { - EventHandler handler = this.RollbackMsiTransactionComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPauseAutomaticUpdatesBegin(PauseAutomaticUpdatesBeginEventArgs args) - { - EventHandler handler = this.PauseAutomaticUpdatesBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPauseAutomaticUpdatesComplete(PauseAutomaticUpdatesCompleteEventArgs args) - { - EventHandler handler = this.PauseAutomaticUpdatesComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnSystemRestorePointBegin(SystemRestorePointBeginEventArgs args) - { - EventHandler handler = this.SystemRestorePointBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnSystemRestorePointComplete(SystemRestorePointCompleteEventArgs args) - { - EventHandler handler = this.SystemRestorePointComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanForwardCompatibleBundle(PlanForwardCompatibleBundleEventArgs args) - { - EventHandler handler = this.PlanForwardCompatibleBundle; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheContainerOrPayloadVerifyBegin(CacheContainerOrPayloadVerifyBeginEventArgs args) - { - EventHandler handler = this.CacheContainerOrPayloadVerifyBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheContainerOrPayloadVerifyProgress(CacheContainerOrPayloadVerifyProgressEventArgs args) - { - EventHandler handler = this.CacheContainerOrPayloadVerifyProgress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCacheContainerOrPayloadVerifyComplete(CacheContainerOrPayloadVerifyCompleteEventArgs args) - { - EventHandler handler = this.CacheContainerOrPayloadVerifyComplete; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePayloadExtractBegin(CachePayloadExtractBeginEventArgs args) - { - EventHandler handler = this.CachePayloadExtractBegin; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePayloadExtractProgress(CachePayloadExtractProgressEventArgs args) - { - EventHandler handler = this.CachePayloadExtractProgress; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePayloadExtractComplete(CachePayloadExtractCompleteEventArgs args) - { - EventHandler handler = this.CachePayloadExtractComplete; - if (null != handler) - { - handler(this, args); - } - } - - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnPlanRestoreRelatedBundle(PlanRestoreRelatedBundleEventArgs args) - { - EventHandler handler = this.PlanRestoreRelatedBundle; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnExecuteProcessCancel(ExecuteProcessCancelEventArgs args) - { - EventHandler handler = this.ExecuteProcessCancel; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnDetectRelatedBundlePackage(DetectRelatedBundlePackageEventArgs args) - { - EventHandler handler = this.DetectRelatedBundlePackage; - if (null != handler) - { - handler(this, args); - } - } - - /// - /// Called by the engine, raises the event. - /// - /// Additional arguments for this event. - protected virtual void OnCachePackageNonVitalValidationFailure(CachePackageNonVitalValidationFailureEventArgs args) - { - EventHandler handler = this.CachePackageNonVitalValidationFailure; - if (null != handler) - { - handler(this, args); - } - } - - #region IBootstrapperApplication Members - - int IBootstrapperApplication.BAProc(int message, IntPtr pvArgs, IntPtr pvResults) - { - switch (message) - { - default: - return NativeMethods.E_NOTIMPL; - } - } - - void IBootstrapperApplication.BAProcFallback(int message, IntPtr pvArgs, IntPtr pvResults, ref int phr) - { - } - - int IBootstrapperApplication.OnCreate(IBootstrapperEngine engine, ref Command command) - { - CreateEventArgs args = new CreateEventArgs(new Engine(engine), command.GetBootstrapperCommand()); - this.OnCreate(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnDestroy(bool reload) - { - DestroyEventArgs args = new DestroyEventArgs(reload); - this.OnDestroy(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnStartup() - { - StartupEventArgs args = new StartupEventArgs(); - this.OnStartup(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action) - { - ShutdownEventArgs args = new ShutdownEventArgs(action); - this.OnShutdown(args); - - action = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectBegin(bool fCached, RegistrationType registrationType, int cPackages, ref bool fCancel) - { - DetectBeginEventArgs args = new DetectBeginEventArgs(fCached, registrationType, cPackages, fCancel); - this.OnDetectBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) - { - DetectForwardCompatibleBundleEventArgs args = new DetectForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); - this.OnDetectForwardCompatibleBundle(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectUpdateBegin(string wzUpdateLocation, ref bool fCancel, ref bool fSkip) - { - DetectUpdateBeginEventArgs args = new DetectUpdateBeginEventArgs(wzUpdateLocation, fCancel, fSkip); - this.OnDetectUpdateBegin(args); - - fCancel = args.Cancel; - fSkip = args.Skip; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectUpdate(string wzUpdateLocation, long dw64Size, string wzHash, UpdateHashType hashAlgorithm, string wzVersion, string wzTitle, string wzSummary, string wzContentType, string wzContent, ref bool fCancel, ref bool fStopProcessingUpdates) - { - DetectUpdateEventArgs args = new DetectUpdateEventArgs(wzUpdateLocation, dw64Size, wzHash, hashAlgorithm, wzVersion, wzTitle, wzSummary, wzContentType, wzContent, fCancel, fStopProcessingUpdates); - this.OnDetectUpdate(args); - - fCancel = args.Cancel; - fStopProcessingUpdates = args.StopProcessingUpdates; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectUpdateComplete(int hrStatus, ref bool fIgnoreError) - { - DetectUpdateCompleteEventArgs args = new DetectUpdateCompleteEventArgs(hrStatus, fIgnoreError); - this.OnDetectUpdateComplete(args); - - fIgnoreError = args.IgnoreError; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectRelatedBundle(string wzProductCode, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fMissingFromCache, ref bool fCancel) - { - DetectRelatedBundleEventArgs args = new DetectRelatedBundleEventArgs(wzProductCode, relationType, wzBundleTag, fPerMachine, wzVersion, fMissingFromCache, fCancel); - this.OnDetectRelatedBundle(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectPackageBegin(string wzPackageId, ref bool fCancel) - { - DetectPackageBeginEventArgs args = new DetectPackageBeginEventArgs(wzPackageId, fCancel); - this.OnDetectPackageBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectCompatibleMsiPackage(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, ref bool fCancel) - { - DetectCompatibleMsiPackageEventArgs args = new DetectCompatibleMsiPackageEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, fCancel); - this.OnDetectCompatibleMsiPackage(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectRelatedMsiPackage(string wzPackageId, string wzUpgradeCode, string wzProductCode, bool fPerMachine, string wzVersion, RelatedOperation operation, ref bool fCancel) - { - DetectRelatedMsiPackageEventArgs args = new DetectRelatedMsiPackageEventArgs(wzPackageId, wzUpgradeCode, wzProductCode, fPerMachine, wzVersion, operation, fCancel); - this.OnDetectRelatedMsiPackage(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectPatchTarget(string wzPackageId, string wzProductCode, PackageState patchState, ref bool fCancel) - { - DetectPatchTargetEventArgs args = new DetectPatchTargetEventArgs(wzPackageId, wzProductCode, patchState, fCancel); - this.OnDetectPatchTarget(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectMsiFeature(string wzPackageId, string wzFeatureId, FeatureState state, ref bool fCancel) - { - DetectMsiFeatureEventArgs args = new DetectMsiFeatureEventArgs(wzPackageId, wzFeatureId, state, fCancel); - this.OnDetectMsiFeature(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectPackageComplete(string wzPackageId, int hrStatus, PackageState state, bool fCached) - { - DetectPackageCompleteEventArgs args = new DetectPackageCompleteEventArgs(wzPackageId, hrStatus, state, fCached); - this.OnDetectPackageComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnDetectComplete(int hrStatus, bool fEligibleForCleanup) - { - DetectCompleteEventArgs args = new DetectCompleteEventArgs(hrStatus, fEligibleForCleanup); - this.OnDetectComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlanBegin(int cPackages, ref bool fCancel) - { - PlanBeginEventArgs args = new PlanBeginEventArgs(cPackages, fCancel); - this.OnPlanBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) - { - PlanRelatedBundleEventArgs args = new PlanRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); - this.OnPlanRelatedBundle(args); - - pRequestedState = args.State; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanRelatedBundleType(string wzBundleId, RelatedBundlePlanType recommendedType, ref RelatedBundlePlanType pRequestedType, ref bool fCancel) - { - PlanRelatedBundleTypeEventArgs args = new PlanRelatedBundleTypeEventArgs(wzBundleId, recommendedType, pRequestedType, fCancel); - this.OnPlanRelatedBundleType(args); - - pRequestedType = args.Type; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanRollbackBoundary(string wzRollbackBoundaryId, bool fRecommendedTransaction, ref bool fTransaction, ref bool fCancel) - { - PlanRollbackBoundaryEventArgs args = new PlanRollbackBoundaryEventArgs(wzRollbackBoundaryId, fRecommendedTransaction, fTransaction, fCancel); - this.OnPlanRollbackBoundary(args); - - fTransaction = args.Transaction; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanPackageBegin(string wzPackageId, PackageState state, bool fCached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, ref RequestState pRequestedState, ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, ref bool fCancel) - { - PlanPackageBeginEventArgs args = new PlanPackageBeginEventArgs(wzPackageId, state, fCached, installCondition, repairCondition, recommendedState, recommendedCacheType, pRequestedState, pRequestedCacheType, fCancel); - this.OnPlanPackageBegin(args); - - pRequestedState = args.State; - pRequestedCacheType = args.CacheType; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanCompatibleMsiPackageBegin(string wzPackageId, string wzCompatiblePackageId, string wzCompatiblePackageVersion, bool recommendedRemove, ref bool pRequestedRemove, ref bool fCancel) - { - PlanCompatibleMsiPackageBeginEventArgs args = new PlanCompatibleMsiPackageBeginEventArgs(wzPackageId, wzCompatiblePackageId, wzCompatiblePackageVersion, recommendedRemove, pRequestedRemove, fCancel); - this.OnPlanCompatibleMsiPackageBegin(args); - - pRequestedRemove = args.RequestRemove; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanCompatibleMsiPackageComplete(string wzPackageId, string wzCompatiblePackageId, int hrStatus, bool requestedRemove) - { - PlanCompatibleMsiPackageCompleteEventArgs args = new PlanCompatibleMsiPackageCompleteEventArgs(wzPackageId, wzCompatiblePackageId, hrStatus, requestedRemove); - this.OnPlanCompatibleMsiPackageComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlanPatchTarget(string wzPackageId, string wzProductCode, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) - { - PlanPatchTargetEventArgs args = new PlanPatchTargetEventArgs(wzPackageId, wzProductCode, recommendedState, pRequestedState, fCancel); - this.OnPlanPatchTarget(args); - - pRequestedState = args.State; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanMsiFeature(string wzPackageId, string wzFeatureId, FeatureState recommendedState, ref FeatureState pRequestedState, ref bool fCancel) - { - PlanMsiFeatureEventArgs args = new PlanMsiFeatureEventArgs(wzPackageId, wzFeatureId, recommendedState, pRequestedState, fCancel); - this.OnPlanMsiFeature(args); - - pRequestedState = args.State; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanMsiPackage(string wzPackageId, bool fExecute, ActionState action, BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, ref bool fCancel, ref BURN_MSI_PROPERTY actionMsiProperty, ref INSTALLUILEVEL uiLevel, ref bool fDisableExternalUiHandler, ref BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning) - { - PlanMsiPackageEventArgs args = new PlanMsiPackageEventArgs(wzPackageId, fExecute, action, recommendedFileVersioning, fCancel, actionMsiProperty, uiLevel, fDisableExternalUiHandler, fileVersioning); - this.OnPlanMsiPackage(args); - - fCancel = args.Cancel; - actionMsiProperty = args.ActionMsiProperty; - uiLevel = args.UiLevel; - fDisableExternalUiHandler = args.DisableExternalUiHandler; - fileVersioning = args.FileVersioning; - return args.HResult; - } - - int IBootstrapperApplication.OnPlanPackageComplete(string wzPackageId, int hrStatus, RequestState requested) - { - var args = new PlanPackageCompleteEventArgs(wzPackageId, hrStatus, requested); - this.OnPlanPackageComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlannedCompatiblePackage(string wzPackageId, string wzCompatiblePackageId, bool remove) - { - var args = new PlannedCompatiblePackageEventArgs(wzPackageId, wzCompatiblePackageId, remove); - this.OnPlannedCompatiblePackage(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlannedPackage(string wzPackageId, ActionState execute, ActionState rollback, bool fPlannedCache, bool fPlannedUncache) - { - var args = new PlannedPackageEventArgs(wzPackageId, execute, rollback, fPlannedCache, fPlannedUncache); - this.OnPlannedPackage(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlanComplete(int hrStatus) - { - PlanCompleteEventArgs args = new PlanCompleteEventArgs(hrStatus); - this.OnPlanComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnApplyBegin(int dwPhaseCount, ref bool fCancel) - { - ApplyBeginEventArgs args = new ApplyBeginEventArgs(dwPhaseCount, fCancel); - this.OnApplyBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnElevateBegin(ref bool fCancel) - { - ElevateBeginEventArgs args = new ElevateBeginEventArgs(fCancel); - this.OnElevateBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnElevateComplete(int hrStatus) - { - ElevateCompleteEventArgs args = new ElevateCompleteEventArgs(hrStatus); - this.OnElevateComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnProgress(int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) - { - ProgressEventArgs args = new ProgressEventArgs(dwProgressPercentage, dwOverallPercentage, fCancel); - this.OnProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnError(ErrorType errorType, string wzPackageId, int dwCode, string wzError, int dwUIHint, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) - { - ErrorEventArgs args = new ErrorEventArgs(errorType, wzPackageId, dwCode, wzError, dwUIHint, rgwzData, nRecommendation, pResult); - this.OnError(args); - - pResult = args.Result; - return args.HResult; - } - - int IBootstrapperApplication.OnRegisterBegin(RegistrationType recommendedRegistrationType, ref bool fCancel, ref RegistrationType registrationType) - { - RegisterBeginEventArgs args = new RegisterBeginEventArgs(recommendedRegistrationType, fCancel, registrationType); - this.OnRegisterBegin(args); - - fCancel = args.Cancel; - registrationType = args.RegistrationType; - return args.HResult; - } - - int IBootstrapperApplication.OnRegisterComplete(int hrStatus) - { - RegisterCompleteEventArgs args = new RegisterCompleteEventArgs(hrStatus); - this.OnRegisterComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnCacheBegin(ref bool fCancel) - { - CacheBeginEventArgs args = new CacheBeginEventArgs(fCancel); - this.OnCacheBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCachePackageBegin(string wzPackageId, int cCachePayloads, long dw64PackageCacheSize, bool fVital, ref bool fCancel) - { - CachePackageBeginEventArgs args = new CachePackageBeginEventArgs(wzPackageId, cCachePayloads, dw64PackageCacheSize, fVital, fCancel); - this.OnCachePackageBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheAcquireBegin(string wzPackageOrContainerId, string wzPayloadId, string wzSource, string wzDownloadUrl, string wzPayloadContainerId, CacheOperation recommendation, ref CacheOperation action, ref bool fCancel) - { - CacheAcquireBeginEventArgs args = new CacheAcquireBeginEventArgs(wzPackageOrContainerId, wzPayloadId, wzSource, wzDownloadUrl, wzPayloadContainerId, recommendation, action, fCancel); - this.OnCacheAcquireBegin(args); - - action = args.Action; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheAcquireProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) - { - CacheAcquireProgressEventArgs args = new CacheAcquireProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); - this.OnCacheAcquireProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheAcquireResolving(string wzPackageOrContainerId, string wzPayloadId, string[] searchPaths, int cSearchPaths, bool fFoundLocal, int dwRecommendedSearchPath, string wzDownloadUrl, string wzPayloadContainerId, CacheResolveOperation recommendation, ref int dwChosenSearchPath, ref CacheResolveOperation action, ref bool fCancel) - { - CacheAcquireResolvingEventArgs args = new CacheAcquireResolvingEventArgs(wzPackageOrContainerId, wzPayloadId, searchPaths, fFoundLocal, dwRecommendedSearchPath, wzDownloadUrl, wzPayloadContainerId, recommendation, dwChosenSearchPath, action, fCancel); - this.OnCacheAcquireResolving(args); - - dwChosenSearchPath = args.ChosenSearchPath; - action = args.Action; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheAcquireComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) - { - CacheAcquireCompleteEventArgs args = new CacheAcquireCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); - this.OnCacheAcquireComplete(args); - - action = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) - { - CacheVerifyBeginEventArgs args = new CacheVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); - this.OnCacheVerifyBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, CacheVerifyStep verifyStep, ref bool fCancel) - { - CacheVerifyProgressEventArgs args = new CacheVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, verifyStep, fCancel); - this.OnCacheVerifyProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) - { - CacheVerifyCompleteEventArgs args = new CacheVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus, recommendation, action); - this.OnCacheVerifyComplete(args); - - action = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnCachePackageComplete(string wzPackageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) - { - CachePackageCompleteEventArgs args = new CachePackageCompleteEventArgs(wzPackageId, hrStatus, recommendation, action); - this.OnCachePackageComplete(args); - - action = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheComplete(int hrStatus) - { - CacheCompleteEventArgs args = new CacheCompleteEventArgs(hrStatus); - this.OnCacheComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteBegin(int cExecutingPackages, ref bool fCancel) - { - ExecuteBeginEventArgs args = new ExecuteBeginEventArgs(cExecutingPackages, fCancel); - this.OnExecuteBegin(args); - - args.Cancel = fCancel; - return args.HResult; - } - - int IBootstrapperApplication.OnExecutePackageBegin(string wzPackageId, bool fExecute, ActionState action, INSTALLUILEVEL uiLevel, bool fDisableExternalUiHandler, ref bool fCancel) - { - ExecutePackageBeginEventArgs args = new ExecutePackageBeginEventArgs(wzPackageId, fExecute, action, uiLevel, fDisableExternalUiHandler, fCancel); - this.OnExecutePackageBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnExecutePatchTarget(string wzPackageId, string wzTargetProductCode, ref bool fCancel) - { - ExecutePatchTargetEventArgs args = new ExecutePatchTargetEventArgs(wzPackageId, wzTargetProductCode, fCancel); - this.OnExecutePatchTarget(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteProgress(string wzPackageId, int dwProgressPercentage, int dwOverallPercentage, ref bool fCancel) - { - ExecuteProgressEventArgs args = new ExecuteProgressEventArgs(wzPackageId, dwProgressPercentage, dwOverallPercentage, fCancel); - this.OnExecuteProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteMsiMessage(string wzPackageId, InstallMessage messageType, int dwUIHint, string wzMessage, int cData, string[] rgwzData, Result nRecommendation, ref Result pResult) - { - ExecuteMsiMessageEventArgs args = new ExecuteMsiMessageEventArgs(wzPackageId, messageType, dwUIHint, wzMessage, rgwzData, nRecommendation, pResult); - this.OnExecuteMsiMessage(args); - - pResult = args.Result; - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteFilesInUse(string wzPackageId, int cFiles, string[] rgwzFiles, Result nRecommendation, FilesInUseType source, ref Result pResult) - { - ExecuteFilesInUseEventArgs args = new ExecuteFilesInUseEventArgs(wzPackageId, rgwzFiles, nRecommendation, source, pResult); - this.OnExecuteFilesInUse(args); - - pResult = args.Result; - return args.HResult; - } - - int IBootstrapperApplication.OnExecutePackageComplete(string wzPackageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction) - { - ExecutePackageCompleteEventArgs args = new ExecutePackageCompleteEventArgs(wzPackageId, hrStatus, restart, recommendation, pAction); - this.OnExecutePackageComplete(args); - - pAction = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteComplete(int hrStatus) - { - ExecuteCompleteEventArgs args = new ExecuteCompleteEventArgs(hrStatus); - this.OnExecuteComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnUnregisterBegin(RegistrationType recommendedRegistrationType, ref RegistrationType registrationType) - { - UnregisterBeginEventArgs args = new UnregisterBeginEventArgs(recommendedRegistrationType, registrationType); - this.OnUnregisterBegin(args); - - registrationType = args.RegistrationType; - return args.HResult; - } - - int IBootstrapperApplication.OnUnregisterComplete(int hrStatus) - { - UnregisterCompleteEventArgs args = new UnregisterCompleteEventArgs(hrStatus); - this.OnUnregisterComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnApplyComplete(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction) - { - ApplyCompleteEventArgs args = new ApplyCompleteEventArgs(hrStatus, restart, recommendation, pAction); - this.OnApplyComplete(args); - - pAction = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnApplyDowngrade(int hrRecommendation, ref int hrStatus) - { - ApplyDowngradeEventArgs args = new ApplyDowngradeEventArgs(hrRecommendation, hrStatus); - this.OnApplyDowngrade(args); - - hrStatus = args.Status; - return args.HResult; - } - - int IBootstrapperApplication.OnLaunchApprovedExeBegin(ref bool fCancel) - { - LaunchApprovedExeBeginEventArgs args = new LaunchApprovedExeBeginEventArgs(fCancel); - this.OnLaunchApprovedExeBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnLaunchApprovedExeComplete(int hrStatus, int processId) - { - LaunchApprovedExeCompleteEventArgs args = new LaunchApprovedExeCompleteEventArgs(hrStatus, processId); - this.OnLaunchApprovedExeComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnBeginMsiTransactionBegin(string transactionId, ref bool fCancel) - { - BeginMsiTransactionBeginEventArgs args = new BeginMsiTransactionBeginEventArgs(transactionId, fCancel); - this.OnBeginMsiTransactionBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnBeginMsiTransactionComplete(string transactionId, int hrStatus) - { - BeginMsiTransactionCompleteEventArgs args = new BeginMsiTransactionCompleteEventArgs(transactionId, hrStatus); - this.OnBeginMsiTransactionComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnCommitMsiTransactionBegin(string transactionId, ref bool fCancel) - { - CommitMsiTransactionBeginEventArgs args = new CommitMsiTransactionBeginEventArgs(transactionId, fCancel); - this.OnCommitMsiTransactionBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCommitMsiTransactionComplete(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction) - { - CommitMsiTransactionCompleteEventArgs args = new CommitMsiTransactionCompleteEventArgs(transactionId, hrStatus, restart, recommendation, pAction); - this.OnCommitMsiTransactionComplete(args); - - pAction = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnRollbackMsiTransactionBegin(string transactionId) - { - RollbackMsiTransactionBeginEventArgs args = new RollbackMsiTransactionBeginEventArgs(transactionId); - this.OnRollbackMsiTransactionBegin(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnRollbackMsiTransactionComplete(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction) - { - RollbackMsiTransactionCompleteEventArgs args = new RollbackMsiTransactionCompleteEventArgs(transactionId, hrStatus, restart, recommendation, pAction); - this.OnRollbackMsiTransactionComplete(args); - - pAction = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnPauseAutomaticUpdatesBegin() - { - PauseAutomaticUpdatesBeginEventArgs args = new PauseAutomaticUpdatesBeginEventArgs(); - this.OnPauseAutomaticUpdatesBegin(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPauseAutomaticUpdatesComplete(int hrStatus) - { - PauseAutomaticUpdatesCompleteEventArgs args = new PauseAutomaticUpdatesCompleteEventArgs(hrStatus); - this.OnPauseAutomaticUpdatesComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnSystemRestorePointBegin() - { - SystemRestorePointBeginEventArgs args = new SystemRestorePointBeginEventArgs(); - this.OnSystemRestorePointBegin(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnSystemRestorePointComplete(int hrStatus) - { - SystemRestorePointCompleteEventArgs args = new SystemRestorePointCompleteEventArgs(hrStatus); - this.OnSystemRestorePointComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlanForwardCompatibleBundle(string wzBundleId, RelationType relationType, string wzBundleTag, bool fPerMachine, string wzVersion, bool fRecommendedIgnoreBundle, ref bool fCancel, ref bool fIgnoreBundle) - { - PlanForwardCompatibleBundleEventArgs args = new PlanForwardCompatibleBundleEventArgs(wzBundleId, relationType, wzBundleTag, fPerMachine, wzVersion, fRecommendedIgnoreBundle, fCancel, fIgnoreBundle); - this.OnPlanForwardCompatibleBundle(args); - - fCancel = args.Cancel; - fIgnoreBundle = args.IgnoreBundle; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyBegin(string wzPackageOrContainerId, string wzPayloadId, ref bool fCancel) - { - CacheContainerOrPayloadVerifyBeginEventArgs args = new CacheContainerOrPayloadVerifyBeginEventArgs(wzPackageOrContainerId, wzPayloadId, fCancel); - this.OnCacheContainerOrPayloadVerifyBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyProgress(string wzPackageOrContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) - { - CacheContainerOrPayloadVerifyProgressEventArgs args = new CacheContainerOrPayloadVerifyProgressEventArgs(wzPackageOrContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); - this.OnCacheContainerOrPayloadVerifyProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCacheContainerOrPayloadVerifyComplete(string wzPackageOrContainerId, string wzPayloadId, int hrStatus) - { - CacheContainerOrPayloadVerifyCompleteEventArgs args = new CacheContainerOrPayloadVerifyCompleteEventArgs(wzPackageOrContainerId, wzPayloadId, hrStatus); - this.OnCacheContainerOrPayloadVerifyComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnCachePayloadExtractBegin(string wzContainerId, string wzPayloadId, ref bool fCancel) - { - CachePayloadExtractBeginEventArgs args = new CachePayloadExtractBeginEventArgs(wzContainerId, wzPayloadId, fCancel); - this.OnCachePayloadExtractBegin(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCachePayloadExtractProgress(string wzContainerId, string wzPayloadId, long dw64Progress, long dw64Total, int dwOverallPercentage, ref bool fCancel) - { - CachePayloadExtractProgressEventArgs args = new CachePayloadExtractProgressEventArgs(wzContainerId, wzPayloadId, dw64Progress, dw64Total, dwOverallPercentage, fCancel); - this.OnCachePayloadExtractProgress(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCachePayloadExtractComplete(string wzContainerId, string wzPayloadId, int hrStatus) - { - CachePayloadExtractCompleteEventArgs args = new CachePayloadExtractCompleteEventArgs(wzContainerId, wzPayloadId, hrStatus); - this.OnCachePayloadExtractComplete(args); - - return args.HResult; - } - - int IBootstrapperApplication.OnPlanRestoreRelatedBundle(string wzBundleId, RequestState recommendedState, ref RequestState pRequestedState, ref bool fCancel) - { - PlanRestoreRelatedBundleEventArgs args = new PlanRestoreRelatedBundleEventArgs(wzBundleId, recommendedState, pRequestedState, fCancel); - this.OnPlanRestoreRelatedBundle(args); - - pRequestedState = args.State; - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnExecuteProcessCancel(string wzPackageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction) - { - ExecuteProcessCancelEventArgs args = new ExecuteProcessCancelEventArgs(wzPackageId, processId, recommendation, pAction); - this.OnExecuteProcessCancel(args); - - pAction = args.Action; - return args.HResult; - } - - int IBootstrapperApplication.OnDetectRelatedBundlePackage(string wzPackageId, string wzProductCode, RelationType relationType, bool fPerMachine, string wzVersion, ref bool fCancel) - { - DetectRelatedBundlePackageEventArgs args = new DetectRelatedBundlePackageEventArgs(wzPackageId, wzProductCode, relationType, fPerMachine, wzVersion, fCancel); - this.OnDetectRelatedBundlePackage(args); - - fCancel = args.Cancel; - return args.HResult; - } - - int IBootstrapperApplication.OnCachePackageNonVitalValidationFailure(string wzPackageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, ref BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action) - { - CachePackageNonVitalValidationFailureEventArgs args = new CachePackageNonVitalValidationFailureEventArgs(wzPackageId, hrStatus, recommendation, action); - this.OnCachePackageNonVitalValidationFailure(args); - - action = args.Action; - return args.HResult; - } - - #endregion - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationData.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationData.cs deleted file mode 100644 index 13428493..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationData.cs +++ /dev/null @@ -1,101 +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 WixToolset.Mba.Core -{ - using System; - using System.IO; - using System.Xml.XPath; - - /// - /// Utility class for reading BootstrapperApplicationData.xml. - /// - public class BootstrapperApplicationData : IBootstrapperApplicationData - { - /// - /// The default file name for BootstrapperApplicationData. - /// - public const string DefaultFileName = "BootstrapperApplicationData.xml"; - - /// - /// The XML namespace for BootstrapperApplicationData. - /// - public const string XMLNamespace = "http://wixtoolset.org/schemas/v4/BootstrapperApplicationData"; - - /// - /// The default path of where the BA was extracted to. - /// - public static readonly DirectoryInfo DefaultFolder; - - /// - /// The default path to BootstrapperApplicationData.xml. - /// - public static readonly FileInfo DefaultFile; - - static BootstrapperApplicationData() - { - DefaultFolder = new DirectoryInfo(AppDomain.CurrentDomain.BaseDirectory); - DefaultFile = new FileInfo(Path.Combine(DefaultFolder.FullName, DefaultFileName)); - } - - /// - public FileInfo BADataFile { get; private set; } - - /// - public IBundleInfo Bundle { get; private set; } - - /// - /// Uses the default location for BootstrapperApplicationData.xml. - /// - public BootstrapperApplicationData() : this(DefaultFile) { } - - /// - /// Uses the given file for BootstrapperApplicationData.xml. - /// - /// - public BootstrapperApplicationData(FileInfo baDataFile) - { - this.BADataFile = baDataFile; - - using (FileStream fs = this.BADataFile.OpenRead()) - { - this.Bundle = BundleInfo.ParseBundleFromStream(fs); - } - } - - /// - /// Utility method for parsing BootstrapperApplicationData.xml. - /// - /// - /// - /// - public static string GetAttribute(XPathNavigator node, string attributeName) - { - XPathNavigator attribute = node.SelectSingleNode("@" + attributeName); - - if (attribute == null) - { - return null; - } - - return attribute.Value; - } - - /// - /// Utility method for parsing BootstrapperApplicationData.xml. - /// - /// - /// - /// - public static bool? GetYesNoAttribute(XPathNavigator node, string attributeName) - { - string attributeValue = GetAttribute(node, attributeName); - - if (attributeValue == null) - { - return null; - } - - return attributeValue.Equals("yes", StringComparison.InvariantCulture); - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationFactoryAttribute.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationFactoryAttribute.cs deleted file mode 100644 index 6b465408..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperApplicationFactoryAttribute.cs +++ /dev/null @@ -1,31 +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 WixToolset.Mba.Core -{ - using System; - - /// - /// This is no longer used. - /// - [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] - [AttributeUsage(AttributeTargets.Assembly, AllowMultiple = false)] - public sealed class BootstrapperApplicationFactoryAttribute : Attribute - { - /// - /// This is no longer used. - /// - /// This is no longer used - public BootstrapperApplicationFactoryAttribute(Type bootstrapperApplicationFactoryType) - { - throw new NotImplementedException(); - } - - /// - /// This is no longer used. - /// - public Type BootstrapperApplicationFactoryType - { - get { throw new NotImplementedException(); } - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BootstrapperCommand.cs b/src/api/burn/WixToolset.Mba.Core/BootstrapperCommand.cs deleted file mode 100644 index b96a8f95..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BootstrapperCommand.cs +++ /dev/null @@ -1,239 +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 WixToolset.Mba.Core -{ - using System; - using System.CodeDom.Compiler; - using System.Collections.Generic; - using System.ComponentModel; - using System.Runtime.InteropServices; - - /// - /// Command-line provided to the bootstrapper application. - /// - [Serializable] - [StructLayout(LayoutKind.Sequential)] - [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] - public struct Command - { - // Strings must be declared as pointers so that Marshaling doesn't free them. - [MarshalAs(UnmanagedType.I4)] internal int cbSize; - [MarshalAs(UnmanagedType.U4)] private readonly LaunchAction action; - [MarshalAs(UnmanagedType.U4)] private readonly Display display; - private readonly IntPtr wzCommandLine; - [MarshalAs(UnmanagedType.I4)] private readonly int nCmdShow; - [MarshalAs(UnmanagedType.U4)] private readonly ResumeType resume; - private readonly IntPtr hwndSplashScreen; - [MarshalAs(UnmanagedType.I4)] private readonly RelationType relation; - [MarshalAs(UnmanagedType.Bool)] private readonly bool passthrough; - private readonly IntPtr wzLayoutDirectory; - private readonly IntPtr wzBootstrapperWorkingFolder; - private readonly IntPtr wzBootstrapperApplicationDataPath; - - /// - /// Gets the IBootstrapperCommand for this Command. - /// - /// IBootstrapperCommand - public IBootstrapperCommand GetBootstrapperCommand() - { - return new BootstrapperCommand( - this.action, - this.display, - Marshal.PtrToStringUni(this.wzCommandLine), - this.nCmdShow, - this.resume, - this.hwndSplashScreen, - this.relation, - this.passthrough, - Marshal.PtrToStringUni(this.wzLayoutDirectory), - Marshal.PtrToStringUni(this.wzBootstrapperWorkingFolder), - Marshal.PtrToStringUni(this.wzBootstrapperApplicationDataPath)); - } - } - - /// - /// Default implementation of . - /// - public sealed class BootstrapperCommand : IBootstrapperCommand - { - /// - /// See . - /// - public BootstrapperCommand( - LaunchAction action, - Display display, - string commandLine, - int cmdShow, - ResumeType resume, - IntPtr splashScreen, - RelationType relation, - bool passthrough, - string layoutDirectory, - string bootstrapperWorkingFolder, - string bootstrapperApplicationDataPath) - { - this.Action = action; - this.Display = display; - this.CommandLine = commandLine; - this.CmdShow = cmdShow; - this.Resume = resume; - this.SplashScreen = splashScreen; - this.Relation = relation; - this.Passthrough = passthrough; - this.LayoutDirectory = layoutDirectory; - this.BootstrapperWorkingFolder = bootstrapperWorkingFolder; - this.BootstrapperApplicationDataPath = bootstrapperApplicationDataPath; - } - - /// - public LaunchAction Action { get; } - - /// - public Display Display { get; } - - /// - public string CommandLine { get; } - - /// - public int CmdShow { get; } - - /// - public ResumeType Resume { get; } - - /// - public IntPtr SplashScreen { get; } - - /// - public RelationType Relation { get; } - - /// - public bool Passthrough { get; } - - /// - public string LayoutDirectory { get; } - - /// - public string BootstrapperWorkingFolder { get; } - - /// - public string BootstrapperApplicationDataPath { get; } - - /// - public IMbaCommand ParseCommandLine() - { - var args = ParseCommandLineToArgs(this.CommandLine); - var unknownArgs = new List(); - var variables = new List>(); - var restart = Restart.Unknown; - - foreach (var arg in args) - { - var unknownArg = false; - - if (arg[0] == '-' || arg[0] == '/') - { - var parameter = arg.Substring(1).ToLowerInvariant(); - switch (parameter) - { - case "norestart": - if (restart == Restart.Unknown) - { - restart = Restart.Never; - } - break; - case "forcerestart": - if (restart == Restart.Unknown) - { - restart = Restart.Always; - } - break; - default: - unknownArg = true; - break; - } - } - else - { - var index = arg.IndexOf('='); - if (index == -1) - { - unknownArg = true; - } - else - { - var name = arg.Substring(0, index); - var value = arg.Substring(index + 1); - variables.Add(new KeyValuePair(name, value)); - } - } - - if (unknownArg) - { - unknownArgs.Add(arg); - } - } - - if (restart == Restart.Unknown) - { - restart = this.Display < Display.Full ? Restart.Automatic : Restart.Prompt; - } - - return new MbaCommand - { - Restart = restart, - UnknownCommandLineArgs = unknownArgs.ToArray(), - Variables = variables.ToArray(), - }; - } - - /// - /// Gets the command line arguments as a string array. - /// - /// - /// Array of command line arguments. - /// - /// The command line could not be parsed into an array. - /// - /// This method uses the same parsing as the operating system which handles quotes and spaces correctly. - /// - public static string[] ParseCommandLineToArgs(string commandLine) - { - if (null == commandLine) - { - return new string[0]; - } - - // Parse the filtered command line arguments into a native array. - int argc = 0; - - // CommandLineToArgvW tries to treat the first argument as the path to the process, - // which fails pretty miserably if your first argument is something like - // FOO="C:\Program Files\My Company". So give it something harmless to play with. - IntPtr argv = NativeMethods.CommandLineToArgvW("ignored " + commandLine, out argc); - - if (IntPtr.Zero == argv) - { - // Throw an exception with the last error. - throw new Win32Exception(); - } - - // Marshal each native array pointer to a managed string. - try - { - // Skip "ignored" argument/hack. - string[] args = new string[argc - 1]; - for (int i = 1; i < argc; ++i) - { - IntPtr argvi = Marshal.ReadIntPtr(argv, i * IntPtr.Size); - args[i - 1] = Marshal.PtrToStringUni(argvi); - } - - return args; - } - finally - { - NativeMethods.LocalFree(argv); - } - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs b/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs deleted file mode 100644 index 0039f375..00000000 --- a/src/api/burn/WixToolset.Mba.Core/BundleInfo.cs +++ /dev/null @@ -1,99 +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 WixToolset.Mba.Core -{ - using System; - using System.Collections.Generic; - using System.IO; - using System.Xml; - using System.Xml.XPath; - - /// - /// Default implementation of . - /// - public class BundleInfo : IBundleInfo - { - /// - public bool PerMachine { get; internal set; } - - /// - public string Name { get; internal set; } - - /// - public string LogVariable { get; internal set; } - - /// - public IOverridableVariables OverridableVariables { get; internal set; } - - /// - public IDictionary Packages { get; internal set; } - - internal BundleInfo() - { - this.Packages = new Dictionary(); - } - - /// - public IPackageInfo AddRelatedBundleAsPackage(string productCode, RelationType relationType, bool perMachine, string version) - { - var package = PackageInfo.GetRelatedBundleAsPackage(productCode, relationType, perMachine, version); - this.Packages.Add(package.Id, package); - return package; - } - - /// - public IPackageInfo AddUpdateBundleAsPackage(string packageId) - { - var package = PackageInfo.GetUpdateBundleAsPackage(packageId); - this.Packages.Add(package.Id, package); - return package; - } - - /// - /// Parses BA manifest from the given stream. - /// - /// - /// - public static IBundleInfo ParseBundleFromStream(Stream stream) - { - XPathDocument manifest = new XPathDocument(stream); - XPathNavigator root = manifest.CreateNavigator(); - return ParseBundleFromXml(root); - } - - /// - /// Parses BA manifest from the given . - /// - /// The root of the BA manifest. - /// - public static IBundleInfo ParseBundleFromXml(XPathNavigator root) - { - BundleInfo bundle = new BundleInfo(); - - XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); - namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); - XPathNavigator bundleNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixBundleProperties", namespaceManager); - - if (bundleNode == null) - { - throw new Exception("Failed to select bundle information."); - } - - bool? perMachine = BootstrapperApplicationData.GetYesNoAttribute(bundleNode, "PerMachine"); - if (perMachine.HasValue) - { - bundle.PerMachine = perMachine.Value; - } - - bundle.Name = BootstrapperApplicationData.GetAttribute(bundleNode, "DisplayName"); - - bundle.LogVariable = BootstrapperApplicationData.GetAttribute(bundleNode, "LogPathVariable"); - - bundle.OverridableVariables = OverridableVariablesInfo.ParseFromXml(root); - - bundle.Packages = PackageInfo.ParsePackagesFromXml(root); - - return bundle; - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/Engine.cs b/src/api/burn/WixToolset.Mba.Core/Engine.cs deleted file mode 100644 index df412e8c..00000000 --- a/src/api/burn/WixToolset.Mba.Core/Engine.cs +++ /dev/null @@ -1,349 +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 WixToolset.Mba.Core -{ - using System; - using System.ComponentModel; - using System.Runtime.InteropServices; - using System.Security; - - /// - /// Default implementation of . - /// - public sealed class Engine : IEngine - { - private IBootstrapperEngine engine; - - internal Engine(IBootstrapperEngine engine) - { - this.engine = engine; - } - - /// - public int PackageCount - { - get - { - int count; - this.engine.GetPackageCount(out count); - - return count; - } - } - - /// - public void Apply(IntPtr hwndParent) - { - this.engine.Apply(hwndParent); - } - - /// - public void CloseSplashScreen() - { - this.engine.CloseSplashScreen(); - } - - /// - public int CompareVersions(string version1, string version2) - { - this.engine.CompareVersions(version1, version2, out var result); - return result; - } - - /// - public bool ContainsVariable(string name) - { - return BalUtil.BalVariableExistsFromEngine(this.engine, name); - } - - /// - public void Detect() - { - this.Detect(IntPtr.Zero); - } - - /// - public void Detect(IntPtr hwndParent) - { - this.engine.Detect(hwndParent); - } - - /// - public bool Elevate(IntPtr hwndParent) - { - int ret = this.engine.Elevate(hwndParent); - - if (NativeMethods.S_OK == ret || NativeMethods.E_ALREADYINITIALIZED == ret) - { - return true; - } - else if (NativeMethods.E_CANCELLED == ret) - { - return false; - } - else - { - throw new Win32Exception(ret); - } - } - - /// - public string EscapeString(string input) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalEscapeStringFromEngine(this.engine, input, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToUniString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public bool EvaluateCondition(string condition) - { - bool value; - this.engine.EvaluateCondition(condition, out value); - - return value; - } - - /// - public string FormatString(string format) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalFormatStringFromEngine(this.engine, format, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToUniString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public long GetVariableNumeric(string name) - { - int ret = this.engine.GetVariableNumeric(name, out long value); - if (NativeMethods.S_OK != ret) - { - throw new Win32Exception(ret); - } - - return value; - } - - /// - public SecureString GetVariableSecureString(string name) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalGetStringVariableFromEngine(this.engine, name, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToSecureString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public string GetVariableString(string name) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalGetStringVariableFromEngine(this.engine, name, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToUniString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public string GetVariableVersion(string name) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalGetVersionVariableFromEngine(this.engine, name, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToUniString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public string GetRelatedBundleVariable(string bundleId, string name) - { - StrUtil.StrHandle handle = new StrUtil.StrHandle(); - try - { - int ret = BalUtil.BalGetRelatedBundleVariableFromEngine(this.engine, bundleId, name, ref handle); - if (ret != NativeMethods.S_OK) - { - throw new Win32Exception(ret); - } - - return handle.ToUniString(); - } - finally - { - handle.Dispose(); - } - } - - /// - public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments) - { - this.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, 0); - } - - /// - public void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout) - { - this.engine.LaunchApprovedExe(hwndParent, approvedExeForElevationId, arguments, waitForInputIdleTimeout); - } - /// - - public void Log(LogLevel level, string message) - { - this.engine.Log(level, message); - } - - /// - public void Plan(LaunchAction action) - { - this.engine.Plan(action); - } - - /// - public void SetUpdate(string localSource, string downloadSource, long size, UpdateHashType hashType, string hash, string updatePackageId) - { - this.engine.SetUpdate(localSource, downloadSource, size, hashType, hash, updatePackageId); - } - - /// - public void SetUpdateSource(string url) - { - this.engine.SetUpdateSource(url); - } - - /// - public void SetLocalSource(string packageOrContainerId, string payloadId, string path) - { - this.engine.SetLocalSource(packageOrContainerId, payloadId, path); - } - - /// - public void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password) - { - this.engine.SetDownloadSource(packageOrContainerId, payloadId, url, user, password); - } - - /// - public void SetVariableNumeric(string name, long value) - { - this.engine.SetVariableNumeric(name, value); - } - - /// - public void SetVariableString(string name, SecureString value, bool formatted) - { - IntPtr pValue = Marshal.SecureStringToCoTaskMemUnicode(value); - try - { - this.engine.SetVariableString(name, pValue, formatted); - } - finally - { - Marshal.FreeCoTaskMem(pValue); - } - } - - /// - public void SetVariableString(string name, string value, bool formatted) - { - IntPtr pValue = Marshal.StringToCoTaskMemUni(value); - try - { - this.engine.SetVariableString(name, pValue, formatted); - } - finally - { - Marshal.FreeCoTaskMem(pValue); - } - } - - /// - public void SetVariableVersion(string name, string value) - { - IntPtr pValue = Marshal.StringToCoTaskMemUni(value); - try - { - this.engine.SetVariableVersion(name, pValue); - } - finally - { - Marshal.FreeCoTaskMem(pValue); - } - } - - /// - public int SendEmbeddedError(int errorCode, string message, int uiHint) - { - int result = 0; - this.engine.SendEmbeddedError(errorCode, message, uiHint, out result); - return result; - } - - /// - public int SendEmbeddedProgress(int progressPercentage, int overallPercentage) - { - int result = 0; - this.engine.SendEmbeddedProgress(progressPercentage, overallPercentage, out result); - return result; - } - - /// - public void Quit(int exitCode) - { - this.engine.Quit(exitCode); - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs b/src/api/burn/WixToolset.Mba.Core/EventArgs.cs deleted file mode 100644 index 6506c840..00000000 --- a/src/api/burn/WixToolset.Mba.Core/EventArgs.cs +++ /dev/null @@ -1,2757 +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 WixToolset.Mba.Core -{ - using System; - using System.Collections.Generic; - using System.Collections.ObjectModel; - using System.Runtime.InteropServices; - - /// - /// Base class for BA classes. - /// - [Serializable] - public abstract class HResultEventArgs : EventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public HResultEventArgs() - { - } - - /// - /// Gets or sets the of the operation. This is passed back to the engine. - /// - public int HResult { get; set; } - } - - /// - /// Base class for cancellable BA classes. - /// - [Serializable] - public abstract class CancellableHResultEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CancellableHResultEventArgs(bool cancelRecommendation) - { - this.Cancel = cancelRecommendation; - } - - /// - /// Gets or sets whether to cancel the operation. This is passed back to the engine. - /// - public bool Cancel { get; set; } - } - - /// - /// Base class for classes that must return a . - /// - [Serializable] - public abstract class ResultEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ResultEventArgs(Result recommendation, Result result) - { - this.Recommendation = recommendation; - this.Result = result; - } - - /// - /// Gets the recommended of the operation. - /// - public Result Recommendation { get; private set; } - - /// - /// Gets or sets the of the operation. This is passed back to the engine. - /// - public Result Result { get; set; } - } - - /// - /// Base class for classes that receive status from the engine. - /// - [Serializable] - public abstract class StatusEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public StatusEventArgs(int hrStatus) - { - this.Status = hrStatus; - } - - /// - /// Gets the return code of the operation. - /// - public int Status { get; private set; } - } - - /// - /// Base class for classes that receive status from the engine and return an action. - /// - public abstract class ActionEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ActionEventArgs(int hrStatus, T recommendation, T action) - : base(hrStatus) - { - this.Recommendation = recommendation; - this.Action = action; - } - - /// - /// Gets the recommended action from the engine. - /// - public T Recommendation { get; private set; } - - /// - /// Gets or sets the action to be performed. This is passed back to the engine. - /// - public T Action { get; set; } - } - - /// - /// Base class for cancellable action BA classes. - /// - [Serializable] - public abstract class CancellableActionEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CancellableActionEventArgs(bool cancelRecommendation, T recommendation, T action) - : base(cancelRecommendation) - { - this.Recommendation = recommendation; - this.Action = action; - } - - /// - /// Gets the recommended action from the engine. - /// - public T Recommendation { get; private set; } - - /// - /// Gets or sets the action to be performed. This is passed back to the engine. - /// - public T Action { get; set; } - } - - /// - /// Base class for cache progress events. - /// - [Serializable] - public abstract class CacheProgressBaseEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheProgressBaseEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - this.Progress = progress; - this.Total = total; - this.OverallPercentage = overallPercentage; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - - /// - /// Gets the number of bytes cached thus far. - /// - public long Progress { get; private set; } - - /// - /// Gets the total bytes to cache. - /// - public long Total { get; private set; } - - /// - /// Gets the overall percentage of progress of caching. - /// - public int OverallPercentage { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class CreateEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CreateEventArgs(IEngine engine, IBootstrapperCommand command) - { - this.Engine = engine; - this.Command = command; - } - - /// - /// Engine running the application. - /// - public IEngine Engine { get; } - - /// - /// Command line arguments. - /// - public IBootstrapperCommand Command { get; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class DestroyEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DestroyEventArgs(bool reload) - { - this.Reload = reload; - } - - /// - /// Bootstrapper application is being reloaded. - /// - public bool Reload { get; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class StartupEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public StartupEventArgs() - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class ShutdownEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ShutdownEventArgs(BOOTSTRAPPER_SHUTDOWN_ACTION action) - { - this.Action = action; - } - - /// - /// The action for OnShutdown. - /// - public BOOTSTRAPPER_SHUTDOWN_ACTION Action { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectBeginEventArgs(bool cached, RegistrationType registrationType, int packageCount, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.Cached = cached; - this.RegistrationType = registrationType; - this.PackageCount = packageCount; - } - - /// - /// Gets whether the bundle is cached. - /// - public bool Cached { get; private set; } - - /// - /// Gets the bundle's registration state. - /// - public RegistrationType RegistrationType { get; private set; } - - /// - /// Gets the number of packages to detect. - /// - public int PackageCount { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectForwardCompatibleBundleEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.BundleId = bundleId; - this.RelationType = relationType; - this.BundleTag = bundleTag; - this.PerMachine = perMachine; - this.Version = version; - this.MissingFromCache = missingFromCache; - } - - /// - /// Gets the identity of the forward compatible bundle detected. - /// - public string BundleId { get; private set; } - - /// - /// Gets the relationship type of the forward compatible bundle. - /// - public RelationType RelationType { get; private set; } - - /// - /// Gets the tag of the forward compatible bundle. - /// - public string BundleTag { get; private set; } - - /// - /// Gets whether the detected forward compatible bundle is per machine. - /// - public bool PerMachine { get; private set; } - - /// - /// Gets the version of the forward compatible bundle detected. - /// - public string Version { get; private set; } - - /// - /// Whether the forward compatible bundle is missing from the package cache. - /// - public bool MissingFromCache { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectUpdateBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectUpdateBeginEventArgs(string updateLocation, bool cancelRecommendation, bool skipRecommendation) - : base(cancelRecommendation) - { - this.UpdateLocation = updateLocation; - this.Skip = skipRecommendation; - } - - /// - /// Gets the identity of the bundle to detect. - /// - public string UpdateLocation { get; private set; } - - /// - /// Whether to skip checking for bundle updates. - /// - public bool Skip { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectUpdateEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectUpdateEventArgs(string updateLocation, long size, string hash, UpdateHashType hashAlgorithm, string version, string title, string summary, string contentType, string content, bool cancelRecommendation, bool stopRecommendation) - : base(cancelRecommendation) - { - this.UpdateLocation = updateLocation; - this.Size = size; - this.Hash = hash; - this.HashAlgorithm = hashAlgorithm; - this.Version = version; - this.Title = title; - this.Summary = summary; - this.ContentType = contentType; - this.Content = content; - this.StopProcessingUpdates = stopRecommendation; - } - - /// - /// Gets the identity of the bundle to detect. - /// - public string UpdateLocation { get; private set; } - - /// - /// Gets the size of the updated bundle. - /// - public long Size { get; private set; } - - /// - /// File hash of the updated bundle. - /// - public string Hash { get; } - - /// - /// The algorithm of the updated bundle's hash. - /// - public UpdateHashType HashAlgorithm { get; } - - /// - /// Gets the version of the updated bundle. - /// - public string Version { get; private set; } - - /// - /// Gets the title of the the updated bundle. - /// - public string Title { get; private set; } - - /// - /// Gets the summary of the updated bundle. - /// - public string Summary { get; private set; } - - /// - /// Gets the content type of the content of the updated bundle. - /// - public string ContentType { get; private set; } - - /// - /// Gets the content of the updated bundle. - /// - public string Content { get; private set; } - - /// - /// Tells the engine to stop giving the rest of the updates found in the feed. - /// - public bool StopProcessingUpdates { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectUpdateCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectUpdateCompleteEventArgs(int hrStatus, bool ignoreRecommendation) - : base(hrStatus) - { - this.IgnoreError = ignoreRecommendation; - } - - /// - /// If Status is an error, then set this to true to ignore it and continue detecting. - /// - public bool IgnoreError { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectRelatedBundleEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectRelatedBundleEventArgs(string productCode, RelationType relationType, string bundleTag, bool perMachine, string version, bool missingFromCache, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.ProductCode = productCode; - this.RelationType = relationType; - this.BundleTag = bundleTag; - this.PerMachine = perMachine; - this.Version = version; - this.MissingFromCache = missingFromCache; - } - - /// - /// Gets the identity of the related bundle detected. - /// - public string ProductCode { get; private set; } - - /// - /// Gets the relationship type of the related bundle. - /// - public RelationType RelationType { get; private set; } - - /// - /// Gets the tag of the related package bundle. - /// - public string BundleTag { get; private set; } - - /// - /// Gets whether the detected bundle is per machine. - /// - public bool PerMachine { get; private set; } - - /// - /// Gets the version of the related bundle detected. - /// - public string Version { get; private set; } - - /// - /// Whether the related bundle is missing from the package cache. - /// - public bool MissingFromCache { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectPackageBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectPackageBeginEventArgs(string packageId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - } - - /// - /// Gets the identity of the package to detect. - /// - public string PackageId { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectCompatibleMsiPackageEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectCompatibleMsiPackageEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.CompatiblePackageId = compatiblePackageId; - this.CompatiblePackageVersion = compatiblePackageVersion; - } - - /// - /// Gets the identity of the package that was not detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the compatible package that was detected. - /// - public string CompatiblePackageId { get; private set; } - - /// - /// Gets the version of the compatible package that was detected. - /// - public string CompatiblePackageVersion { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectRelatedMsiPackageEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectRelatedMsiPackageEventArgs(string packageId, string upgradeCode, string productCode, bool perMachine, string version, RelatedOperation operation, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.UpgradeCode = upgradeCode; - this.ProductCode = productCode; - this.PerMachine = perMachine; - this.Version = version; - this.Operation = operation; - } - - /// - /// Gets the identity of the product's package detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the upgrade code of the related package detected. - /// - public string UpgradeCode { get; private set; } - - /// - /// Gets the identity of the related package detected. - /// - public string ProductCode { get; private set; } - - /// - /// Gets whether the detected package is per machine. - /// - public bool PerMachine { get; private set; } - - /// - /// Gets the version of the related package detected. - /// - public string Version { get; private set; } - - /// - /// Gets the operation that will be taken on the detected package. - /// - public RelatedOperation Operation { get; private set; } - } - - /// - /// Event arguments for - /// - public class DetectPatchTargetEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectPatchTargetEventArgs(string packageId, string productCode, PackageState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ProductCode = productCode; - this.State = state; - } - - /// - /// Gets the identity of the patch's package. - /// - public string PackageId { get; private set; } - - /// - /// Gets the product code of the target. - /// - public string ProductCode { get; private set; } - - /// - /// Gets the detected patch state for the target. - /// - public PackageState State { get; private set; } - } - - /// - /// Event arguments for - /// - public class DetectMsiFeatureEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectMsiFeatureEventArgs(string packageId, string featureId, FeatureState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.FeatureId = featureId; - this.State = state; - } - - /// - /// Gets the identity of the feature's package detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the feature detected. - /// - public string FeatureId { get; private set; } - - /// - /// Gets the detected feature state. - /// - public FeatureState State { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class DetectPackageCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectPackageCompleteEventArgs(string packageId, int hrStatus, PackageState state, bool cached) - : base(hrStatus) - { - this.PackageId = packageId; - this.State = state; - this.Cached = cached; - } - - /// - /// Gets the identity of the package detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the state of the specified package. - /// - public PackageState State { get; private set; } - - /// - /// Gets whether any part of the package is cached. - /// - public bool Cached { get; private set; } - } - - /// - /// Event arguments used when the detection phase has completed. - /// - [Serializable] - public class DetectCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectCompleteEventArgs(int hrStatus, bool eligibleForCleanup) - : base(hrStatus) - { - this.EligibleForCleanup = eligibleForCleanup; - } - - /// - /// Indicates whether the engine will uninstall the bundle if shutdown without running Apply. - /// - public bool EligibleForCleanup { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanBeginEventArgs(int packageCount, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageCount = packageCount; - } - - /// - /// Gets the number of packages to plan for. - /// - public int PackageCount { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanRelatedBundleEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.BundleId = bundleId; - this.RecommendedState = recommendedState; - this.State = state; - } - - /// - /// Gets the identity of the bundle to plan for. - /// - public string BundleId { get; private set; } - - /// - /// Gets the recommended requested state for the bundle. - /// - public RequestState RecommendedState { get; private set; } - - /// - /// Gets or sets the requested state for the bundle. - /// - public RequestState State { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanRelatedBundleTypeEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanRelatedBundleTypeEventArgs(string bundleId, RelatedBundlePlanType recommendedType, RelatedBundlePlanType type, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.BundleId = bundleId; - this.RecommendedType = recommendedType; - this.Type = type; - } - - /// - /// Gets the identity of the bundle to plan for. - /// - public string BundleId { get; private set; } - - /// - /// Gets the recommended plan type for the bundle. - /// - public RelatedBundlePlanType RecommendedType { get; private set; } - - /// - /// Gets or sets the plan type for the bundle. - /// - public RelatedBundlePlanType Type { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanPackageBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanPackageBeginEventArgs(string packageId, PackageState currentState, bool cached, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, RequestState recommendedState, BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, RequestState state, BOOTSTRAPPER_CACHE_TYPE cacheType, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.CurrentState = currentState; - this.Cached = cached; - this.InstallCondition = installCondition; - this.RepairCondition = repairCondition; - this.RecommendedState = recommendedState; - this.RecommendedCacheType = recommendedCacheType; - this.State = state; - this.CacheType = cacheType; - } - - /// - /// Gets the identity of the package to plan for. - /// - public string PackageId { get; private set; } - - /// - /// Gets the current state of the package. - /// - public PackageState CurrentState { get; private set; } - - /// - /// Gets whether any part of the package is cached. - /// - public bool Cached { get; private set; } - - /// - /// Gets the evaluated result of the package's install condition. - /// - public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT InstallCondition { get; private set; } - - /// - /// Gets the evaluated result of the package's repair condition. - /// - public BOOTSTRAPPER_PACKAGE_CONDITION_RESULT RepairCondition { get; private set; } - - /// - /// Gets the recommended requested state for the package. - /// - public RequestState RecommendedState { get; private set; } - - /// - /// The authored cache type of the package. - /// - public BOOTSTRAPPER_CACHE_TYPE RecommendedCacheType { get; private set; } - - /// - /// Gets or sets the requested state for the package. - /// - public RequestState State { get; set; } - - /// - /// Gets or sets the requested cache type for the package. - /// - public BOOTSTRAPPER_CACHE_TYPE CacheType { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanCompatibleMsiPackageBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanCompatibleMsiPackageBeginEventArgs(string packageId, string compatiblePackageId, string compatiblePackageVersion, bool recommendedRemove, bool requestRemove, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.CompatiblePackageId = compatiblePackageId; - this.CompatiblePackageVersion = compatiblePackageVersion; - this.RecommendedRemove = recommendedRemove; - this.RequestRemove = requestRemove; - } - - /// - /// Gets the identity of the package that was not detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the compatible package detected. - /// - public string CompatiblePackageId { get; private set; } - - /// - /// Gets the version of the compatible package detected. - /// - public string CompatiblePackageVersion { get; private set; } - - /// - /// Gets the recommended state to use for the compatible package for planning. - /// - public bool RecommendedRemove { get; private set; } - - /// - /// Gets or sets whether to uninstall the compatible package. - /// - public bool RequestRemove { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanCompatibleMsiPackageCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanCompatibleMsiPackageCompleteEventArgs(string packageId, string compatiblePackageId, int hrStatus, bool requestedRemove) - : base(hrStatus) - { - this.PackageId = packageId; - this.CompatiblePackageId = compatiblePackageId; - this.RequestedRemove = requestedRemove; - } - - /// - /// Gets the identity of the package planned for. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the compatible package detected. - /// - public string CompatiblePackageId { get; private set; } - - /// - /// Gets the requested state of the package. - /// - public bool RequestedRemove { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanRollbackBoundaryEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanRollbackBoundaryEventArgs(string rollbackBoundaryId, bool recommendedTransaction, bool transaction, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.RollbackBoundaryId = rollbackBoundaryId; - this.RecommendedTransaction = recommendedTransaction; - this.Transaction = transaction; - } - - /// - /// Gets the identity of the rollback boundary to plan for. - /// - public string RollbackBoundaryId { get; private set; } - - /// - /// Whether or not the rollback boundary was authored to use an MSI transaction. - /// - public bool RecommendedTransaction { get; private set; } - - /// - /// Whether or not an MSI transaction will be used in the rollback boundary. - /// If is false, setting the value to true has no effect. - /// If is true, setting the value to false will cause the packages inside this rollback boundary to be executed without a wrapping MSI transaction. - /// - public bool Transaction { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanPatchTargetEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanPatchTargetEventArgs(string packageId, string productCode, RequestState recommendedState, RequestState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ProductCode = productCode; - this.RecommendedState = recommendedState; - this.State = state; - } - - /// - /// Gets the identity of the patch's package. - /// - public string PackageId { get; private set; } - - /// - /// Gets the product code of the target. - /// - public string ProductCode { get; private set; } - - /// - /// Gets the recommended state of the patch to use by planning for the target. - /// - public RequestState RecommendedState { get; private set; } - - /// - /// Gets or sets the state of the patch to use by planning for the target. - /// - public RequestState State { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanMsiFeatureEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanMsiFeatureEventArgs(string packageId, string featureId, FeatureState recommendedState, FeatureState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.FeatureId = featureId; - this.RecommendedState = recommendedState; - this.State = state; - } - - /// - /// Gets the identity of the feature's package to plan. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the feature to plan. - /// - public string FeatureId { get; private set; } - - /// - /// Gets the recommended feature state to use by planning. - /// - public FeatureState RecommendedState { get; private set; } - - /// - /// Gets or sets the feature state to use by planning. - /// - public FeatureState State { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanMsiPackageEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanMsiPackageEventArgs(string packageId, bool shouldExecute, ActionState action, BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, bool cancelRecommendation, BURN_MSI_PROPERTY actionMsiProperty, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ShouldExecute = shouldExecute; - this.Action = action; - this.RecommendedFileVersioning = recommendedFileVersioning; - this.ActionMsiProperty = actionMsiProperty; - this.UiLevel = uiLevel; - this.DisableExternalUiHandler = disableExternalUiHandler; - this.FileVersioning = fileVersioning; - } - - /// - /// Gets identity of the package planned for. - /// - public string PackageId { get; private set; } - - /// - /// Gets whether the package is planned to execute or roll back. - /// - public bool ShouldExecute { get; private set; } - - /// - /// Gets the action planned for the package. - /// - public ActionState Action { get; private set; } - - /// - /// Gets the recommended file versioning for the package. - /// - public BOOTSTRAPPER_MSI_FILE_VERSIONING RecommendedFileVersioning { get; private set; } - - /// - /// Gets or sets the requested MSI property to add. - /// - public BURN_MSI_PROPERTY ActionMsiProperty { get; set; } - - /// - /// Gets or sets the requested internal UI level. - /// - public INSTALLUILEVEL UiLevel { get; set; } - - /// - /// Gets or sets whether Burn is requested to set up an external UI handler. - /// - public bool DisableExternalUiHandler { get; set; } - - /// - /// Gets or sets the requested file versioning. - /// - public BOOTSTRAPPER_MSI_FILE_VERSIONING FileVersioning { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanPackageCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanPackageCompleteEventArgs(string packageId, int hrStatus, RequestState requested) - : base(hrStatus) - { - this.PackageId = packageId; - this.Requested = requested; - } - - /// - /// Gets the identity of the package planned for. - /// - public string PackageId { get; private set; } - - /// - /// Gets the requested state for the package. - /// - public RequestState Requested { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlannedCompatiblePackageEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlannedCompatiblePackageEventArgs(string packageId, string compatiblePackageId, bool remove) - { - this.PackageId = packageId; - this.CompatiblePackageId = compatiblePackageId; - this.Remove = remove; - } - - /// - /// Gets the identity of the package planned for. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the compatible package detected. - /// - public string CompatiblePackageId { get; private set; } - - /// - /// Gets the planned state of the package. - /// - public bool Remove { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlannedPackageEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlannedPackageEventArgs(string packageId, ActionState execute, ActionState rollback, bool cache, bool uncache) - { - this.PackageId = packageId; - this.Execute = execute; - this.Rollback = rollback; - this.Cache = cache; - this.Uncache = uncache; - } - - /// - /// Gets the identity of the package planned for. - /// - public string PackageId { get; private set; } - - /// - /// Gets the planned execution action. - /// - public ActionState Execute { get; private set; } - - /// - /// Gets the planned rollback action. - /// - public ActionState Rollback { get; private set; } - - /// - /// Gets whether the package will be cached. - /// - public bool Cache { get; private set; } - - /// - /// Gets whether the package will be removed from the package cache. - /// - public bool Uncache { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class PlanCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanForwardCompatibleBundleEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanForwardCompatibleBundleEventArgs(string bundleId, RelationType relationType, string bundleTag, bool perMachine, string version, bool recommendedIgnoreBundle, bool cancelRecommendation, bool ignoreBundle) - : base(cancelRecommendation) - { - this.BundleId = bundleId; - this.RelationType = relationType; - this.BundleTag = bundleTag; - this.PerMachine = perMachine; - this.Version = version; - this.RecommendedIgnoreBundle = recommendedIgnoreBundle; - this.IgnoreBundle = ignoreBundle; - } - - /// - /// Gets the identity of the forward compatible bundle detected. - /// - public string BundleId { get; private set; } - - /// - /// Gets the relationship type of the forward compatible bundle. - /// - public RelationType RelationType { get; private set; } - - /// - /// Gets the tag of the forward compatible bundle. - /// - public string BundleTag { get; private set; } - - /// - /// Gets whether the forward compatible bundle is per machine. - /// - public bool PerMachine { get; private set; } - - /// - /// Gets the version of the forward compatible bundle. - /// - public string Version { get; private set; } - - /// - /// Gets the recommendation of whether the engine should use the forward compatible bundle. - /// - public bool RecommendedIgnoreBundle { get; set; } - - /// - /// Gets or sets whether the engine will use the forward compatible bundle. - /// - public bool IgnoreBundle { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ApplyBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ApplyBeginEventArgs(int phaseCount, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PhaseCount = phaseCount; - } - - /// - /// Gets the number of phases that the engine will go through in apply. - /// There are currently two possible phases: cache and execute. - /// - public int PhaseCount { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ElevateBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ElevateBeginEventArgs(bool cancelRecommendation) - : base(cancelRecommendation) - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class ElevateCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ElevateCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ProgressEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ProgressEventArgs(int progressPercentage, int overallPercentage, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.ProgressPercentage = progressPercentage; - this.OverallPercentage = overallPercentage; - } - - /// - /// Gets the percentage from 0 to 100 completed for a package. - /// - public int ProgressPercentage { get; private set; } - - /// - /// Gets the percentage from 0 to 100 completed for the bundle. - /// - public int OverallPercentage { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ErrorEventArgs : ResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ErrorEventArgs(ErrorType errorType, string packageId, int errorCode, string errorMessage, int dwUIHint, string[] data, Result recommendation, Result result) - : base(recommendation, result) - { - this.ErrorType = errorType; - this.PackageId = packageId; - this.ErrorCode = errorCode; - this.ErrorMessage = errorMessage; - this.UIHint = dwUIHint; - this.Data = new ReadOnlyCollection(data ?? new string[] { }); - } - - /// - /// Gets the type of error that occurred. - /// - public ErrorType ErrorType { get; private set; } - - /// - /// Gets the identity of the package that yielded the error. - /// - public string PackageId { get; private set; } - - /// - /// Gets the error code. - /// - public int ErrorCode { get; private set; } - - /// - /// Gets the error message. - /// - public string ErrorMessage { get; private set; } - - /// - /// Gets the recommended display flags for an error dialog. - /// - public int UIHint { get; private set; } - - /// - /// Gets the extended data for the error. - /// - public IList Data { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class RegisterBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public RegisterBeginEventArgs(RegistrationType recommendedRegistrationType, bool cancelRecommendation, RegistrationType registrationType) - : base(cancelRecommendation) - { - this.RecommendedRegistrationType = recommendedRegistrationType; - this.RegistrationType = registrationType; - } - - /// - /// Gets the recommended registration type. - /// - public RegistrationType RecommendedRegistrationType { get; private set; } - - /// - /// Gets or sets the registration type. - /// - public RegistrationType RegistrationType { get; set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class RegisterCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public RegisterCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class UnregisterBeginEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public UnregisterBeginEventArgs(RegistrationType recommendedRegistrationType, RegistrationType registrationType) - { - this.RecommendedRegistrationType = recommendedRegistrationType; - this.RegistrationType = registrationType; - } - - /// - /// Gets the recommended registration type. - /// - public RegistrationType RecommendedRegistrationType { get; private set; } - - /// - /// Gets or sets the registration type. - /// - public RegistrationType RegistrationType { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class UnregisterCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public UnregisterCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CacheBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheBeginEventArgs(bool cancelRecommendation) - : base(cancelRecommendation) - { - } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheAcquireBeginEventArgs : CancellableActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheAcquireBeginEventArgs(string packageOrContainerId, string payloadId, string source, string downloadUrl, string payloadContainerId, CacheOperation recommendation, CacheOperation action, bool cancelRecommendation) - : base(cancelRecommendation, recommendation, action) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - this.Source = source; - this.DownloadUrl = downloadUrl; - this.PayloadContainerId = payloadContainerId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload (if acquiring a payload). - /// - public string PayloadId { get; private set; } - - /// - /// Gets the source of the container or payload. - /// - public string Source { get; private set; } - - /// - /// Gets the optional URL to download container or payload. - /// - public string DownloadUrl { get; private set; } - - /// - /// Gets the optional identity of the container that contains the payload being acquired. - /// - public string PayloadContainerId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheAcquireProgressEventArgs : CacheProgressBaseEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheAcquireProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) - : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) - { - } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheAcquireCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheAcquireCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload (if acquiring a payload). - /// - public string PayloadId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheVerifyBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheVerifyProgressEventArgs : CacheProgressBaseEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, CacheVerifyStep verifyStep, bool cancelRecommendation) - : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) - { - this.Step = verifyStep; - } - - /// - /// Gets the current verification step. - /// - public CacheVerifyStep Step { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CacheVerifyCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class CacheCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecuteBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteBeginEventArgs(int packageCount, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageCount = packageCount; - } - - /// - /// Gets the number of packages to act on. - /// - public int PackageCount { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecutePackageBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecutePackageBeginEventArgs(string packageId, bool shouldExecute, ActionState action, INSTALLUILEVEL uiLevel, bool disableExternalUiHandler, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ShouldExecute = shouldExecute; - this.Action = action; - this.UiLevel = uiLevel; - this.DisableExternalUiHandler = disableExternalUiHandler; - } - - /// - /// Gets the identity of the package to act on. - /// - public string PackageId { get; private set; } - - /// - /// Gets whether the package is being executed or rolled back. - /// - public bool ShouldExecute { get; private set; } - - /// - /// Gets the action about to be executed. - /// - public ActionState Action { get; private set; } - - /// - /// Gets the internal UI level (if this is an MSI or MSP package). - /// - public INSTALLUILEVEL UiLevel { get; private set; } - - /// - /// Gets whether Burn will set up an external UI handler (if this is an MSI or MSP package). - /// - public bool DisableExternalUiHandler { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecutePatchTargetEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecutePatchTargetEventArgs(string packageId, string targetProductCode, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.TargetProductCode = targetProductCode; - } - - /// - /// Gets the identity of the package to act on. - /// - public string PackageId { get; private set; } - - /// - /// Gets the product code being targeted. - /// - public string TargetProductCode { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecuteMsiMessageEventArgs : ResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteMsiMessageEventArgs(string packageId, InstallMessage messageType, int dwUIHint, string message, string[] data, Result recommendation, Result result) - : base(recommendation, result) - { - this.PackageId = packageId; - this.MessageType = messageType; - this.UIHint = dwUIHint; - this.Message = message; - this.Data = new ReadOnlyCollection(data ?? new string[] { }); - } - - /// - /// Gets the identity of the package that yielded this message. - /// - public string PackageId { get; private set; } - - /// - /// Gets the type of this message. - /// - public InstallMessage MessageType { get; private set; } - - /// - /// Gets the recommended display flags for this message. - /// - public int UIHint { get; private set; } - - /// - /// Gets the message. - /// - public string Message { get; private set; } - - /// - /// Gets the extended data for the message. - /// - public IList Data { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecuteFilesInUseEventArgs : ResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteFilesInUseEventArgs(string packageId, string[] files, Result recommendation, FilesInUseType source, Result result) - : base(recommendation, result) - { - this.PackageId = packageId; - this.Files = new ReadOnlyCollection(files ?? new string[] { }); - this.Source = source; - } - - /// - /// Gets the identity of the package that yielded the files in use message. - /// - public string PackageId { get; private set; } - - /// - /// Gets the list of files in use. - /// - public IList Files { get; private set; } - - /// - /// Gets the source of the message. - /// - public FilesInUseType Source { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecutePackageCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecutePackageCompleteEventArgs(string packageId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.PackageId = packageId; - this.Restart = restart; - } - - /// - /// Gets the identity of the package that was acted on. - /// - public string PackageId { get; private set; } - - /// - /// Gets the package restart state after being applied. - /// - public ApplyRestart Restart { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class ExecuteCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ApplyCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ApplyCompleteEventArgs(int hrStatus, ApplyRestart restart, BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, BOOTSTRAPPER_APPLYCOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.Restart = restart; - } - - /// - /// Gets the apply restart state when complete. - /// - public ApplyRestart Restart { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ApplyDowngradeEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ApplyDowngradeEventArgs(int hrRecommendation, int hrStatus) - { - this.Recommendation = hrRecommendation; - this.Status = hrStatus; - } - - /// - /// Gets the recommended HRESULT. - /// - public int Recommendation { get; private set; } - - /// - /// Gets or sets the HRESULT for Apply. - /// - public int Status { get; set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheAcquireResolvingEventArgs : CancellableActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheAcquireResolvingEventArgs(string packageOrContainerId, string payloadId, string[] searchPaths, bool foundLocal, int recommendedSearchPath, string downloadUrl, string payloadContainerId, CacheResolveOperation recommendation, int chosenSearchPath, CacheResolveOperation action, bool cancel) - : base(cancel, recommendation, action) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - this.SearchPaths = searchPaths; - this.FoundLocal = foundLocal; - this.RecommendedSearchPath = recommendedSearchPath; - this.DownloadUrl = downloadUrl; - this.PayloadContainerId = payloadContainerId; - this.ChosenSearchPath = chosenSearchPath; - } - - /// - /// Gets the identity of the package or container that is being acquired. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identity of the payload that is being acquired. - /// - public string PayloadId { get; private set; } - - /// - /// Gets the search paths used for source resolution. - /// - public string[] SearchPaths { get; private set; } - - /// - /// Gets whether indicates that a file was found at that search path. - /// - public bool FoundLocal { get; private set; } - - /// - /// When is true, the index to for the recommended local file. - /// - public int RecommendedSearchPath { get; private set; } - - /// - /// Gets the optional URL to download container or payload. - /// - public string DownloadUrl { get; private set; } - - /// - /// Gets the optional identity of the container that contains the payload being acquired. - /// - public string PayloadContainerId { get; private set; } - - /// - /// Gets or sets the index to to use when is set to . - /// - public int ChosenSearchPath { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CachePackageBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePackageBeginEventArgs(string packageId, int cachePayloads, long packageCacheSize, bool vital, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.CachePayloads = cachePayloads; - this.PackageCacheSize = packageCacheSize; - this.Vital = vital; - } - - /// - /// Gets the identity of the package that is being cached. - /// - public string PackageId { get; private set; } - - /// - /// Gets number of payloads to be cached. - /// - public long CachePayloads { get; private set; } - - /// - /// Gets the size on disk required by the specific package. - /// - public long PackageCacheSize { get; private set; } - - /// - /// If caching a package is not vital, then acquisition will be skipped unless the BA opts in through . - /// - public bool Vital { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CachePackageCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePackageCompleteEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.PackageId = packageId; - } - - /// - /// Gets the identity of the package that was cached. - /// - public string PackageId { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecuteProgressEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteProgressEventArgs(string packageId, int progressPercentage, int overallPercentage, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ProgressPercentage = progressPercentage; - this.OverallPercentage = overallPercentage; - } - - /// - /// Gets the identity of the package that was executed. - /// - public string PackageId { get; private set; } - - /// - /// Gets the percentage from 0 to 100 of the execution progress for a single payload. - /// - public int ProgressPercentage { get; private set; } - - /// - /// Gets the percentage from 0 to 100 of the execution progress for all payloads. - /// - public int OverallPercentage { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class LaunchApprovedExeBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public LaunchApprovedExeBeginEventArgs(bool cancelRecommendation) - : base(cancelRecommendation) - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class LaunchApprovedExeCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public LaunchApprovedExeCompleteEventArgs(int hrStatus, int processId) - : base(hrStatus) - { - this.ProcessId = processId; - } - - /// - /// Gets the ProcessId of the process that was launched. - /// This is only valid if the status reports success. - /// - public int ProcessId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class BeginMsiTransactionBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public BeginMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.TransactionId = transactionId; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class BeginMsiTransactionCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public BeginMsiTransactionCompleteEventArgs(string transactionId, int hrStatus) - : base(hrStatus) - { - this.TransactionId = transactionId; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class CommitMsiTransactionBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CommitMsiTransactionBeginEventArgs(string transactionId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.TransactionId = transactionId; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class CommitMsiTransactionCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CommitMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.TransactionId = transactionId; - this.Restart = restart; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - - /// - /// Gets the package restart state after being applied. - /// - public ApplyRestart Restart { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class RollbackMsiTransactionBeginEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public RollbackMsiTransactionBeginEventArgs(string transactionId) - { - this.TransactionId = transactionId; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class RollbackMsiTransactionCompleteEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public RollbackMsiTransactionCompleteEventArgs(string transactionId, int hrStatus, ApplyRestart restart, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.TransactionId = transactionId; - this.Restart = restart; - } - - /// - /// Gets the MSI transaction Id. - /// - public string TransactionId { get; private set; } - - /// - /// Gets the package restart state after being applied. - /// - public ApplyRestart Restart { get; private set; } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class PauseAutomaticUpdatesBeginEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PauseAutomaticUpdatesBeginEventArgs() - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class PauseAutomaticUpdatesCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PauseAutomaticUpdatesCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class SystemRestorePointBeginEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public SystemRestorePointBeginEventArgs() - { - } - } - - /// - /// Event arguments for . - /// - [Serializable] - public class SystemRestorePointCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public SystemRestorePointCompleteEventArgs(int hrStatus) - : base(hrStatus) - { - } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheContainerOrPayloadVerifyBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheContainerOrPayloadVerifyBeginEventArgs(string packageOrContainerId, string payloadId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CacheContainerOrPayloadVerifyProgressEventArgs : CacheProgressBaseEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheContainerOrPayloadVerifyProgressEventArgs(string packageOrContainerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) - : base(packageOrContainerId, payloadId, progress, total, overallPercentage, cancelRecommendation) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CacheContainerOrPayloadVerifyCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CacheContainerOrPayloadVerifyCompleteEventArgs(string packageOrContainerId, string payloadId, int hrStatus) - : base(hrStatus) - { - this.PackageOrContainerId = packageOrContainerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container or package. - /// - public string PackageOrContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CachePayloadExtractBeginEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePayloadExtractBeginEventArgs(string containerId, string payloadId, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.ContainerId = containerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container. - /// - public string ContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// EventArgs for . - /// - [Serializable] - public class CachePayloadExtractProgressEventArgs : CacheProgressBaseEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePayloadExtractProgressEventArgs(string containerId, string payloadId, long progress, long total, int overallPercentage, bool cancelRecommendation) - : base(containerId, payloadId, progress, total, overallPercentage, cancelRecommendation) - { - } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CachePayloadExtractCompleteEventArgs : StatusEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePayloadExtractCompleteEventArgs(string containerId, string payloadId, int hrStatus) - : base(hrStatus) - { - this.ContainerId = containerId; - this.PayloadId = payloadId; - } - - /// - /// Gets the identifier of the container. - /// - public string ContainerId { get; private set; } - - /// - /// Gets the identifier of the payload. - /// - public string PayloadId { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class PlanRestoreRelatedBundleEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public PlanRestoreRelatedBundleEventArgs(string bundleId, RequestState recommendedState, RequestState state, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.BundleId = bundleId; - this.RecommendedState = recommendedState; - this.State = state; - } - - /// - /// Gets the identity of the bundle to plan for. - /// - public string BundleId { get; private set; } - - /// - /// Gets the recommended requested state for the bundle. - /// - public RequestState RecommendedState { get; private set; } - - /// - /// Gets or sets the requested state for the bundle. - /// - public RequestState State { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class ExecuteProcessCancelEventArgs : HResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public ExecuteProcessCancelEventArgs(string packageId, int processId, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION action) - { - this.PackageId = packageId; - this.ProcessId = processId; - this.Recommendation = recommendation; - this.Action = action; - } - - /// - /// Gets the identity of the package. - /// - public string PackageId { get; private set; } - - /// - /// Gets the process id. - /// - public int ProcessId { get; private set; } - - /// - /// Gets the recommended action from the engine. - /// - public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Recommendation { get; private set; } - - /// - /// Gets or sets the action to be performed. This is passed back to the engine. - /// - public BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION Action { get; set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class DetectRelatedBundlePackageEventArgs : CancellableHResultEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public DetectRelatedBundlePackageEventArgs(string packageId, string productCode, RelationType relationType, bool perMachine, string version, bool cancelRecommendation) - : base(cancelRecommendation) - { - this.PackageId = packageId; - this.ProductCode = productCode; - this.RelationType = relationType; - this.PerMachine = perMachine; - this.Version = version; - } - - /// - /// Gets the identity of the product's package detected. - /// - public string PackageId { get; private set; } - - /// - /// Gets the identity of the related bundle detected. - /// - public string ProductCode { get; private set; } - - /// - /// Gets the relationship type of the related bundle. - /// - public RelationType RelationType { get; private set; } - - /// - /// Gets whether the detected bundle is per machine. - /// - public bool PerMachine { get; private set; } - - /// - /// Gets the version of the related bundle detected. - /// - public string Version { get; private set; } - } - - /// - /// Event arguments for - /// - [Serializable] - public class CachePackageNonVitalValidationFailureEventArgs : ActionEventArgs - { - /// - /// This class is for events raised by the engine. - /// It is not intended to be instantiated by user code. - /// - public CachePackageNonVitalValidationFailureEventArgs(string packageId, int hrStatus, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action) - : base(hrStatus, recommendation, action) - { - this.PackageId = packageId; - } - - /// - /// Gets the identity of the package that was being validated. - /// - public string PackageId { get; private set; } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs deleted file mode 100644 index 8a255c44..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplication.cs +++ /dev/null @@ -1,2013 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - /// - /// Allows customization of the bootstrapper application. - /// - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [Guid("53C31D56-49C0-426B-AB06-099D717C67FE")] - public interface IBootstrapperApplication - { - /// - /// Low level method that is called directly from the engine. - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int BAProc( - int message, - IntPtr pvArgs, - IntPtr pvResults - ); - - /// - /// Low level method that is called directly from the engine. - /// - void BAProcFallback( - int message, - IntPtr pvArgs, - IntPtr pvResults, - ref int phr - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCreate(IBootstrapperEngine engine, ref Command command); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDestroy(bool reload); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnStartup(); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnShutdown(ref BOOTSTRAPPER_SHUTDOWN_ACTION action); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectBegin( - [MarshalAs(UnmanagedType.Bool)] bool fCached, - [MarshalAs(UnmanagedType.U4)] RegistrationType registrationType, - [MarshalAs(UnmanagedType.U4)] int cPackages, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectForwardCompatibleBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RelationType relationType, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, - [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectUpdateBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, - [MarshalAs(UnmanagedType.Bool)] ref bool fSkip - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectUpdate( - [MarshalAs(UnmanagedType.LPWStr)] string wzUpdateLocation, - [MarshalAs(UnmanagedType.U8)] long dw64Size, - [MarshalAs(UnmanagedType.LPWStr)] string wzHash, - [MarshalAs(UnmanagedType.U4)] UpdateHashType hashAlgorithm, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.LPWStr)] string wzTitle, - [MarshalAs(UnmanagedType.LPWStr)] string wzSummary, - [MarshalAs(UnmanagedType.LPWStr)] string wzContentType, - [MarshalAs(UnmanagedType.LPWStr)] string wzContent, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, - [MarshalAs(UnmanagedType.Bool)] ref bool fStopProcessingUpdates - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectUpdateComplete( - int hrStatus, - [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreError - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RelationType relationType, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, - [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.Bool)] bool fMissingFromCache, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectPackageBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectCompatibleMsiPackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectRelatedMsiPackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzUpgradeCode, - [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, - [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.U4)] RelatedOperation operation, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectPatchTarget( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, - [MarshalAs(UnmanagedType.U4)] PackageState patchState, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectMsiFeature( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, - [MarshalAs(UnmanagedType.U4)] FeatureState state, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectPackageComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int hrStatus, - [MarshalAs(UnmanagedType.U4)] PackageState state, - [MarshalAs(UnmanagedType.Bool)] bool fCached - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectComplete( - int hrStatus, - [MarshalAs(UnmanagedType.Bool)] bool fEligibleForCleanup - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanBegin( - [MarshalAs(UnmanagedType.U4)] int cPackages, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, - [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanRollbackBoundary( - [MarshalAs(UnmanagedType.LPWStr)] string wzRollbackBoundaryId, - [MarshalAs(UnmanagedType.Bool)] bool fRecommendedTransaction, - [MarshalAs(UnmanagedType.Bool)] ref bool fTransaction, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanPackageBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] PackageState state, - [MarshalAs(UnmanagedType.Bool)] bool fCached, - [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition, - [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition, - [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, - [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_CACHE_TYPE recommendedCacheType, - [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, - [MarshalAs(UnmanagedType.U4)] ref BOOTSTRAPPER_CACHE_TYPE pRequestedCacheType, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanCompatibleMsiPackageBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageVersion, - [MarshalAs(UnmanagedType.Bool)] bool fRecommendedRemove, - [MarshalAs(UnmanagedType.Bool)] ref bool fRequestRemove, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanCompatibleMsiPackageComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - int hrStatus, - [MarshalAs(UnmanagedType.Bool)] bool fRequestedRemove - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanPatchTarget( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzProductCode, - [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, - [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanMsiFeature( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzFeatureId, - [MarshalAs(UnmanagedType.U4)] FeatureState recommendedState, - [MarshalAs(UnmanagedType.U4)] ref FeatureState pRequestedState, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanMsiPackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.Bool)] bool fExecute, - [MarshalAs(UnmanagedType.U4)] ActionState action, - [MarshalAs(UnmanagedType.U4)] BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, - [MarshalAs(UnmanagedType.U4)] ref BURN_MSI_PROPERTY actionMsiProperty, - [MarshalAs(UnmanagedType.U4)] ref INSTALLUILEVEL uiLevel, - [MarshalAs(UnmanagedType.Bool)] ref bool fDisableExternalUiHandler, - [MarshalAs(UnmanagedType.U4)] ref BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanPackageComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int hrStatus, - [MarshalAs(UnmanagedType.U4)] RequestState requested - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlannedCompatiblePackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzCompatiblePackageId, - [MarshalAs(UnmanagedType.Bool)] bool fRemove - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlannedPackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] ActionState execute, - [MarshalAs(UnmanagedType.U4)] ActionState rollback, - [MarshalAs(UnmanagedType.Bool)] bool fPlannedCache, - [MarshalAs(UnmanagedType.Bool)] bool fPlannedUncache - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnApplyBegin( - [MarshalAs(UnmanagedType.U4)] int dwPhaseCount, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnElevateBegin( - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnElevateComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnProgress( - [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnError( - [MarshalAs(UnmanagedType.U4)] ErrorType errorType, - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] int dwCode, - [MarshalAs(UnmanagedType.LPWStr)] string wzError, - [MarshalAs(UnmanagedType.I4)] int dwUIHint, - [MarshalAs(UnmanagedType.U4)] int cData, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 5, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, - [MarshalAs(UnmanagedType.I4)] Result nRecommendation, - [MarshalAs(UnmanagedType.I4)] ref Result pResult - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnRegisterBegin( - [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, - [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnRegisterComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheBegin( - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePackageBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] int cCachePayloads, - [MarshalAs(UnmanagedType.U8)] long dw64PackageCacheSize, - [MarshalAs(UnmanagedType.Bool)] bool fVital, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheAcquireBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.LPWStr)] string wzSource, - [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, - [MarshalAs(UnmanagedType.U4)] CacheOperation recommendation, - [MarshalAs(UnmanagedType.I4)] ref CacheOperation action, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheAcquireProgress( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.U8)] long dw64Progress, - [MarshalAs(UnmanagedType.U8)] long dw64Total, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheAcquireResolving( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 3, ArraySubType = UnmanagedType.LPWStr), In] string[] searchPaths, - [MarshalAs(UnmanagedType.U4)] int cSearchPaths, - [MarshalAs(UnmanagedType.Bool)] bool fFoundLocal, - [MarshalAs(UnmanagedType.U4)] int dwRecommendedSearchPath, - [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadUrl, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadContainerId, - [MarshalAs(UnmanagedType.I4)] CacheResolveOperation recommendation, - [MarshalAs(UnmanagedType.U4)] ref int dwChosenSearchPath, - [MarshalAs(UnmanagedType.I4)] ref CacheResolveOperation action, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheAcquireComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - int hrStatus, - BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation, - ref BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheVerifyBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheVerifyProgress( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.U8)] long dw64Progress, - [MarshalAs(UnmanagedType.U8)] long dw64Total, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.I4)] CacheVerifyStep verifyStep, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheVerifyComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - int hrStatus, - BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation, - ref BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePackageComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int hrStatus, - BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation, - ref BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action - ); - - /// - /// See . - /// - /// - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteBegin( - [MarshalAs(UnmanagedType.U4)] int cExecutingPackages, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecutePackageBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.Bool)] bool fExecute, - [MarshalAs(UnmanagedType.U4)] ActionState action, - [MarshalAs(UnmanagedType.U4)] INSTALLUILEVEL uiLevel, - [MarshalAs(UnmanagedType.Bool)] bool fDisableExternalUiHandler, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecutePatchTarget( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzTargetProductCode, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteProgress( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteMsiMessage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] InstallMessage messageType, - [MarshalAs(UnmanagedType.I4)] int dwUIHint, - [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, - [MarshalAs(UnmanagedType.U4)] int cData, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 4, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzData, - [MarshalAs(UnmanagedType.I4)] Result nRecommendation, - [MarshalAs(UnmanagedType.I4)] ref Result pResult - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteFilesInUse( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.U4)] int cFiles, - [MarshalAs(UnmanagedType.LPArray, SizeParamIndex = 1, ArraySubType = UnmanagedType.LPWStr), In] string[] rgwzFiles, - [MarshalAs(UnmanagedType.I4)] Result nRecommendation, - [MarshalAs(UnmanagedType.I4)] FilesInUseType source, - [MarshalAs(UnmanagedType.I4)] ref Result pResult - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecutePackageComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int hrStatus, - [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, - [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation, - [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnUnregisterBegin( - [MarshalAs(UnmanagedType.I4)] RegistrationType recommendedRegistrationType, - [MarshalAs(UnmanagedType.I4)] ref RegistrationType pRegistrationType - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnUnregisterComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnApplyComplete( - int hrStatus, - [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, - [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation, - [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_APPLYCOMPLETE_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnLaunchApprovedExeBegin( - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnLaunchApprovedExeComplete( - int hrStatus, - int processId - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnBeginMsiTransactionBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnBeginMsiTransactionComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCommitMsiTransactionBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCommitMsiTransactionComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, - int hrStatus, - [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, - [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, - [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnRollbackMsiTransactionBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnRollbackMsiTransactionComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzTransactionId, - int hrStatus, - [MarshalAs(UnmanagedType.U4)] ApplyRestart restart, - [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation, - [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPauseAutomaticUpdatesBegin( - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPauseAutomaticUpdatesComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnSystemRestorePointBegin( - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnSystemRestorePointComplete( - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanForwardCompatibleBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RelationType relationType, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleTag, - [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.Bool)] bool fRecommendedIgnoreBundle, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel, - [MarshalAs(UnmanagedType.Bool)] ref bool fIgnoreBundle - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheContainerOrPayloadVerifyBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheContainerOrPayloadVerifyProgress( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.U8)] long dw64Progress, - [MarshalAs(UnmanagedType.U8)] long dw64Total, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCacheContainerOrPayloadVerifyComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePayloadExtractBegin( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePayloadExtractProgress( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.U8)] long dw64Progress, - [MarshalAs(UnmanagedType.U8)] long dw64Total, - [MarshalAs(UnmanagedType.U4)] int dwOverallPercentage, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePayloadExtractComplete( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanRestoreRelatedBundle( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RequestState recommendedState, - [MarshalAs(UnmanagedType.U4)] ref RequestState pRequestedState, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnPlanRelatedBundleType( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RelatedBundlePlanType recommendedType, - [MarshalAs(UnmanagedType.U4)] ref RelatedBundlePlanType pRequestedType, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnApplyDowngrade( - [MarshalAs(UnmanagedType.I4)] int hrRecommended, - [MarshalAs(UnmanagedType.I4)] ref int hrStatus - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnExecuteProcessCancel( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int processId, - [MarshalAs(UnmanagedType.I4)] BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation, - [MarshalAs(UnmanagedType.I4)] ref BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION pAction - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnDetectRelatedBundlePackage( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.U4)] RelationType relationType, - [MarshalAs(UnmanagedType.Bool)] bool fPerMachine, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.Bool)] ref bool fCancel - ); - - /// - /// See . - /// - [PreserveSig] - [return: MarshalAs(UnmanagedType.I4)] - int OnCachePackageNonVitalValidationFailure( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageId, - int hrStatus, - BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation, - ref BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action - ); - } - - /// - /// The display level for the BA. - /// - public enum Display - { - /// - /// Invalid value. - /// - Unknown, - - /// - /// The bundle is being run through the Burn protocol by an external application. - /// - Embedded, - - /// - /// No UI should be shown. - /// - None, - - /// - /// The UI should not require any interaction from the user. - /// - Passive, - - /// - /// The UI should be fully interactive. - /// - Full, - } - - /// - /// Messages from Windows Installer (msi.h). - /// - public enum InstallMessage - { - /// - /// premature termination, possibly fatal OOM - /// - FatalExit, - - /// - /// formatted error message - /// - Error = 0x01000000, - - /// - /// formatted warning message - /// - Warning = 0x02000000, - - /// - /// user request message - /// - User = 0x03000000, - - /// - /// informative message for log - /// - Info = 0x04000000, - - /// - /// list of files in use that need to be replaced - /// - FilesInUse = 0x05000000, - - /// - /// request to determine a valid source location - /// - ResolveSource = 0x06000000, - - /// - /// insufficient disk space message - /// - OutOfDiskSpace = 0x07000000, - - /// - /// start of action: action name & description - /// - ActionStart = 0x08000000, - - /// - /// formatted data associated with individual action item - /// - ActionData = 0x09000000, - - /// - /// progress gauge info: units so far, total - /// - Progress = 0x0a000000, - - /// - /// product info for dialog: language Id, dialog caption - /// - CommonData = 0x0b000000, - - /// - /// sent prior to UI initialization, no string data - /// - Initialize = 0x0c000000, - - /// - /// sent after UI termination, no string data - /// - Terminate = 0x0d000000, - - /// - /// sent prior to display or authored dialog or wizard - /// - ShowDialog = 0x0e000000, - - /// - /// log only, to log performance number like action time - /// - Performance = 0x0f000000, - - /// - /// the list of apps that the user can request Restart Manager to shut down and restart - /// - RMFilesInUse = 0x19000000, - - /// - /// sent prior to server-side install of a product - /// - InstallStart = 0x1a000000, - - /// - /// sent after server-side install - /// - InstallEnd = 0x1B000000, - } - - /// - /// The action to perform when a reboot is necessary. - /// - public enum Restart - { - /// - /// Invalid value. - /// - Unknown, - - /// - /// The bundle should never initiate a restart. - /// - Never, - - /// - /// The bundle should prompt the user whether to restart. - /// - Prompt, - - /// - /// The bundle should restart if necessary. - /// - Automatic, - - /// - /// The bundle should always restart when given the option. - /// - Always, - } - - /// - /// The display name to use when registering in Add/Remove Programs. - /// - public enum RegistrationType - { - /// - /// No registration. - /// The engine will ignore None if it recommended InProgress or Full. - /// - None, - - /// - /// The in-progress display name. - /// - InProgress, - - /// - /// The default display name. - /// - Full, - } - - /// - /// Result codes (based on Dialog Box Command IDs from WinUser.h). - /// - public enum Result - { - /// - /// An error occurred. - /// - Error = -1, - - /// - /// Invalid value. - /// - None, - - /// - /// IDOK - /// - Ok, - - /// - /// IDCANCEL - /// - Cancel, - - /// - /// IDABORT - /// - Abort, - - /// - /// IDRETRY - /// - Retry, - - /// - /// IDIGNORE - /// - Ignore, - - /// - /// IDYES - /// - Yes, - - /// - /// IDNO - /// - No, - - /// - /// IDCLOSE - /// - Close, - - /// - /// IDHELP - /// - Help, - - /// - /// IDTRYAGAIN - /// - TryAgain, - - /// - /// IDCONTINUE - /// - Continue, - } - - /// - /// Describes why a bundle or packaged is being resumed. - /// - public enum ResumeType - { - /// - /// No resume information. - /// - None, - - /// - /// Resume information exists but is invalid. - /// - Invalid, - - /// - /// The bundle was re-launched after an unexpected interruption. - /// - Interrupted, - - /// - /// The bundle was re-launched after a reboot. - /// - Reboot, - - /// - /// The bundle was re-launched after being suspended. - /// - Suspend, - - /// - /// The bundle was launched from Add/Remove Programs. - /// - Arp, - } - - /// - /// Indicates what caused the error. - /// - public enum ErrorType - { - /// - /// The error occurred trying to elevate. - /// - Elevate, - - /// - /// The error came from the Windows Installer. - /// - WindowsInstaller, - - /// - /// The error came from an EXE Package. - /// - ExePackage, - - /// - /// The error came while trying to authenticate with an HTTP server. - /// - HttpServerAuthentication, - - /// - /// The error came while trying to authenticate with an HTTP proxy. - /// - HttpProxyAuthentication, - - /// - /// The error occurred during apply. - /// - Apply, - }; - - /// - /// Indicates the source of the FilesInUse message. - /// - public enum FilesInUseType - { - /// - /// Generated from INSTALLMESSAGE_FILESINUSE. - /// - Msi, - /// - /// Generated from INSTALLMESSAGE_RMFILESINUSE. - /// - MsiRm, - /// - /// Generated from MMIO_CLOSE_APPS. - /// - Netfx, - } - - /// - /// The calculated operation for the related MSI package. - /// - public enum RelatedOperation - { - /// - /// No relation. - /// - None, - - /// - /// The related bundle or package will be downgraded. - /// - Downgrade, - - /// - /// The related package will be upgraded as a minor revision. - /// - MinorUpdate, - - /// - /// The related bundle or package will be upgraded as a major revision. - /// - MajorUpgrade, - - /// - /// The related bundle will be removed. - /// - Remove, - - /// - /// The related bundle will be installed. - /// - Install, - - /// - /// The related bundle will be repaired. - /// - Repair, - }; - - /// - /// The cache operation used to acquire a container or payload. - /// - public enum CacheOperation - { - /// - /// There is no source available. - /// - None, - - /// - /// Copy the payload or container from the chosen local source. - /// - Copy, - - /// - /// Download the payload or container using the download URL. - /// - Download, - - /// - /// Extract the payload from the container. - /// - Extract, - } - - /// - /// The source to be used to acquire a container or payload. - /// - public enum CacheResolveOperation - { - /// - /// There is no source available. - /// - None, - - /// - /// Copy the payload or container from the chosen local source. - /// - Local, - - /// - /// Download the payload or container from the download URL. - /// - Download, - - /// - /// Extract the payload from the container. - /// - Container, - - /// - /// Look again for the payload or container locally. - /// - Retry, - } - - /// - /// The current step when verifying a container or payload. - /// - public enum CacheVerifyStep - { - /// - /// Copying or moving the file from the working path to the unverified path. - /// Not used during Layout. - /// - Stage, - /// - /// Hashing the file. - /// - Hash, - /// - /// Copying or moving the file to the final location. - /// - Finalize, - } - - /// - /// The restart state after a package or all packages were applied. - /// - public enum ApplyRestart - { - /// - /// Package or chain does not require a restart. - /// - None, - - /// - /// Package or chain requires a restart but it has not been initiated yet. - /// - RestartRequired, - - /// - /// Package or chain has already initiated the restart. - /// - RestartInitiated - } - - /// - /// The relation type for related bundles. - /// - public enum RelationType - { - /// - /// No relation. - /// - None, - - /// - /// The related bundle is detected by the running bundle. - /// This relationship is reversed for - /// - Detect, - - /// - /// The related bundle shares an upgrade code with the running bundle. - /// This relationship is reversed for - /// - Upgrade, - - /// - /// The related bundle is an add-on for the running bundle. - /// This relationship is reversed for - /// - Addon, - - /// - /// The related bundle is a patch for the running bundle. - /// This relationship is reversed for - /// - Patch, - - /// - /// The running bundle is an add-on for the related bundle. - /// This relationship is reversed for - /// - DependentAddon, - - /// - /// The running bundle is a patch for the related bundle. - /// This relationship is reversed for - /// - DependentPatch, - - /// - /// The related bundle is a newer version of the running bundle. - /// This relationship is reversed for - /// - Update, - - /// - /// The related bundle is in the running bundle's chain. - /// This relationship is reversed for - /// - ChainPackage, - } - - /// - /// The planned relation type for related bundles. - /// - public enum RelatedBundlePlanType - { - /// - /// Don't execute the related bundle. - /// - None, - - /// - /// The running bundle is a downgrade for the related bundle. - /// - Downgrade, - - /// - /// The running bundle is an upgrade for the related bundle. - /// - Upgrade, - - /// - /// The related bundle is an add-on of the running bundle. - /// - Addon, - - /// - /// The related bundle is a patch for the running bundle. - /// - Patch, - - /// - /// The running bundle is an add-on for the related bundle. - /// - DependentAddon, - - /// - /// The running bundle is a patch for the related bundle. - /// - DependentPatch, - } - - /// - /// One or more reasons why the application is requested to be closed or is being closed. - /// - [Flags] - public enum EndSessionReasons - { - /// - /// The system is shutting down or restarting (it is not possible to determine which event is occurring). - /// - Unknown, - - /// - /// The application is using a file that must be replaced, the system is being serviced, or system resources are exhausted. - /// - CloseApplication, - - /// - /// The application is forced to shut down. - /// - Critical = 0x40000000, - - /// - /// The user is logging off. - /// - Logoff = unchecked((int)0x80000000) - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to restart. - /// The engine will not launch again after the machine is rebooted. - /// Ignored if reboot was already initiated by . - /// - Restart, - } - - /// - /// The cache strategy to be used for the package. - /// - public enum BOOTSTRAPPER_CACHE_TYPE - { - /// - /// The package will be cached in order to securely run the package, but will always be cleaned from the cache at the end. - /// - Remove, - - /// - /// The package will be cached in order to run the package, and then kept in the cache until the package is uninstalled. - /// - Keep, - - /// - /// The package will always be cached and stay in the cache, unless the package and bundle are both being uninstalled. - /// - Force, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to try the acquisition of the payload again. - /// Ignored if hrStatus is a success. - /// - Retry, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to ignore non-vital package failures and continue with the caching. - /// Ignored if hrStatus is a success or the package is vital. - /// - Ignore, - - /// - /// Instructs the engine to try the acquisition and verification of the package again. - /// Ignored if hrStatus is a success. - /// - Retry, - } - - /// - /// The available actions for - /// - public enum BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to try to acquire the package so execution can use it. - /// Most of the time this is used for installing the package during rollback. - /// - Acquire, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Ignored if hrStatus is a success. - /// - RetryVerification, - - /// - /// Ignored if hrStatus is a success. - /// - RetryAcquisition, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to ignore non-vital package failures and continue with the install. - /// Ignored if hrStatus is a success or the package is vital. - /// - Ignore, - - /// - /// Instructs the engine to try the execution of the package again. - /// Ignored if hrStatus is a success. - /// - Retry, - - /// - /// Instructs the engine to stop processing the chain and restart. - /// The engine will launch again after the machine is restarted. - /// - Restart, - - /// - /// Instructs the engine to stop processing the chain and suspend the current state. - /// - Suspend, - } - - /// - /// The available actions for and . - /// - public enum BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to stop processing the chain and restart. - /// The engine will launch again after the machine is restarted. - /// - Restart, - }; - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION - { - /// - /// Instructs the engine to stop waiting for the process to exit. - /// The package is immediately considered to have failed with ERROR_INSTALL_USEREXIT. - /// The engine will never rollback the package. - /// - Abandon, - - /// - /// Instructs the engine to wait for the process to exit. - /// Once the process has exited, the package is considered to have failed with ERROR_INSTALL_USEREXIT. - /// This allows the engine to rollback the package if necessary. - /// - Wait, - } - - /// - /// The result of evaluating a condition from a package. - /// - public enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT - { - /// - /// No condition was authored. - /// - Default, - - /// - /// Evaluated to false. - /// - False, - - /// - /// Evaluated to true. - /// - True, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_RESOLVESOURCE_ACTION - { - /// - /// Instructs the engine that the source can't be found. - /// - None, - - /// - /// Instructs the engine to try the local source again. - /// - Retry, - - /// - /// Instructs the engine to try the download source. - /// - Download, - } - - /// - /// The available actions for . - /// - public enum BOOTSTRAPPER_SHUTDOWN_ACTION - { - /// - /// Instructs the engine to not take any special action. - /// - None, - - /// - /// Instructs the engine to restart. - /// The engine will not launch again after the machine is rebooted. - /// Ignored if reboot was already initiated by . - /// - Restart, - - /// - /// Instructs the engine to unload the bootstrapper application and - /// restart the engine which will load the bootstrapper application again. - /// Typically used to switch from a native bootstrapper application to a managed one. - /// - ReloadBootstrapper, - - /// - /// Opts out of the engine behavior of trying to uninstall itself when no non-permanent packages are installed. - /// - SkipCleanup, - } - - /// - /// The file versioning options for REINSTALLMODE, see https://docs.microsoft.com/en-us/windows/win32/msi/reinstallmode. - /// - public enum BOOTSTRAPPER_MSI_FILE_VERSIONING - { - /// - /// o - /// - Older, - /// - /// e - /// - Equal, - /// - /// a - /// - All, - } - - /// - /// The property Burn will add so the MSI can know the planned action for the package. - /// - public enum BURN_MSI_PROPERTY - { - /// - /// No property will be added. - /// - None, - - /// - /// Add BURNMSIINSTALL=1 - /// - Install, - - /// - /// Add BURNMSIMODFIY=1 - /// - Modify, - - /// - /// Add BURNMSIREPAIR=1 - /// - Repair, - - /// - /// Add BURNMSIUNINSTALL=1 - /// - Uninstall, - } - - /// - /// From msi.h - /// https://docs.microsoft.com/en-us/windows/win32/api/msi/nf-msi-msisetinternalui - /// - [Flags] - public enum INSTALLUILEVEL - { - /// - /// UI level is unchanged - /// - NoChange = 0, - - /// - /// default UI is used - /// - Default = 1, - - /// - /// completely silent installation - /// - None = 2, - - /// - /// simple progress and error handling - /// - Basic = 3, - - /// - /// authored UI, wizard dialogs suppressed - /// - Reduced = 4, - - /// - /// authored UI with wizards, progress, errors - /// - Full = 5, - - /// - /// display success/failure dialog at end of install - /// - EndDialog = 0x80, - - /// - /// display only progress dialog - /// - ProgressOnly = 0x40, - - /// - /// do not display the cancel button in basic UI - /// - HideCancel = 0x20, - - /// - /// force display of source resolution even if quiet - /// - SourceResOnly = 0x100, - - /// - /// show UAC prompt even if quiet - /// Can only be used if on Windows Installer 5.0 or later - /// - UacOnly = 0x200, - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationData.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationData.cs deleted file mode 100644 index 23a1c8a3..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationData.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. - -namespace WixToolset.Mba.Core -{ - using System.IO; - - /// - /// Interface for BootstrapperApplicationData.xml. - /// - public interface IBootstrapperApplicationData - { - /// - /// The BootstrapperApplicationData.xml file. - /// - FileInfo BADataFile { get; } - - /// - /// The BA manifest. - /// - IBundleInfo Bundle { get; } - } -} \ No newline at end of file diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationFactory.cs deleted file mode 100644 index 393c7e31..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperApplicationFactory.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. - -namespace WixToolset.Mba.Core -{ - using System; - using System.CodeDom.Compiler; - using System.Runtime.InteropServices; - - /// - /// This is no longer used. - /// - [Obsolete("Bootstrapper applications now run out of proc and do not use a BootstrapperApplicationFactory. Remove your BootstrapperApplicationFactory class. See https://wixtoolset.org/docs/fiveforfour/ for more details.")] - public interface IBootstrapperApplicationFactory - { - /// - /// This is no longer used. - /// - /// This is no longer used. - /// This is no longer used. - void Create(IntPtr pArgs, IntPtr pResults); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperCommand.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperCommand.cs deleted file mode 100644 index f583e619..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperCommand.cs +++ /dev/null @@ -1,79 +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 WixToolset.Mba.Core -{ - using System; - - /// - /// Command information passed from the engine for the BA to perform. - /// - public interface IBootstrapperCommand - { - /// - /// Gets the action for the BA to perform. - /// - LaunchAction Action { get; } - - /// - /// Gets the display level for the BA. - /// - Display Display { get; } - - /// - /// Gets the command line arguments. - /// - /// - /// Command line arguments not handled by the engine. - /// - string CommandLine { get; } - - /// - /// Hint for the initial visibility of the window. - /// - int CmdShow { get; } - - /// - /// Gets the method of how the engine was resumed from a previous installation step. - /// - ResumeType Resume { get; } - - /// - /// Gets the handle to the splash screen window. If no splash screen was displayed this value will be IntPtr.Zero. - /// - IntPtr SplashScreen { get; } - - /// - /// If this was run from a related bundle, specifies the relation type. - /// - RelationType Relation { get; } - - /// - /// If this was run from a backward compatible bundle. - /// - bool Passthrough { get; } - - /// - /// Gets layout directory. - /// - string LayoutDirectory { get; } - - /// - /// Gets bootstrapper working folder. - /// - string BootstrapperWorkingFolder { get; } - - /// - /// Gets path to BootstrapperApplicationData.xml. - /// - string BootstrapperApplicationDataPath { get; } - - /// - /// Parses the command line arguments into an . - /// - /// - /// The parsed information. - /// - /// The command line could not be parsed. - IMbaCommand ParseCommandLine(); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IBootstrapperEngine.cs b/src/api/burn/WixToolset.Mba.Core/IBootstrapperEngine.cs deleted file mode 100644 index a175bead..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBootstrapperEngine.cs +++ /dev/null @@ -1,501 +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 WixToolset.Mba.Core -{ - using System; - using System.CodeDom.Compiler; - using System.Runtime.InteropServices; - using System.Text; - - /// - /// Allows calls into the bootstrapper engine. - /// - [ComImport] - [InterfaceType(ComInterfaceType.InterfaceIsIUnknown)] - [Guid("6480D616-27A0-44D7-905B-81512C29C2FB")] - [GeneratedCodeAttribute("WixToolset.Bootstrapper.InteropCodeGenerator", "1.0.0.0")] - public interface IBootstrapperEngine - { - /// - /// See . - /// - void GetPackageCount( - [MarshalAs(UnmanagedType.U4)] out int pcPackages - ); - - /// - /// See . - /// - [PreserveSig] - int GetVariableNumeric( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - out long pllValue - ); - - /// - /// See . - /// - [PreserveSig] - int GetVariableString( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - IntPtr wzValue, - ref IntPtr pcchValue - ); - - /// - /// See . - /// - [PreserveSig] - int GetVariableVersion( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - IntPtr wzValue, - ref IntPtr pcchValue - ); - - /// - /// See . - /// - [PreserveSig] - int FormatString( - [MarshalAs(UnmanagedType.LPWStr)] string wzIn, - [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, - ref IntPtr pcchOut - ); - - /// - /// See . - /// - [PreserveSig] - int EscapeString( - [MarshalAs(UnmanagedType.LPWStr)] string wzIn, - [MarshalAs(UnmanagedType.LPWStr), Out] StringBuilder wzOut, - ref IntPtr pcchOut - ); - - /// - /// See . - /// - void EvaluateCondition( - [MarshalAs(UnmanagedType.LPWStr)] string wzCondition, - [MarshalAs(UnmanagedType.Bool)] out bool pf - ); - - /// - /// See . - /// - void Log( - [MarshalAs(UnmanagedType.U4)] LogLevel level, - [MarshalAs(UnmanagedType.LPWStr)] string wzMessage - ); - - /// - /// See . - /// - void SendEmbeddedError( - [MarshalAs(UnmanagedType.U4)] int dwErrorCode, - [MarshalAs(UnmanagedType.LPWStr)] string wzMessage, - [MarshalAs(UnmanagedType.U4)] int dwUIHint, - [MarshalAs(UnmanagedType.I4)] out int pnResult - ); - - /// - /// See . - /// - void SendEmbeddedProgress( - [MarshalAs(UnmanagedType.U4)] int dwProgressPercentage, - [MarshalAs(UnmanagedType.U4)] int dwOverallProgressPercentage, - [MarshalAs(UnmanagedType.I4)] out int pnResult - ); - - /// - /// See . - /// - void SetUpdate( - [MarshalAs(UnmanagedType.LPWStr)] string wzLocalSource, - [MarshalAs(UnmanagedType.LPWStr)] string wzDownloadSource, - [MarshalAs(UnmanagedType.U8)] long qwValue, - [MarshalAs(UnmanagedType.U4)] UpdateHashType hashType, - [MarshalAs(UnmanagedType.LPWStr)] string wzHash, - [MarshalAs(UnmanagedType.LPWStr)] string wzUpdatePackageId - ); - - /// - /// See . - /// - void SetLocalSource( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPath - ); - - /// - /// See . - /// - void SetDownloadSource( - [MarshalAs(UnmanagedType.LPWStr)] string wzPackageOrContainerId, - [MarshalAs(UnmanagedType.LPWStr)] string wzPayloadId, - [MarshalAs(UnmanagedType.LPWStr)] string wzUrl, - [MarshalAs(UnmanagedType.LPWStr)] string wzUser, - [MarshalAs(UnmanagedType.LPWStr)] string wzPassword - ); - - /// - /// See . - /// - void SetVariableNumeric( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - long llValue - ); - - /// - /// See . - /// - void SetVariableString( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - IntPtr wzValue, - [MarshalAs(UnmanagedType.Bool)] bool fFormatted - ); - - /// - /// See . - /// - void SetVariableVersion( - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - IntPtr wzValue - ); - - /// - /// See . - /// - void CloseSplashScreen(); - - /// - /// See . - /// - void Detect( - IntPtr hwndParent - ); - - /// - /// See . - /// - void Plan( - [MarshalAs(UnmanagedType.U4)] LaunchAction action - ); - - /// - /// See . - /// - [PreserveSig] - int Elevate( - IntPtr hwndParent - ); - - /// - /// See . - /// - void Apply( - IntPtr hwndParent - ); - - /// - /// See . - /// - void Quit( - [MarshalAs(UnmanagedType.U4)] int dwExitCode - ); - - /// - /// See . - /// - void LaunchApprovedExe( - IntPtr hwndParent, - [MarshalAs(UnmanagedType.LPWStr)] string wzApprovedExeForElevationId, - [MarshalAs(UnmanagedType.LPWStr)] string wzArguments, - [MarshalAs(UnmanagedType.U4)] int dwWaitForInputIdleTimeout - ); - - /// - /// Sets the URL to the update feed. - /// - void SetUpdateSource( - [MarshalAs(UnmanagedType.LPWStr)] string url - ); - - /// - /// See . - /// - void CompareVersions( - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion1, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion2, - [MarshalAs(UnmanagedType.I4)] out int pnResult - ); - - /// - /// See . - /// - [PreserveSig] - int GetRelatedBundleVariable( - [MarshalAs(UnmanagedType.LPWStr)] string wzBundleId, - [MarshalAs(UnmanagedType.LPWStr)] string wzVariable, - IntPtr wzValue, - ref IntPtr pcchValue - ); - } - - /// - /// The installation action for the bundle or current package. - /// - public enum ActionState - { - /// - /// No action. - /// - None, - - /// - /// Uninstall action. - /// - Uninstall, - - /// - /// Install action. - /// - Install, - - /// - /// Modify action. - /// - Modify, - - /// - /// Repair action. - /// - Repair, - - /// - /// Minor upgrade action. - /// - MinorUpgrade, - } - - /// - /// The action for the bundle to perform. - /// - public enum LaunchAction - { - /// - /// Invalid action. - /// - Unknown, - - /// - /// Provide help information. - /// - Help, - - /// - /// Layout the bundle on disk, normally to prepare for offline installation. - /// - Layout, - - /// - /// Same as Uninstall, except it will always remove itself from the package cache and Add/Remove Programs. - /// This should only be used to remove corrupt bundles since it might not properly clean up its packages. - /// - UnsafeUninstall, - - /// - /// Uninstall the bundle. - /// - Uninstall, - - /// - /// Cache the bundle and its packages. - /// - Cache, - - /// - /// Install the bundle. - /// - Install, - - /// - /// Modify the bundle. - /// - Modify, - - /// - /// Repair the bundle - /// - Repair, - - /// - /// Launch the update registered with and then exit without waiting for it to complete. - /// - UpdateReplace, - - /// - /// Launch the update registered with as an embedded bundle. - /// - UpdateReplaceEmbedded, - } - - /// - /// The message log level. - /// - public enum LogLevel - { - /// - /// No logging level (generic). - /// - None, - - /// - /// User messages. - /// - Standard, - - /// - /// Verbose messages. - /// - Verbose, - - /// - /// Messages for debugging. - /// - Debug, - - /// - /// Error messages. - /// - Error, - } - - /// - /// Type of hash used for update bundle. - /// - public enum UpdateHashType - { - /// - /// No hash provided. - /// - None, - - /// - /// SHA-512 based hash provided. - /// - Sha512, - } - - /// - /// Describes the state of an installation package. - /// - public enum PackageState - { - /// - /// Invalid state. - /// - Unknown, - - /// - /// The package is not on the machine (except possibly MspPackage) and should not be installed. - /// - Obsolete, - - /// - /// The package is not installed. - /// - Absent, - - /// - /// The package is installed. - /// - Present, - - /// - /// The package is on the machine but not active, so only uninstall operations are allowed. - /// - Superseded, - - /// - /// This value is no longer used. See the DetectPackageCompleteEventArgs.Cached value instead. - /// - [Obsolete("Use DetectPackageCompleteEventArgs.Cached instead.")] - Cached = Present, - } - - /// - /// Indicates the state desired for an installation package. - /// - public enum RequestState - { - /// - /// No change requested. - /// - None, - - /// - /// As long as there are no dependents, the package will be uninstalled. - /// There are some packages that can't be uninstalled, such as an ExePackage without an UninstallCommand. - /// - ForceAbsent, - - /// - /// Request the package to not be installed on the machine. - /// - Absent, - - /// - /// Request the package to be cached and not be installed on the machine. - /// - Cache, - - /// - /// Request the package to be installed on the machine. - /// - Present, - - /// - /// Force the bundle to install the package. - /// - ForcePresent, - - /// - /// Request the package to be repaired. - /// - Repair, - } - - /// - /// Indicates the state of a feature. - /// See https://learn.microsoft.com/en-us/windows/win32/api/msi/nf-msi-msiqueryfeaturestatew. - /// - public enum FeatureState - { - /// - /// Invalid state. - /// - Unknown, - - /// - /// INSTALLSTATE_ABSENT - /// - Absent, - - /// - /// INSTALLSTATE_ADVERTISED - /// - Advertised, - - /// - /// INSTALLSTATE_LOCAL - /// - Local, - - /// - /// INSTALLSTATE_SOURCE - /// - Source, - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IBundleInfo.cs b/src/api/burn/WixToolset.Mba.Core/IBundleInfo.cs deleted file mode 100644 index 3c52fc02..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IBundleInfo.cs +++ /dev/null @@ -1,54 +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 WixToolset.Mba.Core -{ - using System.Collections.Generic; - - /// - /// BA manifest data. - /// - public interface IBundleInfo - { - /// - /// The name of the variable that contains the path to the bundle's log. - /// - string LogVariable { get; } - - /// - /// Bundle/@Name - /// - string Name { get; } - - /// - /// Variables that were marked with bal:Overridable="yes". - /// - IOverridableVariables OverridableVariables { get; } - - /// - /// The packages in the bundle's chain. - /// - IDictionary Packages { get; } - - /// - /// Whether the bundle is per-machine or per-user. - /// - bool PerMachine { get; } - - /// - /// Adds a related bundle as a package. - /// - /// - /// - /// - /// - /// The created . - IPackageInfo AddRelatedBundleAsPackage(string productCode, RelationType relationType, bool perMachine, string version); - - /// - /// Adds an update bundle as a package. - /// - /// Package id added as update bundle. - /// The created . - IPackageInfo AddUpdateBundleAsPackage(string packageId); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs deleted file mode 100644 index 51ea4e4d..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IDefaultBootstrapperApplication.cs +++ /dev/null @@ -1,436 +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 WixToolset.Mba.Core -{ - using System; - - /// - /// Interface for built-in implementation of . - /// - public interface IDefaultBootstrapperApplication : IBootstrapperApplication - { - /// - /// Fired when the engine has begun installing the bundle. - /// - event EventHandler ApplyBegin; - - /// - /// Fired when the engine has completed installing the bundle. - /// - event EventHandler ApplyComplete; - - /// - /// Fired when the plan determined that nothing should happen to prevent downgrading. - /// - event EventHandler ApplyDowngrade; - - /// - /// Fired when the engine is about to begin an MSI transaction. - /// - event EventHandler BeginMsiTransactionBegin; - - /// - /// Fired when the engine has completed beginning an MSI transaction. - /// - event EventHandler BeginMsiTransactionComplete; - - /// - /// Fired when the engine has begun acquiring the payload or container. - /// The BA can change the source using - /// or . - /// - event EventHandler CacheAcquireBegin; - - /// - /// Fired when the engine has completed the acquisition of the payload or container. - /// The BA can change the source using - /// or . - /// - event EventHandler CacheAcquireComplete; - - /// - /// Fired when the engine has progress acquiring the payload or container. - /// - event EventHandler CacheAcquireProgress; - - /// - /// Fired by the engine to allow the BA to override the acquisition action. - /// - event EventHandler CacheAcquireResolving; - - /// - /// Fired when the engine has begun caching the installation sources. - /// - event EventHandler CacheBegin; - - /// - /// Fired after the engine has cached the installation sources. - /// - event EventHandler CacheComplete; - - /// - /// Fired when the engine begins the verification of the payload or container that was already in the package cache. - /// - event EventHandler CacheContainerOrPayloadVerifyBegin; - - /// - /// Fired when the engine has completed the verification of the payload or container that was already in the package cache. - /// - event EventHandler CacheContainerOrPayloadVerifyComplete; - - /// - /// Fired when the engine has progress verifying the payload or container that was already in the package cache. - /// - event EventHandler CacheContainerOrPayloadVerifyProgress; - - /// - /// Fired when the engine has begun caching a specific package. - /// - event EventHandler CachePackageBegin; - - /// - /// Fired when the engine has completed caching a specific package. - /// - event EventHandler CachePackageComplete; - - /// - /// Fired when the engine failed validating a package in the package cache that is non-vital to execution. - /// - event EventHandler CachePackageNonVitalValidationFailure; - - /// - /// Fired when the engine begins the extraction of the payload from the container. - /// - event EventHandler CachePayloadExtractBegin; - - /// - /// Fired when the engine has completed the extraction of the payload from the container. - /// - event EventHandler CachePayloadExtractComplete; - - /// - /// Fired when the engine has progress extracting the payload from the container. - /// - event EventHandler CachePayloadExtractProgress; - - /// - /// Fired when the engine begins the verification of the acquired payload or container. - /// - event EventHandler CacheVerifyBegin; - - /// - /// Fired when the engine has completed the verification of the acquired payload or container. - /// - event EventHandler CacheVerifyComplete; - - /// - /// Fired when the engine has progress verifying the payload or container. - /// - event EventHandler CacheVerifyProgress; - - /// - /// Fired when the engine is about to commit an MSI transaction. - /// - event EventHandler CommitMsiTransactionBegin; - - /// - /// Fired when the engine has completed comitting an MSI transaction. - /// - event EventHandler CommitMsiTransactionComplete; - - /// - /// Fired when the application is being created. - /// - event EventHandler Create; - - /// - /// Fired when the application is being destroyed. - /// - event EventHandler Destroy; - - /// - /// Fired when the overall detection phase has begun. - /// - event EventHandler DetectBegin; - - /// - /// Fired when a package was not detected but a package using the same provider key was. - /// - event EventHandler DetectCompatibleMsiPackage; - - /// - /// Fired when the detection phase has completed. - /// - event EventHandler DetectComplete; - - /// - /// Fired when a forward compatible bundle is detected. - /// - event EventHandler DetectForwardCompatibleBundle; - - /// - /// Fired when a feature in an MSI package has been detected. - /// - event EventHandler DetectMsiFeature; - - /// - /// Fired when the detection for a specific package has begun. - /// - event EventHandler DetectPackageBegin; - - /// - /// Fired when the detection for a specific package has completed. - /// - event EventHandler DetectPackageComplete; - - /// - /// Fired when the engine detects a target product for an MSP package. - /// - event EventHandler DetectPatchTarget; - - /// - /// Fired when a related bundle has been detected for a bundle. - /// - event EventHandler DetectRelatedBundle; - - /// - /// Fired when a related bundle has been detected for a bundle package. - /// - event EventHandler DetectRelatedBundlePackage; - - /// - /// Fired when a related MSI package has been detected for a package. - /// - event EventHandler DetectRelatedMsiPackage; - - /// - /// Fired when the update detection has found a potential update candidate. - /// - event EventHandler DetectUpdate; - - /// - /// Fired when the update detection phase has begun. - /// - event EventHandler DetectUpdateBegin; - - /// - /// Fired when the update detection phase has completed. - /// - event EventHandler DetectUpdateComplete; - - /// - /// Fired when the engine is about to start the elevated process. - /// - event EventHandler ElevateBegin; - - /// - /// Fired when the engine has completed starting the elevated process. - /// - event EventHandler ElevateComplete; - - /// - /// Fired when the engine has encountered an error. - /// - event EventHandler Error; - - /// - /// Fired when the engine has begun installing packages. - /// - event EventHandler ExecuteBegin; - - /// - /// Fired when the engine has completed installing packages. - /// - event EventHandler ExecuteComplete; - - /// - /// Fired when a package sends a files in use installation message. - /// - event EventHandler ExecuteFilesInUse; - - /// - /// Fired when Windows Installer sends an installation message. - /// - event EventHandler ExecuteMsiMessage; - - /// - /// Fired when the engine has begun installing a specific package. - /// - event EventHandler ExecutePackageBegin; - - /// - /// Fired when the engine has completed installing a specific package. - /// - event EventHandler ExecutePackageComplete; - - /// - /// Fired when a package that spawned a process is cancelled. - /// - event EventHandler ExecuteProcessCancel; - - /// - /// Fired when the engine executes one or more patches targeting a product. - /// - event EventHandler ExecutePatchTarget; - - /// - /// Fired by the engine while executing a package. - /// - event EventHandler ExecuteProgress; - - /// - /// Fired when the engine is about to launch the preapproved executable. - /// - event EventHandler LaunchApprovedExeBegin; - - /// - /// Fired when the engine has completed launching the preapproved executable. - /// - event EventHandler LaunchApprovedExeComplete; - - /// - /// Fired when the engine is about to pause Windows automatic updates. - /// - event EventHandler PauseAutomaticUpdatesBegin; - - /// - /// Fired when the engine has completed pausing Windows automatic updates. - /// - event EventHandler PauseAutomaticUpdatesComplete; - - /// - /// Fired when the engine has begun planning the installation. - /// - event EventHandler PlanBegin; - - /// - /// Fired when the engine plans a new, compatible package using the same provider key. - /// - event EventHandler PlanCompatibleMsiPackageBegin; - - /// - /// Fired when the engine has completed planning the installation of a specific package. - /// - event EventHandler PlanCompatibleMsiPackageComplete; - - /// - /// Fired when the engine has completed planning the installation. - /// - event EventHandler PlanComplete; - - /// - /// Fired when the engine is about to plan a forward compatible bundle. - /// - event EventHandler PlanForwardCompatibleBundle; - - /// - /// Fired when the engine has completed planning a compatible package. - /// - event EventHandler PlannedCompatiblePackage; - - /// - /// Fired when the engine has completed planning a package. - /// - event EventHandler PlannedPackage; - - /// - /// Fired when the engine is about to plan a feature in an MSI package. - /// - event EventHandler PlanMsiFeature; - - /// - /// Fired when the engine is planning an MSI or MSP package. - /// - event EventHandler PlanMsiPackage; - - /// - /// Fired when the engine has begun getting the BA's input for planning a package. - /// - event EventHandler PlanPackageBegin; - - /// - /// Fired when the engine has completed getting the BA's input for planning a package. - /// - event EventHandler PlanPackageComplete; - - /// - /// Fired when the engine is about to plan a target of an MSP package. - /// - event EventHandler PlanPatchTarget; - - /// - /// Fired when the engine has begun planning for a related bundle. - /// - event EventHandler PlanRelatedBundle; - - /// - /// Fired when the engine has begun planning the related bundle relation type. - /// - event EventHandler PlanRelatedBundleType; - - /// - /// Fired when the engine has begun planning an upgrade related bundle for restoring in case of failure. - /// - event EventHandler PlanRestoreRelatedBundle; - - /// - /// Fired when the engine is planning a rollback boundary. - /// - event EventHandler PlanRollbackBoundary; - - /// - /// Fired when the engine has changed progress for the bundle installation. - /// - event EventHandler Progress; - - /// - /// Fired when the engine has begun registering the location and visibility of the bundle. - /// - event EventHandler RegisterBegin; - - /// - /// Fired when the engine has completed registering the location and visibility of the bundle. - /// - event EventHandler RegisterComplete; - - /// - /// Fired when the engine is about to rollback an MSI transaction. - /// - event EventHandler RollbackMsiTransactionBegin; - - /// - /// Fired when the engine has completed rolling back an MSI transaction. - /// - event EventHandler RollbackMsiTransactionComplete; - - /// - /// Fired when the engine is shutting down the bootstrapper application. - /// - event EventHandler Shutdown; - - /// - /// Fired when the engine is starting up the bootstrapper application. - /// - event EventHandler Startup; - - /// - /// Fired when the engine is about to take a system restore point. - /// - event EventHandler SystemRestorePointBegin; - - /// - /// Fired when the engine has completed taking a system restore point. - /// - event EventHandler SystemRestorePointComplete; - - /// - /// Fired when the engine unregisters the bundle. - /// - event EventHandler UnregisterBegin; - - /// - /// Fired when the engine unregistration is complete. - /// - event EventHandler UnregisterComplete; - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IEngine.cs b/src/api/burn/WixToolset.Mba.Core/IEngine.cs deleted file mode 100644 index dde97a70..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IEngine.cs +++ /dev/null @@ -1,230 +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 WixToolset.Mba.Core -{ - using System; - using System.ComponentModel; - using System.Security; - - /// - /// High level abstraction over the interface. - /// - public interface IEngine - { - /// - /// Gets the number of packages in the bundle. - /// - int PackageCount { get; } - - /// - /// Install the packages. - /// - /// The parent window for the installation user interface. - void Apply(IntPtr hwndParent); - - /// - /// Close the splash screen if it is still open. Does nothing if the splash screen is not or - /// never was opened. - /// - void CloseSplashScreen(); - - /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 - int CompareVersions(string version1, string version2); - - /// - /// Checks if a variable exists in the engine. - /// - /// The name of the variable. - /// Whether the variable exists. - bool ContainsVariable(string name); - - /// - /// Determine if all installation conditions are fulfilled. - /// - void Detect(); - - /// - /// Determine if all installation conditions are fulfilled. - /// - /// The parent window for the installation user interface. - void Detect(IntPtr hwndParent); - - /// - /// Elevate the install. - /// - /// The parent window of the elevation dialog. - /// true if elevation succeeded; otherwise, false if the user cancelled. - /// A Win32 error occurred. - bool Elevate(IntPtr hwndParent); - - /// - /// Escapes the input string. - /// - /// The string to escape. - /// The escaped string. - /// A Win32 error occurred. - string EscapeString(string input); - - /// - /// Evaluates the string. - /// - /// The string representing the condition to evaluate. - /// Whether the condition evaluated to true or false. - bool EvaluateCondition(string condition); - - /// - /// Formats the input string. - /// - /// The string to format. - /// The formatted string. - /// A Win32 error occurred. - string FormatString(string format); - - /// - /// Gets numeric variables for the engine. - /// - /// The name of the variable. - long GetVariableNumeric(string name); - - /// - /// Gets string variables for the engine using SecureStrings. - /// - /// The name of the variable. - SecureString GetVariableSecureString(string name); - - /// - /// Gets string variables for the engine. - /// - /// The name of the variable. - string GetVariableString(string name); - - /// - /// Gets variables for the engine. - /// - /// The name of the variable. - string GetVariableVersion(string name); - - /// - /// Gets persisted variables from a related bundle. - /// - /// The BundleId of the related bundle. - /// The name of the variable. - string GetRelatedBundleVariable(string bundleId, string name); - - /// - /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. - /// - /// The parent window of the elevation dialog (if the engine hasn't elevated yet). - /// Id of the ApprovedExeForElevation element specified when the bundle was authored. - /// Optional arguments. - void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments); - - /// - /// Launches a preapproved executable elevated. As long as the engine already elevated, there will be no UAC prompt. - /// - /// The parent window of the elevation dialog (if the engine hasn't elevated yet). - /// Id of the ApprovedExeForElevation element specified when the bundle was authored. - /// Optional arguments. - /// Timeout in milliseconds. When set to something other than zero, the engine will call WaitForInputIdle for the new process with this timeout before calling OnLaunchApprovedExeComplete. - void LaunchApprovedExe(IntPtr hwndParent, string approvedExeForElevationId, string arguments, int waitForInputIdleTimeout); - - /// - /// Logs the . - /// - /// The logging level. - /// The message to log. - void Log(LogLevel level, string message); - - /// - /// Determine the installation sequencing and costing. - /// - /// The action to perform when planning. - void Plan(LaunchAction action); - - /// - /// Set the update information for a bundle. - /// - /// Optional local source path for the update. Default is "update\[OriginalNameOfBundle].exe". - /// Optional download source for the update. - /// Size of the expected update. - /// Type of the hash expected on the update. - /// Optional hash expected for the update. - /// Optional package id for the update. - void SetUpdate(string localSource, string downloadSource, long size, UpdateHashType hashType, string hash, string updatePackageId); - - /// - /// Sets the URL to the update feed. - /// - /// URL of the update feed. - void SetUpdateSource(string url); - - /// - /// Set the local source for a package or container. - /// - /// The id that uniquely identifies the package or container. - /// The id that uniquely identifies the payload. - /// The new source path. - void SetLocalSource(string packageOrContainerId, string payloadId, string path); - - /// - /// Set the new download URL for a package or container. - /// - /// The id that uniquely identifies the package or container. - /// The id that uniquely identifies the payload. - /// The new url. - /// The user name for proxy authentication. - /// The password for proxy authentication. - void SetDownloadSource(string packageOrContainerId, string payloadId, string url, string user, string password); - - /// - /// Sets numeric variables for the engine. - /// - /// The name of the variable. - /// The value to set. - void SetVariableNumeric(string name, long value); - - /// - /// Sets string variables for the engine using SecureStrings. - /// - /// The name of the variable. - /// The value to set. - /// False if the value is a literal string. - void SetVariableString(string name, SecureString value, bool formatted); - - /// - /// Sets string variables for the engine. - /// - /// The name of the variable. - /// The value to set. - /// False if the value is a literal string. - void SetVariableString(string name, string value, bool formatted); - - /// - /// Sets version variables for the engine. - /// - /// The name of the variable. - /// The value to set. - void SetVariableVersion(string name, string value); - - /// - /// Sends error message when embedded. - /// - /// Error code. - /// Error message. - /// UI buttons to show on error dialog. - int SendEmbeddedError(int errorCode, string message, int uiHint); - - /// - /// Sends progress percentages when embedded. - /// - /// Percentage completed thus far. - /// Overall percentage completed. - int SendEmbeddedProgress(int progressPercentage, int overallPercentage); - - /// - /// Shuts down the engine. - /// - /// Exit code indicating reason for shut down. - void Quit(int exitCode); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IMbaCommand.cs b/src/api/burn/WixToolset.Mba.Core/IMbaCommand.cs deleted file mode 100644 index 495b2f44..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IMbaCommand.cs +++ /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. - -namespace WixToolset.Mba.Core -{ - using System.Collections.Generic; - - /// - /// Command information parsed from the command line. - /// - public interface IMbaCommand - { - /// - /// Gets the action to perform if a reboot is required. - /// - Restart Restart { get; } - - /// - /// The command line arguments not parsed into or . - /// - string[] UnknownCommandLineArgs { get; } - - /// - /// The variables that were parsed from the command line. - /// Key = variable name, Value = variable value. - /// - KeyValuePair[] Variables { get; } - - /// - /// Sets overridable variables from the command line. - /// - /// The overridable variable information from . - /// The engine. - void SetOverridableVariables(IOverridableVariables overridableVariables, IEngine engine); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IOverridableVariableInfo.cs b/src/api/burn/WixToolset.Mba.Core/IOverridableVariableInfo.cs deleted file mode 100644 index d01dead3..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IOverridableVariableInfo.cs +++ /dev/null @@ -1,15 +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 WixToolset.Mba.Core -{ - /// - /// Overridable variable from the BA manifest. - /// - public interface IOverridableVariableInfo - { - /// - /// The Variable name. - /// - string Name { get; } - } -} \ No newline at end of file diff --git a/src/api/burn/WixToolset.Mba.Core/IOverridableVariables.cs b/src/api/burn/WixToolset.Mba.Core/IOverridableVariables.cs deleted file mode 100644 index 2b26d7b6..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IOverridableVariables.cs +++ /dev/null @@ -1,37 +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 WixToolset.Mba.Core -{ - using System.Collections.Generic; - - /// - /// The case sensitivity of variables from the command line. - /// - public enum VariableCommandLineType - { - /// - /// All variable names specified on the command line must match the case specified when building the bundle. - /// - CaseSensitive, - /// - /// Variable names specified on the command line do not have to match the case specified when building the bundle. - /// - CaseInsensitive, - } - - /// - /// Overridable variable information from the BA manifest. - /// - public interface IOverridableVariables - { - /// - /// The of the bundle. - /// - VariableCommandLineType CommandLineType { get; } - - /// - /// Variable Dictionary of variable name to . - /// - IDictionary Variables { get; } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs b/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs deleted file mode 100644 index b1036143..00000000 --- a/src/api/burn/WixToolset.Mba.Core/IPackageInfo.cs +++ /dev/null @@ -1,100 +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 WixToolset.Mba.Core -{ - /// - /// Package information from the BA manifest. - /// - public interface IPackageInfo - { - /// - /// The authored cache strategy for this package. - /// - BOOTSTRAPPER_CACHE_TYPE CacheType { get; } - - /// - /// Place for the BA to store it's own custom data for this package. - /// - object CustomData { get; set; } - - /// - /// The package's description. - /// - string Description { get; } - - /// - /// The authored bal:DisplayInternalUICondition. - /// - string DisplayInternalUICondition { get; } - - /// - /// The package's display name. - /// - string DisplayName { get; } - - /// - /// The package's Id. - /// - string Id { get; } - - /// - /// The authored InstallCondition. - /// - string InstallCondition { get; } - - /// - /// The authored RepairCondition. - /// - string RepairCondition { get; } - - /// - /// Whether the bundle should ever recommend the package to be uninstalled. - /// - bool Permanent { get; } - - /// - /// Whether the package should be installed by the prereq BA for managed bootstrapper applications. - /// - bool PrereqPackage { get; } - - /// - /// The file name of the license file to be shown by the prereq BA. - /// - string PrereqLicenseFile { get; } - - /// - /// The URL of the license to be shown by the prereq BA. - /// - string PrereqLicenseUrl { get; } - - /// - /// See - /// - PrimaryPackageType PrimaryPackageType { get; } - - /// - /// The package's ProductCode. - /// - string ProductCode { get; } - - /// - /// The type of the package. - /// - PackageType Type { get; } - - /// - /// The package's UpgradeCode. - /// - string UpgradeCode { get; } - - /// - /// The package's version. - /// - string Version { get; } - - /// - /// Whether the package's failure can be ignored while executing the chain. - /// - bool Vital { get; } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/ManagedBootstrapperApplication.cs b/src/api/burn/WixToolset.Mba.Core/ManagedBootstrapperApplication.cs deleted file mode 100644 index 74bfbd73..00000000 --- a/src/api/burn/WixToolset.Mba.Core/ManagedBootstrapperApplication.cs +++ /dev/null @@ -1,19 +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 WixToolset.Mba.Core -{ - /// - /// Managed bootstrapper application entry point. - /// - public static class ManagedBootstrapperApplication - { - /// - /// Run the managed bootstrapper application. - /// - /// Bootstrapper applciation to run. - public static void Run(IBootstrapperApplication application) - { - MbaNative.BootstrapperApplicationRun(application); - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/MbaCommand.cs b/src/api/burn/WixToolset.Mba.Core/MbaCommand.cs deleted file mode 100644 index bd93b7e7..00000000 --- a/src/api/burn/WixToolset.Mba.Core/MbaCommand.cs +++ /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. - -namespace WixToolset.Mba.Core -{ - using System; - using System.Collections.Generic; - - /// - /// Default implementation of . - /// - internal sealed class MbaCommand : IMbaCommand - { - public Restart Restart { get; internal set; } - - public string[] UnknownCommandLineArgs { get; internal set; } - - public KeyValuePair[] Variables { get; internal set; } - - internal MbaCommand() { } - - public void SetOverridableVariables(IOverridableVariables overridableVariables, IEngine engine) - { - foreach (var kvp in this.Variables) - { - var key = kvp.Key; - - if (!overridableVariables.Variables.TryGetValue(key, out var overridableVariable)) - { - engine.Log(LogLevel.Error, String.Format("Ignoring attempt to set non-overridable variable: '{0}'.", key)); - } - else - { - engine.SetVariableString(overridableVariable.Name, kvp.Value, false); - } - } - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/MbaNative.cs b/src/api/burn/WixToolset.Mba.Core/MbaNative.cs deleted file mode 100644 index e8e9d576..00000000 --- a/src/api/burn/WixToolset.Mba.Core/MbaNative.cs +++ /dev/null @@ -1,18 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - internal static class MbaNative - { - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void BootstrapperApplicationDebuggerCheck(); - - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern void BootstrapperApplicationRun( - [MarshalAs(UnmanagedType.Interface)] IBootstrapperApplication pBA - ); - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/NativeMethods.cs b/src/api/burn/WixToolset.Mba.Core/NativeMethods.cs deleted file mode 100644 index 45a0bc4d..00000000 --- a/src/api/burn/WixToolset.Mba.Core/NativeMethods.cs +++ /dev/null @@ -1,49 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - /// - /// Contains native constants, functions, and structures for this assembly. - /// - internal static class NativeMethods - { - #region Error Constants - internal const int S_OK = 0; - internal const int E_MOREDATA = unchecked((int)0x800700ea); - internal const int E_INSUFFICIENT_BUFFER = unchecked((int)0x8007007a); - internal const int E_CANCELLED = unchecked((int)0x800704c7); - internal const int E_ALREADYINITIALIZED = unchecked((int)0x800704df); - internal const int E_NOTFOUND = unchecked((int)0x80070490); - internal const int E_NOTIMPL = unchecked((int)0x80004001); - internal const int E_UNEXPECTED = unchecked((int)0x8000ffff); - #endregion - - #region Functions - [DllImport("shell32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern IntPtr CommandLineToArgvW( - [MarshalAs(UnmanagedType.LPWStr)] string lpCmdLine, - out int pNumArgs - ); - - [DllImport("kernel32.dll", ExactSpelling = true, SetLastError = true)] - internal static extern IntPtr LocalFree( - IntPtr hMem - ); - #endregion - } - - #region SafeHandles - internal abstract class SafeHandleZeroIsDefaultAndInvalid : SafeHandle - { - public SafeHandleZeroIsDefaultAndInvalid() : base(IntPtr.Zero, true) { } - - public override bool IsInvalid - { - get { return this.handle == IntPtr.Zero; } - } - } - #endregion -} diff --git a/src/api/burn/WixToolset.Mba.Core/OverridableVariableInfo.cs b/src/api/burn/WixToolset.Mba.Core/OverridableVariableInfo.cs deleted file mode 100644 index b8e85c34..00000000 --- a/src/api/burn/WixToolset.Mba.Core/OverridableVariableInfo.cs +++ /dev/null @@ -1,15 +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 WixToolset.Mba.Core -{ - /// - /// Default implementation of . - /// - internal class OverridableVariableInfo : IOverridableVariableInfo - { - /// - public string Name { get; internal set; } - - internal OverridableVariableInfo() { } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs b/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs deleted file mode 100644 index 121c6aee..00000000 --- a/src/api/burn/WixToolset.Mba.Core/OverridableVariables.cs +++ /dev/null @@ -1,87 +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 WixToolset.Mba.Core -{ - using System; - using System.Collections.Generic; - using System.Xml; - using System.Xml.XPath; - - /// - /// Default implementation of . - /// - public class OverridableVariablesInfo : IOverridableVariables - { - /// - public VariableCommandLineType CommandLineType { get; internal set; } - - /// - public IDictionary Variables { get; internal set; } - - internal OverridableVariablesInfo() { } - - /// - /// Parses the overridable variable info from the BA manifest. - /// - /// XML root - /// The parsed information. - public static IOverridableVariables ParseFromXml(XPathNavigator root) - { - XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); - namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); - XPathNavigator commandLineNode = root.SelectSingleNode("/p:BootstrapperApplicationData/p:WixStdbaCommandLine", namespaceManager); - XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixStdbaOverridableVariable", namespaceManager); - - var overridableVariables = new OverridableVariablesInfo(); - IEqualityComparer variableNameComparer; - - if (commandLineNode == null) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; - variableNameComparer = StringComparer.InvariantCulture; - } - else - { - string variablesValue = BootstrapperApplicationData.GetAttribute(commandLineNode, "Variables"); - - if (variablesValue == null) - { - throw new Exception("Failed to get command line variable type."); - } - - if (variablesValue.Equals("caseInsensitive", StringComparison.InvariantCulture)) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseInsensitive; - variableNameComparer = StringComparer.InvariantCultureIgnoreCase; - } - else if (variablesValue.Equals("caseSensitive", StringComparison.InvariantCulture)) - { - overridableVariables.CommandLineType = VariableCommandLineType.CaseSensitive; - variableNameComparer = StringComparer.InvariantCulture; - } - else - { - throw new Exception(String.Format("Unknown command line variable type: '{0}'", variablesValue)); - } - } - - overridableVariables.Variables = new Dictionary(variableNameComparer); - - foreach (XPathNavigator node in nodes) - { - var variable = new OverridableVariableInfo(); - - string name = BootstrapperApplicationData.GetAttribute(node, "Name"); - if (name == null) - { - throw new Exception("Failed to get name for overridable variable."); - } - variable.Name = name; - - overridableVariables.Variables.Add(variable.Name, variable); - } - - return overridableVariables; - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs b/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs deleted file mode 100644 index b91c52c9..00000000 --- a/src/api/burn/WixToolset.Mba.Core/PackageInfo.cs +++ /dev/null @@ -1,391 +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 WixToolset.Mba.Core -{ - using System; - using System.Collections.Generic; - using System.Xml; - using System.Xml.XPath; - - /// - /// The type of package. - /// - public enum PackageType - { - /// - /// Invalid type. - /// - Unknown, - - /// - /// ExePackage - /// - Exe, - - /// - /// MsiPackage - /// - Msi, - - /// - /// MspPackage - /// - Msp, - - /// - /// MsuPackage - /// - Msu, - - /// - /// Related bundle of type Upgrade - /// - UpgradeBundle, - - /// - /// Related bundle of type Addon - /// - AddonBundle, - - /// - /// Related bundle of type Patch - /// - PatchBundle, - - /// - /// Related bundle of type Update - /// - UpdateBundle, - - /// - /// BundlePackage - /// - ChainBundle, - } - - /// - /// Metadata for BAs like WixInternalUIBootstrapperApplication that only support one main package. - /// - public enum PrimaryPackageType - { - /// - /// Not a primary package. - /// - None, - - /// - /// The default package if no architecture specific package is available for the current architecture. - /// - Default, - - /// - /// The package to use on x86 machines. - /// - X86, - - /// - /// The package to use on x64 machines. - /// - X64, - - /// - /// The package to use on ARM64 machines. - /// - ARM64, - } - - /// - /// Default implementation of . - /// - public class PackageInfo : IPackageInfo - { - /// - public string Id { get; internal set; } - - /// - public string DisplayName { get; internal set; } - - /// - public string Description { get; internal set; } - - /// - public PackageType Type { get; internal set; } - - /// - public bool Permanent { get; internal set; } - - /// - public bool Vital { get; internal set; } - - /// - public string DisplayInternalUICondition { get; internal set; } - - /// - public string ProductCode { get; internal set; } - - /// - public string UpgradeCode { get; internal set; } - - /// - public string Version { get; internal set; } - - /// - public string InstallCondition { get; internal set; } - - /// - public string RepairCondition { get; internal set; } - - /// - public BOOTSTRAPPER_CACHE_TYPE CacheType { get; internal set; } - - /// - public bool PrereqPackage { get; internal set; } - - /// - public string PrereqLicenseFile { get; internal set; } - - /// - public string PrereqLicenseUrl { get; internal set; } - - /// - public PrimaryPackageType PrimaryPackageType { get; internal set; } - - /// - public object CustomData { get; set; } - - internal PackageInfo() { } - - /// - /// Parse packages from BootstrapperApplicationData.xml. - /// - /// The root node. - /// A dictionary of the packages by Id. - public static IDictionary ParsePackagesFromXml(XPathNavigator root) - { - var packagesById = new Dictionary(); - XmlNamespaceManager namespaceManager = new XmlNamespaceManager(root.NameTable); - namespaceManager.AddNamespace("p", BootstrapperApplicationData.XMLNamespace); - XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixPackageProperties", namespaceManager); - - foreach (XPathNavigator node in nodes) - { - var package = new PackageInfo(); - - string id = BootstrapperApplicationData.GetAttribute(node, "Package"); - if (id == null) - { - throw new Exception("Failed to get package identifier for package."); - } - package.Id = id; - - package.DisplayName = BootstrapperApplicationData.GetAttribute(node, "DisplayName"); - - package.Description = BootstrapperApplicationData.GetAttribute(node, "Description"); - - PackageType? packageType = GetPackageTypeAttribute(node, "PackageType"); - if (!packageType.HasValue) - { - throw new Exception("Failed to get package type for package."); - } - package.Type = packageType.Value; - - bool? permanent = BootstrapperApplicationData.GetYesNoAttribute(node, "Permanent"); - if (!permanent.HasValue) - { - throw new Exception("Failed to get permanent settings for package."); - } - package.Permanent = permanent.Value; - - bool? vital = BootstrapperApplicationData.GetYesNoAttribute(node, "Vital"); - if (!vital.HasValue) - { - throw new Exception("Failed to get vital setting for package."); - } - package.Vital = vital.Value; - - package.ProductCode = BootstrapperApplicationData.GetAttribute(node, "ProductCode"); - - package.UpgradeCode = BootstrapperApplicationData.GetAttribute(node, "UpgradeCode"); - - package.Version = BootstrapperApplicationData.GetAttribute(node, "Version"); - - package.InstallCondition = BootstrapperApplicationData.GetAttribute(node, "InstallCondition"); - - package.RepairCondition = BootstrapperApplicationData.GetAttribute(node, "RepairCondition"); - - BOOTSTRAPPER_CACHE_TYPE? cacheType = GetCacheTypeAttribute(node, "Cache"); - if (!cacheType.HasValue) - { - throw new Exception("Failed to get cache type for package."); - } - package.CacheType = cacheType.Value; - - packagesById.Add(package.Id, package); - } - - ParseBalPackageInfoFromXml(root, namespaceManager, packagesById); - return packagesById; - } - - /// - /// Parse the cache type attribute. - /// - /// Package node - /// Attribute name - /// The cache type - public static BOOTSTRAPPER_CACHE_TYPE? GetCacheTypeAttribute(XPathNavigator node, string attributeName) - { - string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName); - - if (attributeValue == null) - { - return null; - } - - if (attributeValue.Equals("keep", StringComparison.InvariantCulture)) - { - return BOOTSTRAPPER_CACHE_TYPE.Keep; - } - else if (attributeValue.Equals("force", StringComparison.InvariantCulture)) - { - return BOOTSTRAPPER_CACHE_TYPE.Force; - } - else - { - return BOOTSTRAPPER_CACHE_TYPE.Remove; - } - } - - /// - /// Parse the package type attribute - /// - /// Package node - /// Attribute name - /// The package type - public static PackageType? GetPackageTypeAttribute(XPathNavigator node, string attributeName) - { - string attributeValue = BootstrapperApplicationData.GetAttribute(node, attributeName); - - if (attributeValue == null) - { - return null; - } - - if (attributeValue.Equals("Bundle", StringComparison.InvariantCulture)) - { - return PackageType.ChainBundle; - } - else if (attributeValue.Equals("Exe", StringComparison.InvariantCulture)) - { - return PackageType.Exe; - } - else if (attributeValue.Equals("Msi", StringComparison.InvariantCulture)) - { - return PackageType.Msi; - } - else if (attributeValue.Equals("Msp", StringComparison.InvariantCulture)) - { - return PackageType.Msp; - } - else if (attributeValue.Equals("Msu", StringComparison.InvariantCulture)) - { - return PackageType.Msu; - } - else - { - return PackageType.Unknown; - } - } - - /// - /// Create from a related bundle. - /// - /// Package id - /// Relation type - /// Whether the related bundle is per-machine - /// The related bundle's version - /// The package info - public static IPackageInfo GetRelatedBundleAsPackage(string id, RelationType relationType, bool perMachine, string version) - { - PackageInfo package = new PackageInfo(); - package.Id = id; - package.Version = version; - - switch (relationType) - { - case RelationType.Addon: - package.Type = PackageType.AddonBundle; - break; - case RelationType.Patch: - package.Type = PackageType.PatchBundle; - break; - case RelationType.Upgrade: - package.Type = PackageType.UpgradeBundle; - break; - default: - throw new Exception(String.Format("Unknown related bundle type: {0}", relationType)); - } - - return package; - } - - /// - /// Create from an update bundle. - /// - /// Package id - /// The package info - public static IPackageInfo GetUpdateBundleAsPackage(string id) - { - PackageInfo package = new PackageInfo(); - package.Id = id; - package.Type = PackageType.UpdateBundle; - - return package; - } - - internal static void ParseBalPackageInfoFromXml(XPathNavigator root, XmlNamespaceManager namespaceManager, Dictionary packagesById) - { - XPathNodeIterator nodes = root.Select("/p:BootstrapperApplicationData/p:WixBalPackageInfo", namespaceManager); - - foreach (XPathNavigator node in nodes) - { - string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); - if (id == null) - { - throw new Exception("Failed to get package identifier for WixBalPackageInfo."); - } - - if (!packagesById.TryGetValue(id, out var ipackage)) - { - throw new Exception(String.Format("Failed to find package specified in WixBalPackageInfo: {0}", id)); - } - - var package = (PackageInfo)ipackage; - - package.DisplayInternalUICondition = BootstrapperApplicationData.GetAttribute(node, "DisplayInternalUICondition"); - } - - nodes = root.Select("/p:BootstrapperApplicationData/p:WixPrereqInformation", namespaceManager); - - foreach (XPathNavigator node in nodes) - { - string id = BootstrapperApplicationData.GetAttribute(node, "PackageId"); - if (id == null) - { - throw new Exception("Failed to get package identifier for WixPrereqInformation."); - } - - if (!packagesById.TryGetValue(id, out var ipackage)) - { - throw new Exception(String.Format("Failed to find package specified in WixPrereqInformation: {0}", id)); - } - - var package = (PackageInfo)ipackage; - - package.PrereqPackage = true; - package.PrereqLicenseFile = BootstrapperApplicationData.GetAttribute(node, "LicenseFile"); - package.PrereqLicenseUrl = BootstrapperApplicationData.GetAttribute(node, "LicenseUrl"); - } - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/StrUtil.cs b/src/api/burn/WixToolset.Mba.Core/StrUtil.cs deleted file mode 100644 index 5daef8e3..00000000 --- a/src/api/burn/WixToolset.Mba.Core/StrUtil.cs +++ /dev/null @@ -1,54 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - using System.Security; - using System.Text; - - internal static class StrUtil - { - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern void StrFree( - IntPtr scz - ); - - internal sealed class StrHandle : SafeHandleZeroIsDefaultAndInvalid - { - protected override bool ReleaseHandle() - { - StrFree(this.handle); - return true; - } - - public string ToUniString() - { - return Marshal.PtrToStringUni(this.handle); - } - - public SecureString ToSecureString() - { - if (this.handle == IntPtr.Zero) - { - return null; - } - - SecureString value = new SecureString(); - char c; - for (int charIndex = 0; ; charIndex++) - { - c = (char)Marshal.ReadInt16(this.handle, charIndex * UnicodeEncoding.CharSize); - if (c == '\0') - { - break; - } - - value.AppendChar(c); - } - - return value; - } - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtil.cs b/src/api/burn/WixToolset.Mba.Core/VerUtil.cs deleted file mode 100644 index 3573f9d3..00000000 --- a/src/api/burn/WixToolset.Mba.Core/VerUtil.cs +++ /dev/null @@ -1,146 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - using System.Text; - - /// - /// Managed wrapper for verutil. - /// - public static class VerUtil - { - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern int VerCompareParsedVersions( - VersionHandle pVersion1, - VersionHandle pVersion2 - ); - - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern int VerCompareStringVersions( - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion1, - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion2, - [MarshalAs(UnmanagedType.Bool)] bool fStrict - ); - - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern VersionHandle VerCopyVersion( - VersionHandle pSource - ); - - [DllImport("mbanative.dll", ExactSpelling = true)] - internal static extern void VerFreeVersion( - IntPtr pVersion - ); - - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern VersionHandle VerParseVersion( - [MarshalAs(UnmanagedType.LPWStr)] string wzVersion, - [MarshalAs(UnmanagedType.U4)] uint cchValue, - [MarshalAs(UnmanagedType.Bool)] bool fStrict - ); - - [DllImport("mbanative.dll", ExactSpelling = true, PreserveSig = false)] - internal static extern VersionHandle VerVersionFromQword( - [MarshalAs(UnmanagedType.I8)] long qwVersion - ); - - [StructLayout(LayoutKind.Sequential)] - internal struct VersionReleaseLabelStruct - { - public bool fNumeric; - public uint dwValue; - public IntPtr cchLabelOffset; - public int cchLabel; - } - - [StructLayout(LayoutKind.Sequential)] - internal struct VersionStruct - { - public IntPtr sczVersion; - public char chPrefix; - public uint dwMajor; - public uint dwMinor; - public uint dwPatch; - public uint dwRevision; - public int cReleaseLabels; - public IntPtr rgReleaseLabels; - public IntPtr cchMetadataOffset; - public bool fInvalid; - public bool fHasMajor; - public bool fHasMinor; - public bool fHasPatch; - public bool fHasRevision; - } - - internal static string VersionStringFromOffset(IntPtr wzVersion, IntPtr cchOffset, int? cchLength = null) - { - var offset = cchOffset.ToInt64() * UnicodeEncoding.CharSize; - var wz = new IntPtr(wzVersion.ToInt64() + offset); - if (cchLength.HasValue) - { - return Marshal.PtrToStringUni(wz, (int)cchLength); - } - else - { - return Marshal.PtrToStringUni(wz); - } - } - - internal sealed class VersionHandle : SafeHandleZeroIsDefaultAndInvalid - { - protected override bool ReleaseHandle() - { - VerFreeVersion(this.handle); - return true; - } - } - - /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 - public static int CompareParsedVersions(VerUtilVersion version1, VerUtilVersion version2) - { - return VerCompareParsedVersions(version1.GetHandle(), version2.GetHandle()); - } - - /// 0 if equal, 1 if version1 > version2, -1 if version1 < version2 - public static int CompareStringVersions(string version1, string version2, bool strict) - { - return VerCompareStringVersions(version1, version2, strict); - } - - /// - /// Clone the version. - /// - /// Source version - /// Cloned version - public static VerUtilVersion CopyVersion(VerUtilVersion version) - { - var handle = VerCopyVersion(version.GetHandle()); - return new VerUtilVersion(handle); - } - - /// - /// Parse a version. - /// - /// Source version - /// Whether to throw exception on invalid version. - /// Parsed version - public static VerUtilVersion ParseVersion(string version, bool strict) - { - var handle = VerParseVersion(version, 0, strict); - return new VerUtilVersion(handle); - } - - /// - /// Parse version from qword. - /// - /// Source version - /// Parsed version - public static VerUtilVersion VersionFromQword(long version) - { - var handle = VerVersionFromQword(version); - return new VerUtilVersion(handle); - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs b/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs deleted file mode 100644 index e0312474..00000000 --- a/src/api/burn/WixToolset.Mba.Core/VerUtilVersion.cs +++ /dev/null @@ -1,129 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - /// - /// An enhanced implementation of SemVer 2.0. - /// - public sealed class VerUtilVersion : IDisposable - { - internal VerUtilVersion(VerUtil.VersionHandle handle) - { - this.Handle = handle; - - var pVersion = handle.DangerousGetHandle(); - var version = (VerUtil.VersionStruct)Marshal.PtrToStructure(pVersion, typeof(VerUtil.VersionStruct)); - this.Version = Marshal.PtrToStringUni(version.sczVersion); - this.Prefix = version.chPrefix; - this.Major = version.dwMajor; - this.Minor = version.dwMinor; - this.Patch = version.dwPatch; - this.Revision = version.dwRevision; - this.ReleaseLabels = new VerUtilVersionReleaseLabel[version.cReleaseLabels]; - this.Metadata = VerUtil.VersionStringFromOffset(version.sczVersion, version.cchMetadataOffset); - this.IsInvalid = version.fInvalid; - this.HasMajor = version.fHasMajor; - this.HasMinor = version.fHasMinor; - this.HasPatch = version.fHasPatch; - this.HasRevision = version.fHasRevision; - - for (var i = 0; i < version.cReleaseLabels; ++i) - { - var offset = i * Marshal.SizeOf(typeof(VerUtil.VersionReleaseLabelStruct)); - var pReleaseLabel = new IntPtr(version.rgReleaseLabels.ToInt64() + offset); - this.ReleaseLabels[i] = new VerUtilVersionReleaseLabel(pReleaseLabel, version.sczVersion); - } - } - - /// - /// String version, which would have stripped the leading 'v'. - /// - public string Version { get; private set; } - - /// - /// Prefix character that was stripped from Version, or the null character if there was no prefix. - /// - public char Prefix { get; private set; } - - /// - /// For version A.B.C.D, Major is A. It is 0 if not specified. - /// - public uint Major { get; private set; } - - /// - /// For version A.B.C.D, Minor is B. It is 0 if not specified. - /// - public uint Minor { get; private set; } - - /// - /// For version A.B.C.D, Patch is C. It is 0 if not specified. - /// - public uint Patch { get; private set; } - - /// - /// For version A.B.C.D, Revision is D. It is 0 if not specified. - /// - public uint Revision { get; private set; } - - /// - /// For version X.Y.Z-releaselabels+metadata, ReleaseLabels is the parsed information for releaselabels. - /// - public VerUtilVersionReleaseLabel[] ReleaseLabels { get; private set; } - - /// - /// For version X.Y.Z-releaselabels+metadata, Metadata is the rest of the string after +. - /// For invalid versions, it is all of the string after the point where it was an invalid string. - /// - public string Metadata { get; private set; } - - /// - /// Whether the version conformed to the spec. - /// - public bool IsInvalid { get; private set; } - - /// - /// Whether the Major part was specified. - /// - public bool HasMajor { get; private set; } - - /// - /// Whether the Minor part was specified. - /// - public bool HasMinor { get; private set; } - - /// - /// Whether the Patch part was specified. - /// - public bool HasPatch { get; private set; } - - /// - /// Whether the Revision part was specified. - /// - public bool HasRevision { get; private set; } - - /// - public void Dispose() - { - if (this.Handle != null) - { - this.Handle.Dispose(); - this.Handle = null; - } - } - - private VerUtil.VersionHandle Handle { get; set; } - - internal VerUtil.VersionHandle GetHandle() - { - if (this.Handle == null) - { - throw new ObjectDisposedException(this.Version); - } - - return this.Handle; - } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs b/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs deleted file mode 100644 index 97e8190d..00000000 --- a/src/api/burn/WixToolset.Mba.Core/VerUtilVersionReleaseLabel.cs +++ /dev/null @@ -1,36 +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 WixToolset.Mba.Core -{ - using System; - using System.Runtime.InteropServices; - - /// - /// A release label from a . - /// - public sealed class VerUtilVersionReleaseLabel - { - internal VerUtilVersionReleaseLabel(IntPtr pReleaseLabel, IntPtr wzVersion) - { - var releaseLabel = (VerUtil.VersionReleaseLabelStruct)Marshal.PtrToStructure(pReleaseLabel, typeof(VerUtil.VersionReleaseLabelStruct)); - this.IsNumeric = releaseLabel.fNumeric; - this.Value = releaseLabel.dwValue; - this.Label = VerUtil.VersionStringFromOffset(wzVersion, releaseLabel.cchLabelOffset, releaseLabel.cchLabel); - } - - /// - /// Whether the label was parsed as a number. - /// - public bool IsNumeric { get; private set; } - - /// - /// If then the value that was parsed. - /// - public uint Value { get; private set; } - - /// - /// The string version of the label. - /// - public string Label { get; private set; } - } -} diff --git a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj b/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj deleted file mode 100644 index 9d2e4077..00000000 --- a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.csproj +++ /dev/null @@ -1,27 +0,0 @@ - - - - - - netstandard2.0;net462 - WixToolset.Mba.Core - WixToolset.Mba.Core - embedded - Managed Bootstrapper Application Core - $(MSBuildThisFileName).nuspec - true - - - - - - - - - - - - - - - diff --git a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec b/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec deleted file mode 100644 index 0a9bcb5d..00000000 --- a/src/api/burn/WixToolset.Mba.Core/WixToolset.Mba.Core.nuspec +++ /dev/null @@ -1,32 +0,0 @@ - - - - $id$ - $version$ - $title$ - $description$ - $authors$ - wix.png - MS-RL - false - $copyright$ - $projectUrl$ - - - - - - - - - - - - - - - - - - - diff --git a/src/api/burn/api_burn.sln b/src/api/burn/api_burn.sln index 858272fb..a8854b35 100644 --- a/src/api/burn/api_burn.sln +++ b/src/api/burn/api_burn.sln @@ -7,11 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "balutil", "balutil\balutil. EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bextutil", "bextutil\bextutil.vcxproj", "{06027492-1CB9-48BC-B31E-C1F9356ED07E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Mba.Core", "WixToolset.Mba.Core\WixToolset.Mba.Core.csproj", "{E7E1841E-A58E-4901-B9CA-4845B807D45F}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BootstrapperApplicationApi", "WixToolset.BootstrapperApplicationApi\WixToolset.BootstrapperApplicationApi.csproj", "{E7E1841E-A58E-4901-B9CA-4845B807D45F}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "mbanative", "mbanative\mbanative.vcxproj", "{665E0441-17F9-4105-B202-EDF274657F6E}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Mba.Core", "test\WixToolsetTest.Mba.Core\WixToolsetTest.Mba.Core.csproj", "{F54997F7-10D7-409B-B9F2-DB546490EDC0}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BootstrapperApplicationApi", "test\WixToolsetTest.BootstrapperApplicationApi\WixToolsetTest.BootstrapperApplicationApi.csproj", "{F54997F7-10D7-409B-B9F2-DB546490EDC0}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "BalUtilUnitTest", "test\BalUtilUnitTest\BalUtilUnitTest.vcxproj", "{9B507AF9-035E-4DB6-8C0C-5DCC3FEF2631}" EndProject diff --git a/src/api/burn/api_burn_t.proj b/src/api/burn/api_burn_t.proj index f6918682..aa1bc628 100644 --- a/src/api/burn/api_burn_t.proj +++ b/src/api/burn/api_burn_t.proj @@ -10,10 +10,10 @@ - + - - + + @@ -28,9 +28,7 @@ - - - + diff --git a/src/api/burn/balutil/balutil.nuspec b/src/api/burn/balutil/balutil.nuspec deleted file mode 100644 index be51ec79..00000000 --- a/src/api/burn/balutil/balutil.nuspec +++ /dev/null @@ -1,29 +0,0 @@ - - - - $id$ - $version$ - $title$ - $description$ - $authors$ - wix.png - MS-RL - false - $copyright$ - $projectUrl$ - - - - - - - - - - - - - - - - diff --git a/src/api/burn/balutil/balutil.vcxproj b/src/api/burn/balutil/balutil.vcxproj index 8f93d636..280f21b8 100644 --- a/src/api/burn/balutil/balutil.vcxproj +++ b/src/api/burn/balutil/balutil.vcxproj @@ -35,7 +35,6 @@ balutil MultiByte WiX Toolset Bootstrapper Application Layer native utility library - WixToolset.BalUtil @@ -49,7 +48,7 @@ - inc;..\WixToolset.BootstrapperCore.Native\inc + inc;..\inc diff --git a/src/api/burn/balutil/build/WixToolset.BalUtil.props b/src/api/burn/balutil/build/WixToolset.BalUtil.props deleted file mode 100644 index b276574d..00000000 --- a/src/api/burn/balutil/build/WixToolset.BalUtil.props +++ /dev/null @@ -1,18 +0,0 @@ - - - - - - - $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) - - - $(MSBuildThisFileDirectory)native\include\;%(AdditionalIncludeDirectories) - - - - - $(MSBuildThisFileDirectory)native\v14\$(PlatformTarget)\balutil.lib;%(AdditionalDependencies) - - - diff --git a/src/api/burn/bextutil/bextutil.nuspec b/src/api/burn/bextutil/bextutil.nuspec index 125e8807..b2881354 100644 --- a/src/api/burn/bextutil/bextutil.nuspec +++ b/src/api/burn/bextutil/bextutil.nuspec @@ -13,7 +13,6 @@ $projectUrl$ - @@ -22,6 +21,8 @@ + + diff --git a/src/api/burn/bextutil/bextutil.vcxproj b/src/api/burn/bextutil/bextutil.vcxproj index 69222b4c..467f2d56 100644 --- a/src/api/burn/bextutil/bextutil.vcxproj +++ b/src/api/burn/bextutil/bextutil.vcxproj @@ -49,7 +49,7 @@ - inc;..\WixToolset.BootstrapperCore.Native\inc + inc;..\inc diff --git a/src/api/burn/bextutil/inc/BextBaseBundleExtension.h b/src/api/burn/bextutil/inc/BextBaseBundleExtension.h index a302702e..5bda04e1 100644 --- a/src/api/burn/bextutil/inc/BextBaseBundleExtension.h +++ b/src/api/burn/bextutil/inc/BextBaseBundleExtension.h @@ -2,11 +2,6 @@ #include -#include "BundleExtensionEngine.h" -#include "BundleExtension.h" -#include "IBundleExtensionEngine.h" -#include "IBundleExtension.h" - #include "bextutil.h" class CBextBaseBundleExtension : public IBundleExtension diff --git a/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h b/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h index f71e3b92..cd7e3cb3 100644 --- a/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h +++ b/src/api/burn/bextutil/inc/BextBaseBundleExtensionProc.h @@ -4,10 +4,8 @@ #include -#include "BundleExtensionEngine.h" -#include "BundleExtension.h" -#include "IBundleExtensionEngine.h" -#include "IBundleExtension.h" +#include +#include static HRESULT BextBaseBEProcSearch( __in IBundleExtension* pBE, @@ -33,7 +31,7 @@ static HRESULT WINAPI BextBaseBundleExtensionProc( { IBundleExtension* pBE = reinterpret_cast(pvContext); HRESULT hr = pBE->BundleExtensionProc(message, pvArgs, pvResults, pvContext); - + if (E_NOTIMPL == hr) { switch (message) diff --git a/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h b/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h index 9fdcb700..97b02f36 100644 --- a/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h +++ b/src/api/burn/bextutil/inc/BextBundleExtensionEngine.h @@ -1,5 +1,8 @@ +#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 + #ifdef __cplusplus extern "C" { #endif diff --git a/src/api/burn/bextutil/inc/IBundleExtension.h b/src/api/burn/bextutil/inc/IBundleExtension.h index 7516c11b..00301672 100644 --- a/src/api/burn/bextutil/inc/IBundleExtension.h +++ b/src/api/burn/bextutil/inc/IBundleExtension.h @@ -1,6 +1,7 @@ #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 DECLARE_INTERFACE_IID_(IBundleExtension, IUnknown, "93123C9D-796B-4FCD-A507-6EDEF9A925FD") { diff --git a/src/api/burn/bextutil/inc/IBundleExtensionEngine.h b/src/api/burn/bextutil/inc/IBundleExtensionEngine.h index 0053a71e..a4a27fb1 100644 --- a/src/api/burn/bextutil/inc/IBundleExtensionEngine.h +++ b/src/api/burn/bextutil/inc/IBundleExtensionEngine.h @@ -1,6 +1,7 @@ #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 DECLARE_INTERFACE_IID_(IBundleExtensionEngine, IUnknown, "9D027A39-F6B6-42CC-9737-C185089EB263") { diff --git a/src/api/burn/bextutil/inc/bextutil.h b/src/api/burn/bextutil/inc/bextutil.h index 356ccc47..b8536444 100644 --- a/src/api/burn/bextutil/inc/bextutil.h +++ b/src/api/burn/bextutil/inc/bextutil.h @@ -4,6 +4,8 @@ #include "dutil.h" +#include "IBundleExtensionEngine.h" +#include "IBundleExtension.h" #ifdef __cplusplus extern "C" { diff --git a/src/api/burn/bextutil/precomp.h b/src/api/burn/bextutil/precomp.h index 5d1dd20b..d5714cc2 100644 --- a/src/api/burn/bextutil/precomp.h +++ b/src/api/burn/bextutil/precomp.h @@ -12,11 +12,5 @@ #include #include -#include -#include - -#include "IBundleExtensionEngine.h" -#include "IBundleExtension.h" - #include "bextutil.h" #include "BextBundleExtensionEngine.h" diff --git a/src/api/burn/inc/BootstrapperApplication.h b/src/api/burn/inc/BootstrapperApplication.h new file mode 100644 index 00000000..79b1df80 --- /dev/null +++ b/src/api/burn/inc/BootstrapperApplication.h @@ -0,0 +1,1606 @@ +#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 "BootstrapperEngine.h" + +#if defined(__cplusplus) +extern "C" { +#endif + +const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_API_VERSION = L"burn.ba.apiver"; +const LPCWSTR BOOTSTRAPPER_APPLICATION_COMMANDLINE_SWITCH_PIPE_NAME = L"burn.ba.pipe"; +const DWORD WIX_5_BOOTSTRAPPER_APPLICATION_API_VERSION = 5; + +enum BOOTSTRAPPER_DISPLAY +{ + BOOTSTRAPPER_DISPLAY_UNKNOWN, + BOOTSTRAPPER_DISPLAY_EMBEDDED, + BOOTSTRAPPER_DISPLAY_NONE, + BOOTSTRAPPER_DISPLAY_PASSIVE, + BOOTSTRAPPER_DISPLAY_FULL, +}; + +enum BOOTSTRAPPER_REGISTRATION_TYPE +{ + BOOTSTRAPPER_REGISTRATION_TYPE_NONE, // The engine will ignore NONE if it recommended INPROGRESS or FULL. + BOOTSTRAPPER_REGISTRATION_TYPE_INPROGRESS, + BOOTSTRAPPER_REGISTRATION_TYPE_FULL, +}; + +enum BOOTSTRAPPER_RESUME_TYPE +{ + BOOTSTRAPPER_RESUME_TYPE_NONE, + BOOTSTRAPPER_RESUME_TYPE_INVALID, // resume information is present but invalid + BOOTSTRAPPER_RESUME_TYPE_INTERRUPTED, // relaunched after an unexpected interruption + BOOTSTRAPPER_RESUME_TYPE_REBOOT, // relaunched after reboot + BOOTSTRAPPER_RESUME_TYPE_SUSPEND, // relaunched after suspend + BOOTSTRAPPER_RESUME_TYPE_ARP, // launched from ARP +}; + +enum BOOTSTRAPPER_ERROR_TYPE +{ + BOOTSTRAPPER_ERROR_TYPE_ELEVATE, // error occurred trying to elevate. + BOOTSTRAPPER_ERROR_TYPE_WINDOWS_INSTALLER, // error came from windows installer. + BOOTSTRAPPER_ERROR_TYPE_EXE_PACKAGE, // error came from an exe package. + BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_SERVER, // error occurred trying to authenticate with HTTP server. + BOOTSTRAPPER_ERROR_TYPE_HTTP_AUTH_PROXY, // error occurred trying to authenticate with HTTP proxy. + BOOTSTRAPPER_ERROR_TYPE_APPLY, // error occurred during apply. +}; + +enum BOOTSTRAPPER_FILES_IN_USE_TYPE +{ + BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI, // INSTALLMESSAGE_FILESINUSE + BOOTSTRAPPER_FILES_IN_USE_TYPE_MSI_RM, // INSTALLMESSAGE_RMFILESINUSE + BOOTSTRAPPER_FILES_IN_USE_TYPE_NETFX, // MMIO_CLOSE_APPS +}; + +enum BOOTSTRAPPER_RELATED_OPERATION +{ + BOOTSTRAPPER_RELATED_OPERATION_NONE, + BOOTSTRAPPER_RELATED_OPERATION_DOWNGRADE, + BOOTSTRAPPER_RELATED_OPERATION_MINOR_UPDATE, + BOOTSTRAPPER_RELATED_OPERATION_MAJOR_UPGRADE, + BOOTSTRAPPER_RELATED_OPERATION_REMOVE, + BOOTSTRAPPER_RELATED_OPERATION_INSTALL, + BOOTSTRAPPER_RELATED_OPERATION_REPAIR, +}; + +enum BOOTSTRAPPER_CACHE_OPERATION +{ + // There is no source available. + BOOTSTRAPPER_CACHE_OPERATION_NONE, + // Copy the payload or container from the chosen local source. + BOOTSTRAPPER_CACHE_OPERATION_COPY, + // Download the payload or container using the download URL. + BOOTSTRAPPER_CACHE_OPERATION_DOWNLOAD, + // Extract the payload from the container. + BOOTSTRAPPER_CACHE_OPERATION_EXTRACT, +}; + +enum BOOTSTRAPPER_CACHE_RESOLVE_OPERATION +{ + // There is no source available. + BOOTSTRAPPER_CACHE_RESOLVE_NONE, + // Copy the payload or container from the chosen local source. + BOOTSTRAPPER_CACHE_RESOLVE_LOCAL, + // Download the payload or container from the download URL. + BOOTSTRAPPER_CACHE_RESOLVE_DOWNLOAD, + // Extract the payload from the container. + BOOTSTRAPPER_CACHE_RESOLVE_CONTAINER, + // Look again for the payload or container locally. + BOOTSTRAPPER_CACHE_RESOLVE_RETRY, +}; + +enum BOOTSTRAPPER_CACHE_VERIFY_STEP +{ + BOOTSTRAPPER_CACHE_VERIFY_STEP_STAGE, + BOOTSTRAPPER_CACHE_VERIFY_STEP_HASH, + BOOTSTRAPPER_CACHE_VERIFY_STEP_FINALIZE, +}; + +enum BOOTSTRAPPER_APPLY_RESTART +{ + BOOTSTRAPPER_APPLY_RESTART_NONE, + BOOTSTRAPPER_APPLY_RESTART_REQUIRED, + BOOTSTRAPPER_APPLY_RESTART_INITIATED, +}; + +enum BOOTSTRAPPER_RELATION_TYPE +{ + BOOTSTRAPPER_RELATION_NONE, + BOOTSTRAPPER_RELATION_DETECT, + BOOTSTRAPPER_RELATION_UPGRADE, + BOOTSTRAPPER_RELATION_ADDON, + BOOTSTRAPPER_RELATION_PATCH, + BOOTSTRAPPER_RELATION_DEPENDENT_ADDON, + BOOTSTRAPPER_RELATION_DEPENDENT_PATCH, + BOOTSTRAPPER_RELATION_UPDATE, + BOOTSTRAPPER_RELATION_CHAIN_PACKAGE, +}; + +enum BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE +{ + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_NONE, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DOWNGRADE, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_UPGRADE, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_ADDON, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_PATCH, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_ADDON, + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE_DEPENDENT_PATCH, +}; + +enum BOOTSTRAPPER_CACHE_TYPE +{ + BOOTSTRAPPER_CACHE_TYPE_REMOVE, + BOOTSTRAPPER_CACHE_TYPE_KEEP, + BOOTSTRAPPER_CACHE_TYPE_FORCE, +}; + +enum BOOTSTRAPPER_PACKAGE_CONDITION_RESULT +{ + BOOTSTRAPPER_PACKAGE_CONDITION_DEFAULT, + BOOTSTRAPPER_PACKAGE_CONDITION_FALSE, + BOOTSTRAPPER_PACKAGE_CONDITION_TRUE, +}; + +enum BOOTSTRAPPER_MSI_FILE_VERSIONING +{ + BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER, //o + BOOTSTRAPPER_MSI_FILE_VERSIONING_MISSING_OR_OLDER_OR_EQUAL, //e + BOOTSTRAPPER_MSI_FILE_VERSIONING_ALL, //a +}; + +enum BOOTSTRAPPER_APPLICATION_MESSAGE +{ + BOOTSTRAPPER_APPLICATION_MESSAGE_UNKNOWN = 65536, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCREATE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDESTROY, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSTARTUP, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSHUTDOWN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTFORWARDCOMPATIBLEBUNDLE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTMSIFEATURE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPACKAGECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTPATCHTARGET, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDMSIPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTUPDATECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIFEATURE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPACKAGECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANPATCHTARGET, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONELEVATECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONERROR, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONREGISTERCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIREPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRERESOLVING, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEACQUIRECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPATCHTARGET, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEMSIMESSAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEFILESINUSE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPACKAGECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONUNREGISTERCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONLAUNCHAPPROVEDEXECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANMSIPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONBEGINMSITRANSACTIONCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCOMMITMSITRANSACTIONCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONROLLBACKMSITRANSACTIONCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPAUSEAUTOMATICUPDATESCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONSYSTEMRESTOREPOINTCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANFORWARDCOMPATIBLEBUNDLE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEVERIFYPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTCOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPAYLOADEXTRACTPROGRESS, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANROLLBACKBOUNDARY, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTCOMPATIBLEMSIPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGEBEGIN, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANNEDCOMPATIBLEPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRESTORERELATEDBUNDLE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONPLANRELATEDBUNDLETYPE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONAPPLYDOWNGRADE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONEXECUTEPROCESSCANCEL, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONDETECTRELATEDBUNDLEPACKAGE, + BOOTSTRAPPER_APPLICATION_MESSAGE_ONCACHEPACKAGENONVITALVALIDATIONFAILURE, +}; + +enum BOOTSTRAPPER_APPLYCOMPLETE_ACTION +{ + BOOTSTRAPPER_APPLYCOMPLETE_ACTION_NONE, + // Instructs the engine to restart. + // The engine will not launch again after the machine is rebooted. + // Ignored if reboot was already initiated by OnExecutePackageComplete(). + BOOTSTRAPPER_APPLYCOMPLETE_ACTION_RESTART, +}; + +enum BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION +{ + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_NONE, + // Instructs the engine to try the acquisition of the payload again. + // Ignored if hrStatus is a success. + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION_RETRY, +}; + +enum BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION +{ + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_NONE, + // Instructs the engine to ignore non-vital package failures and + // continue with the caching. + // Ignored if hrStatus is a success or the package is vital. + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_IGNORE, + // Instructs the engine to try the acquisition and verification of the package again. + // Ignored if hrStatus is a success. + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION_RETRY, +}; + +enum BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION +{ + BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_NONE, + // Instructs the engine to try to acquire the package so execution can use it. + // Most of the time this is used for installing the package during rollback. + BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION_ACQUIRE, +}; + +enum BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION +{ + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_NONE, + // Ignored if hrStatus is a success. + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYVERIFICATION, + // Ignored if hrStatus is a success. + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION_RETRYACQUISITION, +}; + +enum BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION +{ + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_NONE, + // Instructs the engine to ignore non-vital package failures and + // continue with the install. + // Ignored if hrStatus is a success or the package is vital. + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_IGNORE, + // Instructs the engine to try the execution of the package again. + // Ignored if hrStatus is a success. + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RETRY, + // Instructs the engine to stop processing the chain and restart. + // The engine will launch again after the machine is restarted. + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_RESTART, + // Instructs the engine to stop processing the chain and + // suspend the current state. + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION_SUSPEND, +}; + +enum BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION +{ + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION_NONE, + // Instructs the engine to stop processing the chain and restart. + // The engine will launch again after the machine is restarted. + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION_RESTART, +}; + +enum BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION +{ + // Instructs the engine to stop waiting for the process to exit. + // The package is immediately considered to have failed with ERROR_INSTALL_USEREXIT. + // The engine will never rollback the package. + BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION_ABANDON, + // Instructs the engine to wait for the process to exit. + // Once the process has exited, the package is considered to have failed with ERROR_INSTALL_USEREXIT. + // This allows the engine to rollback the package if necessary. + BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION_WAIT, +}; + +enum BOOTSTRAPPER_SHUTDOWN_ACTION +{ + BOOTSTRAPPER_SHUTDOWN_ACTION_NONE, + // Instructs the engine to restart. + // The engine will not launch again after the machine is rebooted. + // Ignored if reboot was already initiated by OnExecutePackageComplete(). + BOOTSTRAPPER_SHUTDOWN_ACTION_RESTART, + // Instructs the engine to unload the bootstrapper application and + // restart the engine which will load the bootstrapper application again. + // Typically used to switch from a native bootstrapper application to a managed one. + BOOTSTRAPPER_SHUTDOWN_ACTION_RELOAD_BOOTSTRAPPER, + // Opts out of the engine behavior of trying to uninstall itself + // when no non-permanent packages are installed. + BOOTSTRAPPER_SHUTDOWN_ACTION_SKIP_CLEANUP, +}; + +enum BURN_MSI_PROPERTY +{ + BURN_MSI_PROPERTY_NONE, // no property added + BURN_MSI_PROPERTY_INSTALL, // add BURNMSIINSTALL=1 + BURN_MSI_PROPERTY_MODIFY, // add BURNMSIMODIFY=1 + BURN_MSI_PROPERTY_REPAIR, // add BURNMSIREPAIR=1 + BURN_MSI_PROPERTY_UNINSTALL,// add BURNMSIUNINSTALL=1 +}; + +struct BOOTSTRAPPER_COMMAND +{ + DWORD cbSize; + BOOTSTRAPPER_ACTION action; + BOOTSTRAPPER_DISPLAY display; + + LPWSTR wzCommandLine; + INT32 nCmdShow; + + BOOTSTRAPPER_RESUME_TYPE resumeType; + HWND hwndSplashScreen; + + // If this was run from a related bundle, specifies the relation type + BOOTSTRAPPER_RELATION_TYPE relationType; + BOOL fPassthrough; + + LPWSTR wzLayoutDirectory; + LPWSTR wzBootstrapperWorkingFolder; + LPWSTR wzBootstrapperApplicationDataPath; +}; + +struct BA_ONAPPLYBEGIN_ARGS +{ + DWORD dwApiVersion; + DWORD dwPhaseCount; +}; + +struct BA_ONAPPLYBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONAPPLYCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; + // Indicates whether any package required a reboot or initiated the reboot already. + BOOTSTRAPPER_APPLY_RESTART restart; + BOOTSTRAPPER_APPLYCOMPLETE_ACTION recommendation; +}; + +struct BA_ONAPPLYCOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_APPLYCOMPLETE_ACTION action; +}; + +struct BA_ONAPPLYDOWNGRADE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrRecommended; +}; + +struct BA_ONAPPLYDOWNGRADE_RESULTS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONBEGINMSITRANSACTIONBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; +}; + +struct BA_ONBEGINMSITRANSACTIONBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONBEGINMSITRANSACTIONCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; + HRESULT hrStatus; +}; + +struct BA_ONBEGINMSITRANSACTIONCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONCACHEACQUIREBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + LPCWSTR wzSource; + LPCWSTR wzDownloadUrl; + LPCWSTR wzPayloadContainerId; + BOOTSTRAPPER_CACHE_OPERATION recommendation; +}; + +struct BA_ONCACHEACQUIREBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_CACHE_OPERATION action; +}; + +struct BA_ONCACHEACQUIRECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + HRESULT hrStatus; + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION recommendation; +}; + +struct BA_ONCACHEACQUIRECOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_CACHEACQUIRECOMPLETE_ACTION action; +}; + +struct BA_ONCACHEACQUIREPROGRESS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + DWORD64 dw64Progress; + DWORD64 dw64Total; + DWORD dwOverallPercentage; +}; + +struct BA_ONCACHEACQUIREPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEACQUIRERESOLVING_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + LPCWSTR* rgSearchPaths; + DWORD cSearchPaths; + BOOL fFoundLocal; + DWORD dwRecommendedSearchPath; + LPCWSTR wzDownloadUrl; + LPCWSTR wzPayloadContainerId; + BOOTSTRAPPER_CACHE_RESOLVE_OPERATION recommendation; +}; + +struct BA_ONCACHEACQUIRERESOLVING_RESULTS +{ + DWORD dwApiVersion; + DWORD dwChosenSearchPath; + BOOTSTRAPPER_CACHE_RESOLVE_OPERATION action; + BOOL fCancel; +}; + +struct BA_ONCACHEBEGIN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONCACHEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHECOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONCACHECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + HRESULT hrStatus; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + DWORD64 dw64Progress; + DWORD64 dw64Total; + DWORD dwOverallPercentage; +}; + +struct BA_ONCACHECONTAINERORPAYLOADVERIFYPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEPACKAGEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + DWORD cCachePayloads; + DWORD64 dw64PackageCacheSize; + // If caching a package is not vital, then acquisition will be skipped unless the BA opts in through OnCachePackageNonVitalValidationFailure. + BOOL fVital; +}; + +struct BA_ONCACHEPACKAGEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEPACKAGECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + HRESULT hrStatus; + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION recommendation; +}; + +struct BA_ONCACHEPACKAGECOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_CACHEPACKAGECOMPLETE_ACTION action; +}; + +struct BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + HRESULT hrStatus; + BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION recommendation; +}; + +struct BA_ONCACHEPACKAGENONVITALVALIDATIONFAILURE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_CACHEPACKAGENONVITALVALIDATIONFAILURE_ACTION action; +}; + +struct BA_ONCACHEPAYLOADEXTRACTBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzContainerId; + LPCWSTR wzPayloadId; +}; + +struct BA_ONCACHEPAYLOADEXTRACTBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEPAYLOADEXTRACTCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzContainerId; + LPCWSTR wzPayloadId; + HRESULT hrStatus; +}; + +struct BA_ONCACHEPAYLOADEXTRACTCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONCACHEPAYLOADEXTRACTPROGRESS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzContainerId; + LPCWSTR wzPayloadId; + DWORD64 dw64Progress; + DWORD64 dw64Total; + DWORD dwOverallPercentage; +}; + +struct BA_ONCACHEPAYLOADEXTRACTPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEVERIFYBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; +}; + +struct BA_ONCACHEVERIFYBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCACHEVERIFYCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + HRESULT hrStatus; + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION recommendation; +}; + +struct BA_ONCACHEVERIFYCOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_CACHEVERIFYCOMPLETE_ACTION action; +}; + +struct BA_ONCACHEVERIFYPROGRESS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + DWORD64 dw64Progress; + DWORD64 dw64Total; + DWORD dwOverallPercentage; + BOOTSTRAPPER_CACHE_VERIFY_STEP verifyStep; +}; + +struct BA_ONCACHEVERIFYPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCOMMITMSITRANSACTIONBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; +}; + +struct BA_ONCOMMITMSITRANSACTIONBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONCOMMITMSITRANSACTIONCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; + HRESULT hrStatus; + BOOTSTRAPPER_APPLY_RESTART restart; + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation; +}; + +struct BA_ONCOMMITMSITRANSACTIONCOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action; +}; + +struct BA_ONCREATE_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_COMMAND command; + // BOOTSTRAPPER_ACTION action; + // BOOTSTRAPPER_DISPLAY display; + + // LPWSTR wzCommandLine; + // INT32 nCmdShow; + + // BOOTSTRAPPER_RESUME_TYPE resumeType; + // HWND hwndSplashScreen; + + // BOOTSTRAPPER_RELATION_TYPE relationType; + // BOOL fPassthrough; + + // LPWSTR wzLayoutDirectory; + // LPWSTR wzBootstrapperWorkingFolder; + // LPWSTR wzBootstrapperApplicationDataPath; +}; + +struct BA_ONCREATE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONDESTROY_ARGS +{ + DWORD dwApiVersion; + BOOL fReload; +}; + +struct BA_ONDESTROY_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONDETECTBEGIN_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_REGISTRATION_TYPE registrationType; + DWORD cPackages; + BOOL fCached; +}; + +struct BA_ONDETECTBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzCompatiblePackageId; + LPCWSTR wzCompatiblePackageVersion; +}; + +struct BA_ONDETECTCOMPATIBLEMSIPACKAGE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; + BOOL fEligibleForCleanup; +}; + +struct BA_ONDETECTCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_RELATION_TYPE relationType; + LPCWSTR wzBundleTag; + BOOL fPerMachine; + LPCWSTR wzVersion; + BOOL fMissingFromCache; +}; + +struct BA_ONDETECTFORWARDCOMPATIBLEBUNDLE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTMSIFEATURE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzFeatureId; + BOOTSTRAPPER_FEATURE_STATE state; +}; + +struct BA_ONDETECTMSIFEATURE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTPACKAGEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; +}; + +struct BA_ONDETECTPACKAGEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTPACKAGECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + HRESULT hrStatus; + BOOTSTRAPPER_PACKAGE_STATE state; + BOOL fCached; +}; + +struct BA_ONDETECTPACKAGECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONDETECTRELATEDBUNDLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_RELATION_TYPE relationType; + LPCWSTR wzBundleTag; + BOOL fPerMachine; + LPCWSTR wzVersion; + BOOL fMissingFromCache; +}; + +struct BA_ONDETECTRELATEDBUNDLE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTRELATEDBUNDLEPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzBundleId; + BOOTSTRAPPER_RELATION_TYPE relationType; + BOOL fPerMachine; + LPCWSTR wzVersion; +}; + +struct BA_ONDETECTRELATEDBUNDLEPACKAGE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTRELATEDMSIPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzUpgradeCode; + LPCWSTR wzProductCode; + BOOL fPerMachine; + LPCWSTR wzVersion; + BOOTSTRAPPER_RELATED_OPERATION operation; +}; + +struct BA_ONDETECTRELATEDMSIPACKAGE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTPATCHTARGET_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzProductCode; + BOOTSTRAPPER_PACKAGE_STATE patchState; +}; + +struct BA_ONDETECTPATCHTARGET_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONDETECTUPDATE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzUpdateLocation; + DWORD64 dw64Size; + LPCWSTR wzHash; + BOOTSTRAPPER_UPDATE_HASH_TYPE hashAlgorithm; + LPCWSTR wzVersion; + LPCWSTR wzTitle; + LPCWSTR wzSummary; + LPCWSTR wzContentType; + LPCWSTR wzContent; +}; + +struct BA_ONDETECTUPDATE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOL fStopProcessingUpdates; +}; + +struct BA_ONDETECTUPDATEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzUpdateLocation; +}; + +struct BA_ONDETECTUPDATEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOL fSkip; +}; + +struct BA_ONDETECTUPDATECOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONDETECTUPDATECOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOL fIgnoreError; +}; + +struct BA_ONELEVATEBEGIN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONELEVATEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONELEVATECOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONELEVATECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONERROR_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_ERROR_TYPE errorType; + LPCWSTR wzPackageId; + DWORD dwCode; + LPCWSTR wzError; + DWORD dwUIHint; + DWORD cData; + LPCWSTR* rgwzData; + INT32 nRecommendation; +}; + +struct BA_ONERROR_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +}; + +struct BA_ONEXECUTEBEGIN_ARGS +{ + DWORD dwApiVersion; + DWORD cExecutingPackages; +}; + +struct BA_ONEXECUTEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONEXECUTECOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONEXECUTECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONEXECUTEFILESINUSE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + DWORD cFiles; + LPCWSTR* rgwzFiles; + INT32 nRecommendation; + BOOTSTRAPPER_FILES_IN_USE_TYPE source; +}; + +struct BA_ONEXECUTEFILESINUSE_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +}; + +struct BA_ONEXECUTEMSIMESSAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + INSTALLMESSAGE messageType; + DWORD dwUIHint; + LPCWSTR wzMessage; + DWORD cData; + LPCWSTR* rgwzData; + INT32 nRecommendation; +}; + +struct BA_ONEXECUTEMSIMESSAGE_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +}; + +struct BA_ONEXECUTEPACKAGEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + BOOL fExecute; // false means rollback. + BOOTSTRAPPER_ACTION_STATE action; + INSTALLUILEVEL uiLevel; + BOOL fDisableExternalUiHandler; +}; + +struct BA_ONEXECUTEPACKAGEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONEXECUTEPACKAGECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + HRESULT hrStatus; + // Indicates whether this package requires a reboot or initiated the reboot already. + BOOTSTRAPPER_APPLY_RESTART restart; + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION recommendation; +}; + +struct BA_ONEXECUTEPACKAGECOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_EXECUTEPACKAGECOMPLETE_ACTION action; +}; + +struct BA_ONEXECUTEPATCHTARGET_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzTargetProductCode; +}; + +struct BA_ONEXECUTEPATCHTARGET_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONEXECUTEPROCESSCANCEL_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + DWORD dwProcessId; + BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION recommendation; +}; + +struct BA_ONEXECUTEPROCESSCANCEL_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_EXECUTEPROCESSCANCEL_ACTION action; +}; + +struct BA_ONEXECUTEPROGRESS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + DWORD dwProgressPercentage; + DWORD dwOverallPercentage; +}; + +struct BA_ONEXECUTEPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONLAUNCHAPPROVEDEXEBEGIN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONLAUNCHAPPROVEDEXEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; + // Only valid if the operation succeeded. + DWORD dwProcessId; +}; + +struct BA_ONLAUNCHAPPROVEDEXECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPAUSEAUTOMATICUPDATESBEGIN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPAUSEAUTOMATICUPDATESBEGIN_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONPAUSEAUTOMATICUPDATESCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANBEGIN_ARGS +{ + DWORD dwApiVersion; + DWORD cPackages; +}; + +struct BA_ONPLANBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzCompatiblePackageId; + LPCWSTR wzCompatiblePackageVersion; + BOOL fRecommendedRemove; +}; + +struct BA_ONPLANCOMPATIBLEMSIPACKAGEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOL fRequestRemove; +}; + +struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzCompatiblePackageId; + HRESULT hrStatus; + BOOL fRequestedRemove; +}; + +struct BA_ONPLANCOMPATIBLEMSIPACKAGECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONPLANCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANFORWARDCOMPATIBLEBUNDLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_RELATION_TYPE relationType; + LPCWSTR wzBundleTag; + BOOL fPerMachine; + LPCWSTR wzVersion; + BOOL fRecommendedIgnoreBundle; +}; + +struct BA_ONPLANFORWARDCOMPATIBLEBUNDLE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOL fIgnoreBundle; +}; + +struct BA_ONPLANMSIFEATURE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzFeatureId; + BOOTSTRAPPER_FEATURE_STATE recommendedState; +}; + +struct BA_ONPLANMSIFEATURE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_FEATURE_STATE requestedState; + BOOL fCancel; +}; + +struct BA_ONPLANMSIPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + BOOL fExecute; // false means rollback. + BOOTSTRAPPER_ACTION_STATE action; + BOOTSTRAPPER_MSI_FILE_VERSIONING recommendedFileVersioning; +}; + +struct BA_ONPLANMSIPACKAGE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BURN_MSI_PROPERTY actionMsiProperty; + INSTALLUILEVEL uiLevel; + BOOL fDisableExternalUiHandler; + BOOTSTRAPPER_MSI_FILE_VERSIONING fileVersioning; +}; + +struct BA_ONPLANNEDCOMPATIBLEPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzCompatiblePackageId; + BOOL fRemove; +}; + +struct BA_ONPLANNEDCOMPATIBLEPACKAGE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANNEDPACKAGE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + BOOTSTRAPPER_ACTION_STATE execute; + BOOTSTRAPPER_ACTION_STATE rollback; + BOOL fPlannedCache; + BOOL fPlannedUncache; +}; + +struct BA_ONPLANNEDPACKAGE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANPACKAGEBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + BOOTSTRAPPER_PACKAGE_STATE state; + BOOL fCached; + BOOTSTRAPPER_PACKAGE_CONDITION_RESULT installCondition; + BOOTSTRAPPER_REQUEST_STATE recommendedState; + BOOTSTRAPPER_CACHE_TYPE recommendedCacheType; + BOOTSTRAPPER_PACKAGE_CONDITION_RESULT repairCondition; +}; + +struct BA_ONPLANPACKAGEBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_REQUEST_STATE requestedState; + BOOTSTRAPPER_CACHE_TYPE requestedCacheType; +}; + +struct BA_ONPLANPACKAGECOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + HRESULT hrStatus; + BOOTSTRAPPER_REQUEST_STATE requested; +}; + +struct BA_ONPLANPACKAGECOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONPLANRELATEDBUNDLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_REQUEST_STATE recommendedState; +}; + +struct BA_ONPLANRELATEDBUNDLE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_REQUEST_STATE requestedState; +}; + +struct BA_ONPLANRELATEDBUNDLETYPE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE recommendedType; +}; + +struct BA_ONPLANRELATEDBUNDLETYPE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_RELATED_BUNDLE_PLAN_TYPE requestedType; +}; + +struct BA_ONPLANRESTORERELATEDBUNDLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + BOOTSTRAPPER_REQUEST_STATE recommendedState; +}; + +struct BA_ONPLANRESTORERELATEDBUNDLE_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_REQUEST_STATE requestedState; +}; + +struct BA_ONPLANROLLBACKBOUNDARY_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzRollbackBoundaryId; + BOOL fRecommendedTransaction; +}; + +struct BA_ONPLANROLLBACKBOUNDARY_RESULTS +{ + DWORD dwApiVersion; + BOOL fTransaction; + BOOL fCancel; +}; + +struct BA_ONPLANPATCHTARGET_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageId; + LPCWSTR wzProductCode; + BOOTSTRAPPER_REQUEST_STATE recommendedState; +}; + +struct BA_ONPLANPATCHTARGET_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_REQUEST_STATE requestedState; +}; + +struct BA_ONPROGRESS_ARGS +{ + DWORD dwApiVersion; + DWORD dwProgressPercentage; + DWORD dwOverallPercentage; +}; + +struct BA_ONPROGRESS_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; +}; + +struct BA_ONREGISTERBEGIN_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType; +}; + +struct BA_ONREGISTERBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOL fCancel; + BOOTSTRAPPER_REGISTRATION_TYPE registrationType; +}; + +struct BA_ONREGISTERCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONREGISTERCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONROLLBACKMSITRANSACTIONBEGIN_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; +}; + +struct BA_ONROLLBACKMSITRANSACTIONBEGIN_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONROLLBACKMSITRANSACTIONCOMPLETE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzTransactionId; + HRESULT hrStatus; + BOOTSTRAPPER_APPLY_RESTART restart; + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION recommendation; +}; + +struct BA_ONROLLBACKMSITRANSACTIONCOMPLETE_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_EXECUTEMSITRANSACTIONCOMPLETE_ACTION action; +}; + +struct BA_ONSHUTDOWN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONSHUTDOWN_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_SHUTDOWN_ACTION action; +}; + +struct BA_ONSTARTUP_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONSTARTUP_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONSYSTEMRESTOREPOINTBEGIN_ARGS +{ + DWORD dwApiVersion; +}; + +struct BA_ONSYSTEMRESTOREPOINTBEGIN_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONSYSTEMRESTOREPOINTCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONSYSTEMRESTOREPOINTCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +struct BA_ONUNREGISTERBEGIN_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_REGISTRATION_TYPE recommendedRegistrationType; +}; + +struct BA_ONUNREGISTERBEGIN_RESULTS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_REGISTRATION_TYPE registrationType; +}; + +struct BA_ONUNREGISTERCOMPLETE_ARGS +{ + DWORD dwApiVersion; + HRESULT hrStatus; +}; + +struct BA_ONUNREGISTERCOMPLETE_RESULTS +{ + DWORD dwApiVersion; +}; + +#ifdef TODO_DELETE + +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_PROC)( + __in BOOTSTRAPPER_APPLICATION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ); + +struct BOOTSTRAPPER_DESTROY_ARGS +{ + DWORD dwApiVersion; + BOOL fReload; +}; + +struct BOOTSTRAPPER_DESTROY_RESULTS +{ + DWORD dwApiVersion; + BOOL fDisableUnloading; // indicates the BA dll must not be unloaded after BootstrapperApplicationDestroy. +}; + +extern "C" typedef void (WINAPI *PFN_BOOTSTRAPPER_APPLICATION_DESTROY)( + __in const BOOTSTRAPPER_DESTROY_ARGS* pArgs, + __inout BOOTSTRAPPER_DESTROY_RESULTS* pResults + ); + + + +struct BOOTSTRAPPER_CREATE_ARGS +{ + DWORD dwApiVersion; + DWORD64 qwEngineAPIVersion; + PFN_BOOTSTRAPPER_ENGINE_PROC pfnBootstrapperEngineProc; + LPVOID pvBootstrapperEngineProcContext; + BOOTSTRAPPER_COMMAND* pCommand; +}; + +struct BOOTSTRAPPER_CREATE_RESULTS +{ + DWORD dwApiVersion; + PFN_BOOTSTRAPPER_APPLICATION_PROC pfnBootstrapperApplicationProc; + LPVOID pvBootstrapperApplicationProcContext; +}; + +extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_APPLICATION_CREATE)( + __in const BOOTSTRAPPER_CREATE_ARGS* pArgs, + __inout BOOTSTRAPPER_CREATE_RESULTS* pResults + ); + +#endif + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/inc/BootstrapperEngine.h b/src/api/burn/inc/BootstrapperEngine.h new file mode 100644 index 00000000..7af41d97 --- /dev/null +++ b/src/api/burn/inc/BootstrapperEngine.h @@ -0,0 +1,460 @@ +#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. + + +#if defined(__cplusplus) +extern "C" { +#endif + +#define IDERROR -1 +#define IDNOACTION 0 + +#ifndef FACILITY_WIX +#define FACILITY_WIX 500 +#endif + +static const HRESULT E_SUSPECTED_AV_INTERFERENCE = MAKE_HRESULT(SEVERITY_ERROR, FACILITY_WIX, 2000); + +enum BOOTSTRAPPER_ACTION +{ + BOOTSTRAPPER_ACTION_UNKNOWN, + BOOTSTRAPPER_ACTION_HELP, + BOOTSTRAPPER_ACTION_LAYOUT, + BOOTSTRAPPER_ACTION_UNSAFE_UNINSTALL, + BOOTSTRAPPER_ACTION_UNINSTALL, + BOOTSTRAPPER_ACTION_CACHE, + BOOTSTRAPPER_ACTION_INSTALL, + BOOTSTRAPPER_ACTION_MODIFY, + BOOTSTRAPPER_ACTION_REPAIR, + BOOTSTRAPPER_ACTION_UPDATE_REPLACE, + BOOTSTRAPPER_ACTION_UPDATE_REPLACE_EMBEDDED, +}; + +enum BOOTSTRAPPER_ACTION_STATE +{ + BOOTSTRAPPER_ACTION_STATE_NONE, + BOOTSTRAPPER_ACTION_STATE_UNINSTALL, + BOOTSTRAPPER_ACTION_STATE_INSTALL, + BOOTSTRAPPER_ACTION_STATE_MODIFY, + BOOTSTRAPPER_ACTION_STATE_REPAIR, + BOOTSTRAPPER_ACTION_STATE_MINOR_UPGRADE, +}; + +enum BOOTSTRAPPER_PACKAGE_STATE +{ + BOOTSTRAPPER_PACKAGE_STATE_UNKNOWN, + BOOTSTRAPPER_PACKAGE_STATE_OBSOLETE, + BOOTSTRAPPER_PACKAGE_STATE_ABSENT, + BOOTSTRAPPER_PACKAGE_STATE_PRESENT, + BOOTSTRAPPER_PACKAGE_STATE_SUPERSEDED, +}; + +enum BOOTSTRAPPER_REQUEST_STATE +{ + BOOTSTRAPPER_REQUEST_STATE_NONE, + BOOTSTRAPPER_REQUEST_STATE_FORCE_ABSENT, + BOOTSTRAPPER_REQUEST_STATE_ABSENT, + BOOTSTRAPPER_REQUEST_STATE_CACHE, + BOOTSTRAPPER_REQUEST_STATE_PRESENT, + BOOTSTRAPPER_REQUEST_STATE_FORCE_PRESENT, + BOOTSTRAPPER_REQUEST_STATE_REPAIR, +}; + +enum BOOTSTRAPPER_FEATURE_STATE +{ + BOOTSTRAPPER_FEATURE_STATE_UNKNOWN, + BOOTSTRAPPER_FEATURE_STATE_ABSENT, + BOOTSTRAPPER_FEATURE_STATE_ADVERTISED, + BOOTSTRAPPER_FEATURE_STATE_LOCAL, + BOOTSTRAPPER_FEATURE_STATE_SOURCE, +}; + +enum BOOTSTRAPPER_LOG_LEVEL +{ + BOOTSTRAPPER_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) + BOOTSTRAPPER_LOG_LEVEL_STANDARD, // written if reporting is on + BOOTSTRAPPER_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on + BOOTSTRAPPER_LOG_LEVEL_DEBUG, // reporting useful when debugging code + BOOTSTRAPPER_LOG_LEVEL_ERROR, // always gets reported, but can never be specified +}; + +enum BOOTSTRAPPER_UPDATE_HASH_TYPE +{ + BOOTSTRAPPER_UPDATE_HASH_TYPE_NONE, + BOOTSTRAPPER_UPDATE_HASH_TYPE_SHA512, +}; + +enum BOOTSTRAPPER_ENGINE_MESSAGE +{ + BOOTSTRAPPER_ENGINE_MESSAGE_UNKNOWN, + BOOTSTRAPPER_ENGINE_MESSAGE_GETPACKAGECOUNT, + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLENUMERIC, + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLESTRING, + BOOTSTRAPPER_ENGINE_MESSAGE_GETVARIABLEVERSION, + BOOTSTRAPPER_ENGINE_MESSAGE_FORMATSTRING, + BOOTSTRAPPER_ENGINE_MESSAGE_ESCAPESTRING, + BOOTSTRAPPER_ENGINE_MESSAGE_EVALUATECONDITION, + BOOTSTRAPPER_ENGINE_MESSAGE_LOG, + BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDERROR, + BOOTSTRAPPER_ENGINE_MESSAGE_SENDEMBEDDEDPROGRESS, + BOOTSTRAPPER_ENGINE_MESSAGE_SETUPDATE, + BOOTSTRAPPER_ENGINE_MESSAGE_SETLOCALSOURCE, + BOOTSTRAPPER_ENGINE_MESSAGE_SETDOWNLOADSOURCE, + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLENUMERIC, + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLESTRING, + BOOTSTRAPPER_ENGINE_MESSAGE_SETVARIABLEVERSION, + BOOTSTRAPPER_ENGINE_MESSAGE_CLOSESPLASHSCREEN, + BOOTSTRAPPER_ENGINE_MESSAGE_DETECT, + BOOTSTRAPPER_ENGINE_MESSAGE_PLAN, + BOOTSTRAPPER_ENGINE_MESSAGE_ELEVATE, + BOOTSTRAPPER_ENGINE_MESSAGE_APPLY, + BOOTSTRAPPER_ENGINE_MESSAGE_QUIT, + BOOTSTRAPPER_ENGINE_MESSAGE_LAUNCHAPPROVEDEXE, + BOOTSTRAPPER_ENGINE_MESSAGE_SETUPDATESOURCE, + BOOTSTRAPPER_ENGINE_MESSAGE_COMPAREVERSIONS, + BOOTSTRAPPER_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, + + BOOTSTRAPPER_APPLICATION_MESSAGE_LAST = 65535 +}; + +typedef struct _BAENGINE_APPLY_ARGS +{ + DWORD dwApiVersion; + DWORD64 hwndParent; +} BAENGINE_APPLY_ARGS; + +typedef struct _BAENGINE_APPLY_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_APPLY_RESULTS; + +typedef struct _BAENGINE_CLOSESPLASHSCREEN_ARGS +{ + DWORD dwApiVersion; +} BAENGINE_CLOSESPLASHSCREEN_ARGS; + +typedef struct _BAENGINE_CLOSESPLASHSCREEN_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_CLOSESPLASHSCREEN_RESULTS; + +typedef struct _BAENGINE_COMPAREVERSIONS_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVersion1; + LPCWSTR wzVersion2; +} BAENGINE_COMPAREVERSIONS_ARGS; + +typedef struct _BAENGINE_COMPAREVERSIONS_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +} BAENGINE_COMPAREVERSIONS_RESULTS; + +typedef struct _BAENGINE_DETECT_ARGS +{ + DWORD dwApiVersion; + DWORD64 hwndParent; +} BAENGINE_DETECT_ARGS; + +typedef struct _BAENGINE_DETECT_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_DETECT_RESULTS; + +typedef struct _BAENGINE_ELEVATE_ARGS +{ + DWORD dwApiVersion; + DWORD64 hwndParent; +} BAENGINE_ELEVATE_ARGS; + +typedef struct _BAENGINE_ELEVATE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_ELEVATE_RESULTS; + +typedef struct _BAENGINE_ESCAPESTRING_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzIn; +} BAENGINE_ESCAPESTRING_ARGS; + +typedef struct _BAENGINE_ESCAPESTRING_RESULTS +{ + DWORD dwApiVersion; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + DWORD cchOut; +} BAENGINE_ESCAPESTRING_RESULTS; + +typedef struct _BAENGINE_EVALUATECONDITION_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzCondition; +} BAENGINE_EVALUATECONDITION_ARGS; + +typedef struct _BAENGINE_EVALUATECONDITION_RESULTS +{ + DWORD dwApiVersion; + BOOL f; +} BAENGINE_EVALUATECONDITION_RESULTS; + +typedef struct _BAENGINE_FORMATSTRING_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzIn; +} BAENGINE_FORMATSTRING_ARGS; + +typedef struct _BAENGINE_FORMATSTRING_RESULTS +{ + DWORD dwApiVersion; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + DWORD cchOut; +} BAENGINE_FORMATSTRING_RESULTS; + +typedef struct _BAENGINE_GETPACKAGECOUNT_ARGS +{ + DWORD dwApiVersion; +} BAENGINE_GETPACKAGECOUNT_ARGS; + +typedef struct _BAENGINE_GETPACKAGECOUNT_RESULTS +{ + DWORD dwApiVersion; + DWORD cPackages; +} BAENGINE_GETPACKAGECOUNT_RESULTS; + +typedef struct _BAENGINE_GETVARIABLENUMERIC_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; +} BAENGINE_GETVARIABLENUMERIC_ARGS; + +typedef struct _BAENGINE_GETVARIABLENUMERIC_RESULTS +{ + DWORD dwApiVersion; + LONGLONG llValue; +} BAENGINE_GETVARIABLENUMERIC_RESULTS; + +typedef struct _BAENGINE_GETVARIABLESTRING_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; +} BAENGINE_GETVARIABLESTRING_ARGS; + +typedef struct _BAENGINE_GETVARIABLESTRING_RESULTS +{ + DWORD dwApiVersion; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + DWORD cchValue; +} BAENGINE_GETVARIABLESTRING_RESULTS; + +typedef struct _BAENGINE_GETVARIABLEVERSION_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; +} BAENGINE_GETVARIABLEVERSION_ARGS; + +typedef struct _BAENGINE_GETVARIABLEVERSION_RESULTS +{ + DWORD dwApiVersion; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + DWORD cchValue; +} BAENGINE_GETVARIABLEVERSION_RESULTS; + +typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_ARGS +{ + DWORD dwApiVersion; + DWORD64 hwndParent; + LPCWSTR wzApprovedExeForElevationId; + LPCWSTR wzArguments; + DWORD dwWaitForInputIdleTimeout; +} BAENGINE_LAUNCHAPPROVEDEXE_ARGS; + +typedef struct _BAENGINE_LAUNCHAPPROVEDEXE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_LAUNCHAPPROVEDEXE_RESULTS; + +typedef struct _BAENGINE_SETUPDATESOURCE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzUrl; + LPCWSTR wzAuthorizationHeader; +} BAENGINE_SETUPDATESOURCE_ARGS; + +typedef struct _BAENGINE_SETUPDATESOURCE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETUPDATESOURCE_RESULTS; + +typedef struct _BAENGINE_LOG_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_LOG_LEVEL level; + LPCWSTR wzMessage; +} BAENGINE_LOG_ARGS; + +typedef struct _BAENGINE_LOG_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_LOG_RESULTS; + +typedef struct _BAENGINE_PLAN_ARGS +{ + DWORD dwApiVersion; + BOOTSTRAPPER_ACTION action; +} BAENGINE_PLAN_ARGS; + +typedef struct _BAENGINE_PLAN_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_PLAN_RESULTS; + +typedef struct _BAENGINE_QUIT_ARGS +{ + DWORD dwApiVersion; + DWORD dwExitCode; +} BAENGINE_QUIT_ARGS; + +typedef struct _BAENGINE_QUIT_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_QUIT_RESULTS; + +typedef struct _BAENGINE_SENDEMBEDDEDERROR_ARGS +{ + DWORD dwApiVersion; + DWORD dwErrorCode; + LPCWSTR wzMessage; + DWORD dwUIHint; +} BAENGINE_SENDEMBEDDEDERROR_ARGS; + +typedef struct _BAENGINE_SENDEMBEDDEDERROR_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +} BAENGINE_SENDEMBEDDEDERROR_RESULTS; + +typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_ARGS +{ + DWORD dwApiVersion; + DWORD dwProgressPercentage; + DWORD dwOverallProgressPercentage; +} BAENGINE_SENDEMBEDDEDPROGRESS_ARGS; + +typedef struct _BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS +{ + DWORD dwApiVersion; + INT32 nResult; +} BAENGINE_SENDEMBEDDEDPROGRESS_RESULTS; + +typedef struct _BAENGINE_SETDOWNLOADSOURCE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + LPCWSTR wzUrl; + LPCWSTR wzUser; + LPCWSTR wzPassword; + LPCWSTR wzAuthorizationHeader; +} BAENGINE_SETDOWNLOADSOURCE_ARGS; + +typedef struct _BAENGINE_SETDOWNLOADSOURCE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETDOWNLOADSOURCE_RESULTS; + +typedef struct _BAENGINE_SETLOCALSOURCE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzPackageOrContainerId; + LPCWSTR wzPayloadId; + LPCWSTR wzPath; +} BAENGINE_SETLOCALSOURCE_ARGS; + +typedef struct _BAENGINE_SETLOCALSOURCE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETLOCALSOURCE_RESULTS; + +typedef struct _BAENGINE_SETUPDATE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzLocalSource; + LPCWSTR wzDownloadSource; + DWORD64 qwSize; + BOOTSTRAPPER_UPDATE_HASH_TYPE hashType; + LPCWSTR wzHash; + LPCWSTR wzUpdatePackageId; +} BAENGINE_SETUPDATE_ARGS; + +typedef struct _BAENGINE_SETUPDATE_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETUPDATE_RESULTS; + +typedef struct _BAENGINE_SETVARIABLENUMERIC_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; + LONGLONG llValue; +} BAENGINE_SETVARIABLENUMERIC_ARGS; + +typedef struct _BAENGINE_SETVARIABLENUMERIC_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETVARIABLENUMERIC_RESULTS; + +typedef struct _BAENGINE_SETVARIABLESTRING_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; + LPCWSTR wzValue; + BOOL fFormatted; +} BAENGINE_SETVARIABLESTRING_ARGS; + +typedef struct _BAENGINE_SETVARIABLESTRING_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETVARIABLESTRING_RESULTS; + +typedef struct _BAENGINE_SETVARIABLEVERSION_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzVariable; + LPCWSTR wzValue; +} BAENGINE_SETVARIABLEVERSION_ARGS; + +typedef struct _BAENGINE_SETVARIABLEVERSION_RESULTS +{ + DWORD dwApiVersion; +} BAENGINE_SETVARIABLEVERSION_RESULTS; + +typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS +{ + DWORD dwApiVersion; + LPCWSTR wzBundleId; + LPCWSTR wzVariable; +} BAENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; + +typedef struct _BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS +{ + DWORD dwApiVersion; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + DWORD cchValue; +} BAENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; + +// extern "C" typedef HRESULT(WINAPI *PFN_BOOTSTRAPPER_ENGINE_PROC)( +// __in BOOTSTRAPPER_ENGINE_MESSAGE message, +// __in const LPVOID pvArgs, +// __inout LPVOID pvResults, +// __in_opt LPVOID pvContext +// ); + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/inc/BundleExtension.h b/src/api/burn/inc/BundleExtension.h new file mode 100644 index 00000000..17acff6e --- /dev/null +++ b/src/api/burn/inc/BundleExtension.h @@ -0,0 +1,61 @@ +#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 + +#if defined(__cplusplus) +extern "C" { +#endif + +enum BUNDLE_EXTENSION_MESSAGE +{ + BUNDLE_EXTENSION_MESSAGE_SEARCH, +}; + +typedef struct _BUNDLE_EXTENSION_SEARCH_ARGS +{ + DWORD cbSize; + LPCWSTR wzId; + LPCWSTR wzVariable; +} BUNDLE_EXTENSION_SEARCH_ARGS; + +typedef struct _BUNDLE_EXTENSION_SEARCH_RESULTS +{ + DWORD cbSize; +} BUNDLE_EXTENSION_SEARCH_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_PROC)( + __in BUNDLE_EXTENSION_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ); + +typedef struct _BUNDLE_EXTENSION_CREATE_ARGS +{ + DWORD cbSize; + DWORD64 qwEngineAPIVersion; + PFN_BUNDLE_EXTENSION_ENGINE_PROC pfnBundleExtensionEngineProc; + LPVOID pvBundleExtensionEngineProcContext; + LPCWSTR wzBootstrapperWorkingFolder; + LPCWSTR wzBundleExtensionDataPath; + LPCWSTR wzExtensionId; +} BUNDLE_EXTENSION_CREATE_ARGS; + +typedef struct _BUNDLE_EXTENSION_CREATE_RESULTS +{ + DWORD cbSize; + PFN_BUNDLE_EXTENSION_PROC pfnBundleExtensionProc; + LPVOID pvBundleExtensionProcContext; +} BUNDLE_EXTENSION_CREATE_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_CREATE)( + __in const BUNDLE_EXTENSION_CREATE_ARGS* pArgs, + __inout BUNDLE_EXTENSION_CREATE_RESULTS* pResults + ); + +extern "C" typedef void (WINAPI *PFN_BUNDLE_EXTENSION_DESTROY)(); + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/inc/BundleExtensionEngine.h b/src/api/burn/inc/BundleExtensionEngine.h new file mode 100644 index 00000000..b585d1a2 --- /dev/null +++ b/src/api/burn/inc/BundleExtensionEngine.h @@ -0,0 +1,200 @@ +#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. + + +#if defined(__cplusplus) +extern "C" { +#endif + +enum BUNDLE_EXTENSION_LOG_LEVEL +{ + BUNDLE_EXTENSION_LOG_LEVEL_NONE, // turns off report (only valid for XXXSetLevel()) + BUNDLE_EXTENSION_LOG_LEVEL_STANDARD, // written if reporting is on + BUNDLE_EXTENSION_LOG_LEVEL_VERBOSE, // written only if verbose reporting is on + BUNDLE_EXTENSION_LOG_LEVEL_DEBUG, // reporting useful when debugging code + BUNDLE_EXTENSION_LOG_LEVEL_ERROR, // always gets reported, but can never be specified +}; + +enum BUNDLE_EXTENSION_ENGINE_MESSAGE +{ + BUNDLE_EXTENSION_ENGINE_MESSAGE_ESCAPESTRING, + BUNDLE_EXTENSION_ENGINE_MESSAGE_EVALUATECONDITION, + BUNDLE_EXTENSION_ENGINE_MESSAGE_FORMATSTRING, + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLENUMERIC, + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLESTRING, + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETVARIABLEVERSION, + BUNDLE_EXTENSION_ENGINE_MESSAGE_LOG, + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLENUMERIC, + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLESTRING, + BUNDLE_EXTENSION_ENGINE_MESSAGE_SETVARIABLEVERSION, + BUNDLE_EXTENSION_ENGINE_MESSAGE_COMPAREVERSIONS, + BUNDLE_EXTENSION_ENGINE_MESSAGE_GETRELATEDBUNDLEVARIABLE, +}; + +typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS +{ + DWORD cbSize; + LPCWSTR wzVersion1; + LPCWSTR wzVersion2; +} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS +{ + DWORD cbSize; + int nResult; +} BUNDLE_EXTENSION_ENGINE_COMPAREVERSIONS_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzIn; +} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + SIZE_T cchOut; +} BUNDLE_EXTENSION_ENGINE_ESCAPESTRING_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS +{ + DWORD cbSize; + LPCWSTR wzCondition; +} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS +{ + DWORD cbSize; + BOOL f; +} BUNDLE_EXTENSION_ENGINE_EVALUATECONDITION_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzIn; +} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzOut; + // Should be initialized to the size of wzOut. + SIZE_T cchOut; +} BUNDLE_EXTENSION_ENGINE_FORMATSTRING_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS +{ + DWORD cbSize; + LONGLONG llValue; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLENUMERIC_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLESTRING_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BUNDLE_EXTENSION_ENGINE_GETVARIABLEVERSION_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_ARGS +{ + DWORD cbSize; + BUNDLE_EXTENSION_LOG_LEVEL level; + LPCWSTR wzMessage; +} BUNDLE_EXTENSION_ENGINE_LOG_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_LOG_RESULTS +{ + DWORD cbSize; +} BUNDLE_EXTENSION_ENGINE_LOG_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LONGLONG llValue; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS +{ + DWORD cbSize; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLENUMERIC_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LPCWSTR wzValue; + BOOL fFormatted; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS +{ + DWORD cbSize; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLESTRING_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS +{ + DWORD cbSize; + LPCWSTR wzVariable; + LPCWSTR wzValue; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS +{ + DWORD cbSize; +} BUNDLE_EXTENSION_ENGINE_SETVARIABLEVERSION_RESULTS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS +{ + DWORD cbSize; + LPCWSTR wzBundleId; + LPCWSTR wzVariable; +} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_ARGS; + +typedef struct _BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS +{ + DWORD cbSize; + LPWSTR wzValue; + // Should be initialized to the size of wzValue. + SIZE_T cchValue; +} BUNDLE_EXTENSION_ENGINE_GETRELATEDBUNDLEVARIABLE_RESULTS; + +extern "C" typedef HRESULT(WINAPI *PFN_BUNDLE_EXTENSION_ENGINE_PROC)( + __in BUNDLE_EXTENSION_ENGINE_MESSAGE message, + __in const LPVOID pvArgs, + __inout LPVOID pvResults, + __in_opt LPVOID pvContext + ); + +#if defined(__cplusplus) +} +#endif diff --git a/src/api/burn/mbanative/mbanative.vcxproj b/src/api/burn/mbanative/mbanative.vcxproj index a1f79f4d..e9e72a49 100644 --- a/src/api/burn/mbanative/mbanative.vcxproj +++ b/src/api/burn/mbanative/mbanative.vcxproj @@ -42,7 +42,7 @@ - ..\balutil\inc;..\WixToolset.BootstrapperCore.Native\inc + ..\balutil\inc;..\inc diff --git a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj index 94586fbd..de79fe33 100644 --- a/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj +++ b/src/api/burn/test/BalUtilUnitTest/BalUtilUnitTest.vcxproj @@ -32,7 +32,7 @@ - ..\..\balutil\inc;..\..\WixToolset.BootstrapperCore.Native\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc + ..\..\balutil\inc;..\..\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib diff --git a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj index d437dc36..6e8dfee1 100644 --- a/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj +++ b/src/api/burn/test/BextUtilUnitTest/BextUtilUnitTest.vcxproj @@ -31,7 +31,7 @@ - ..\..\bextutil\inc;..\..\WixToolset.BootstrapperCore.Native\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc + ..\..\bextutil\inc;..\..\inc;..\..\..\..\libs\dutil\WixToolset.Dutil\inc $(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib diff --git a/src/api/burn/test/BextUtilUnitTest/precomp.h b/src/api/burn/test/BextUtilUnitTest/precomp.h index cf5256b8..00bf872f 100644 --- a/src/api/burn/test/BextUtilUnitTest/precomp.h +++ b/src/api/burn/test/BextUtilUnitTest/precomp.h @@ -7,12 +7,6 @@ #include #include - -#include -#include - -#include -#include #include #include "TestBundleExtension.h" diff --git a/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/VerUtilFixture.cs b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/VerUtilFixture.cs new file mode 100644 index 00000000..1eeec941 --- /dev/null +++ b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/VerUtilFixture.cs @@ -0,0 +1,115 @@ +// 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 WixToolsetTest.BootstrapperApplicationApi +{ + using System; + using WixToolset.BootstrapperApplicationApi; + using Xunit; + + public class VerUtilFixture + { + [Fact] + public void CanCompareStringVersions() + { + var version1 = "1.2.3.4+abcd"; + var version2 = "1.2.3.4+zyxw"; + + Assert.Equal(0, VerUtil.CompareStringVersions(version1, version2, strict: false)); + } + + [Fact] + public void CanCopyVersion() + { + var version = "1.2.3.4-5.6.7.8.9.0"; + + VerUtilVersion copiedVersion = null; + try + { + using (var parsedVersion = VerUtil.ParseVersion(version, strict: true)) + { + copiedVersion = VerUtil.CopyVersion(parsedVersion); + } + + using (var secondVersion = VerUtil.ParseVersion(version, strict: true)) + { + Assert.Equal(0, VerUtil.CompareParsedVersions(copiedVersion, secondVersion)); + } + } + finally + { + copiedVersion?.Dispose(); + } + } + + [Fact] + public void CanCreateFromQword() + { + var version = new Version(100, 200, 300, 400); + var qwVersion = VersionToLong(version); + + using var parsedVersion = VerUtil.VersionFromQword(qwVersion); + Assert.Equal("100.200.300.400", parsedVersion.Version); + Assert.Equal('\0', parsedVersion.Prefix); + Assert.Equal(100u, parsedVersion.Major); + Assert.Equal(200u, parsedVersion.Minor); + Assert.Equal(300u, parsedVersion.Patch); + Assert.Equal(400u, parsedVersion.Revision); + Assert.Empty(parsedVersion.ReleaseLabels); + Assert.Equal("", parsedVersion.Metadata); + Assert.False(parsedVersion.IsInvalid); + Assert.True(parsedVersion.HasMajor); + Assert.True(parsedVersion.HasMinor); + Assert.True(parsedVersion.HasPatch); + Assert.True(parsedVersion.HasRevision); + } + + [Fact] + public void CanParseVersion() + { + var version = "1.2.3.4-a.b.c.d.5.+abc123"; + + using var parsedVersion = VerUtil.ParseVersion(version, strict: false); + Assert.Equal(version, parsedVersion.Version); + Assert.Equal('\0', parsedVersion.Prefix); + Assert.Equal(1u, parsedVersion.Major); + Assert.Equal(2u, parsedVersion.Minor); + Assert.Equal(3u, parsedVersion.Patch); + Assert.Equal(4u, parsedVersion.Revision); + Assert.Equal(5, parsedVersion.ReleaseLabels.Length); + Assert.Equal("+abc123", parsedVersion.Metadata); + Assert.True(parsedVersion.IsInvalid); + Assert.True(parsedVersion.HasMajor); + Assert.True(parsedVersion.HasMinor); + Assert.True(parsedVersion.HasPatch); + Assert.True(parsedVersion.HasRevision); + + Assert.Equal("a", parsedVersion.ReleaseLabels[0].Label); + Assert.False(parsedVersion.ReleaseLabels[0].IsNumeric); + + Assert.Equal("b", parsedVersion.ReleaseLabels[1].Label); + Assert.False(parsedVersion.ReleaseLabels[1].IsNumeric); + + Assert.Equal("c", parsedVersion.ReleaseLabels[2].Label); + Assert.False(parsedVersion.ReleaseLabels[2].IsNumeric); + + Assert.Equal("d", parsedVersion.ReleaseLabels[3].Label); + Assert.False(parsedVersion.ReleaseLabels[3].IsNumeric); + + Assert.Equal("5", parsedVersion.ReleaseLabels[4].Label); + Assert.True(parsedVersion.ReleaseLabels[4].IsNumeric); + Assert.Equal(5u, parsedVersion.ReleaseLabels[4].Value); + } + + private static long VersionToLong(Version version) + { + // In Windows, each version component has a max value of 65535, + // so we truncate the version before shifting it, which will overflow if invalid. + long major = (long)(ushort)version.Major << 48; + long minor = (long)(ushort)version.Minor << 32; + long build = (long)(ushort)version.Build << 16; + long revision = (long)(ushort)version.Revision; + + return major | minor | build | revision; + } + } +} diff --git a/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.csproj b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.csproj new file mode 100644 index 00000000..a3d9930d --- /dev/null +++ b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.csproj @@ -0,0 +1,19 @@ + + + + + + net6.0 + win-x86 + false + true + + + + + + + + + + diff --git a/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.v3.ncrunchproject b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/api/burn/test/WixToolsetTest.BootstrapperApplicationApi/WixToolsetTest.BootstrapperApplicationApi.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/api/burn/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs b/src/api/burn/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs deleted file mode 100644 index 9c213945..00000000 --- a/src/api/burn/test/WixToolsetTest.Mba.Core/VerUtilFixture.cs +++ /dev/null @@ -1,115 +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 WixToolsetTest.Mba.Core -{ - using System; - using WixToolset.Mba.Core; - using Xunit; - - public class VerUtilFixture - { - [Fact] - public void CanCompareStringVersions() - { - var version1 = "1.2.3.4+abcd"; - var version2 = "1.2.3.4+zyxw"; - - Assert.Equal(0, VerUtil.CompareStringVersions(version1, version2, strict: false)); - } - - [Fact] - public void CanCopyVersion() - { - var version = "1.2.3.4-5.6.7.8.9.0"; - - VerUtilVersion copiedVersion = null; - try - { - using (var parsedVersion = VerUtil.ParseVersion(version, strict: true)) - { - copiedVersion = VerUtil.CopyVersion(parsedVersion); - } - - using (var secondVersion = VerUtil.ParseVersion(version, strict: true)) - { - Assert.Equal(0, VerUtil.CompareParsedVersions(copiedVersion, secondVersion)); - } - } - finally - { - copiedVersion?.Dispose(); - } - } - - [Fact] - public void CanCreateFromQword() - { - var version = new Version(100, 200, 300, 400); - var qwVersion = VersionToLong(version); - - using var parsedVersion = VerUtil.VersionFromQword(qwVersion); - Assert.Equal("100.200.300.400", parsedVersion.Version); - Assert.Equal('\0', parsedVersion.Prefix); - Assert.Equal(100u, parsedVersion.Major); - Assert.Equal(200u, parsedVersion.Minor); - Assert.Equal(300u, parsedVersion.Patch); - Assert.Equal(400u, parsedVersion.Revision); - Assert.Empty(parsedVersion.ReleaseLabels); - Assert.Equal("", parsedVersion.Metadata); - Assert.False(parsedVersion.IsInvalid); - Assert.True(parsedVersion.HasMajor); - Assert.True(parsedVersion.HasMinor); - Assert.True(parsedVersion.HasPatch); - Assert.True(parsedVersion.HasRevision); - } - - [Fact] - public void CanParseVersion() - { - var version = "1.2.3.4-a.b.c.d.5.+abc123"; - - using var parsedVersion = VerUtil.ParseVersion(version, strict: false); - Assert.Equal(version, parsedVersion.Version); - Assert.Equal('\0', parsedVersion.Prefix); - Assert.Equal(1u, parsedVersion.Major); - Assert.Equal(2u, parsedVersion.Minor); - Assert.Equal(3u, parsedVersion.Patch); - Assert.Equal(4u, parsedVersion.Revision); - Assert.Equal(5, parsedVersion.ReleaseLabels.Length); - Assert.Equal("+abc123", parsedVersion.Metadata); - Assert.True(parsedVersion.IsInvalid); - Assert.True(parsedVersion.HasMajor); - Assert.True(parsedVersion.HasMinor); - Assert.True(parsedVersion.HasPatch); - Assert.True(parsedVersion.HasRevision); - - Assert.Equal("a", parsedVersion.ReleaseLabels[0].Label); - Assert.False(parsedVersion.ReleaseLabels[0].IsNumeric); - - Assert.Equal("b", parsedVersion.ReleaseLabels[1].Label); - Assert.False(parsedVersion.ReleaseLabels[1].IsNumeric); - - Assert.Equal("c", parsedVersion.ReleaseLabels[2].Label); - Assert.False(parsedVersion.ReleaseLabels[2].IsNumeric); - - Assert.Equal("d", parsedVersion.ReleaseLabels[3].Label); - Assert.False(parsedVersion.ReleaseLabels[3].IsNumeric); - - Assert.Equal("5", parsedVersion.ReleaseLabels[4].Label); - Assert.True(parsedVersion.ReleaseLabels[4].IsNumeric); - Assert.Equal(5u, parsedVersion.ReleaseLabels[4].Value); - } - - private static long VersionToLong(Version version) - { - // In Windows, each version component has a max value of 65535, - // so we truncate the version before shifting it, which will overflow if invalid. - long major = (long)(ushort)version.Major << 48; - long minor = (long)(ushort)version.Minor << 32; - long build = (long)(ushort)version.Build << 16; - long revision = (long)(ushort)version.Revision; - - return major | minor | build | revision; - } - } -} diff --git a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj b/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj deleted file mode 100644 index 21b9cfdc..00000000 --- a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.csproj +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - net6.0 - win-x86 - false - true - - - - - - - - - - diff --git a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject b/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject deleted file mode 100644 index 7b5b2139..00000000 --- a/src/api/burn/test/WixToolsetTest.Mba.Core/WixToolsetTest.Mba.Core.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - True - - \ No newline at end of file diff --git a/src/burn/engine/engine.vcxproj b/src/burn/engine/engine.vcxproj index a897140d..73985d51 100644 --- a/src/burn/engine/engine.vcxproj +++ b/src/burn/engine/engine.vcxproj @@ -42,7 +42,7 @@ - ..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;$(BurnGeneratedHeaderDirectory);$(ProjectAdditionalIncludeDirectories) + ..\..\api\burn\inc;$(BurnGeneratedHeaderDirectory);$(ProjectAdditionalIncludeDirectories) @@ -102,10 +102,10 @@ - - - - + + + + diff --git a/src/burn/engine/precomp.h b/src/burn/engine/precomp.h index 24a01140..3b9693ff 100644 --- a/src/burn/engine/precomp.h +++ b/src/burn/engine/precomp.h @@ -62,8 +62,6 @@ #include #include "BootstrapperApplication.h" - -#include "BundleExtensionEngine.h" #include "BundleExtension.h" #include "platform.h" diff --git a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj index 46708c26..331d237b 100644 --- a/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj +++ b/src/burn/test/BurnUnitTest/BurnUnitTest.vcxproj @@ -39,7 +39,7 @@ - $(ProjectAdditionalIncludeDirectories);$(BurnGeneratedHeaderDirectory);..\..\engine;..\..\..\api\burn\WixToolset.BootstrapperCore.Native\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc + $(ProjectAdditionalIncludeDirectories);$(BurnGeneratedHeaderDirectory);..\..\engine;..\..\..\api\burn\inc;..\..\..\libs\dutil\WixToolset.Dutil\inc cabinet.lib;crypt32.lib;msi.lib;rpcrt4.lib;shlwapi.lib;userenv.lib;wininet.lib;wintrust.lib;$(RootBuildFolder)libs\$(Configuration)\$(WixNativeSdkLibraryToolset)\$(PlatformTarget)\dutil.lib;engine.res diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml index e15ae0b3..b75899cc 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/BundlePackage_Multiple_manifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml index 12648bf6..680f6c5f 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/ExePackage_PerUserArpEntry_manifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml index 1ebf0062..bfe1dfee 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Failure_BundleD_manifest.xml @@ -10,7 +10,7 @@ - + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml index abf1b03a..c5ca03b6 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_manifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml index 96c6b173..52091ebd 100644 --- a/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml +++ b/src/burn/test/BurnUnitTest/TestData/PlanTest/Slipstream_BundleA_modified_manifest.xml @@ -9,7 +9,7 @@ - + diff --git a/src/burn/test/BurnUnitTest/precomp.h b/src/burn/test/BurnUnitTest/precomp.h index 1b297429..0f98480a 100644 --- a/src/burn/test/BurnUnitTest/precomp.h +++ b/src/burn/test/BurnUnitTest/precomp.h @@ -38,7 +38,6 @@ #include #include "BootstrapperApplication.h" -#include "BundleExtensionEngine.h" #include "BundleExtension.h" #include "platform.h" diff --git a/src/clean.cmd b/src/clean.cmd index 3bc95dd5..f2f10cd3 100644 --- a/src/clean.cmd +++ b/src/clean.cmd @@ -21,9 +21,8 @@ if exist "%_NUGET_CACHE%\wixinternal.basebuildtasks.sources" rd /s/q "%_NUGET_CA if exist "%_NUGET_CACHE%\wixinternal.testsupport" rd /s/q "%_NUGET_CACHE%\wixinternal.testsupport" if exist "%_NUGET_CACHE%\wixinternal.core.testpackage" rd /s/q "%_NUGET_CACHE%\wixinternal.core.testpackage" if exist "%_NUGET_CACHE%\wixtoolset.bal.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.bal.wixext" -if exist "%_NUGET_CACHE%\wixtoolset.balutil" rd /s/q "%_NUGET_CACHE%\wixtoolset.balutil" +if exist "%_NUGET_CACHE%\wixtoolset.bootstrapperapplications.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.bootstrapperapplications.wixext" if exist "%_NUGET_CACHE%\wixtoolset.bextutil" rd /s/q "%_NUGET_CACHE%\wixtoolset.bextutil" -if exist "%_NUGET_CACHE%\wixtoolset.bootstrappercore.native" rd /s/q "%_NUGET_CACHE%\wixtoolset.bootstrappercore.native" if exist "%_NUGET_CACHE%\wixtoolset.burn" rd /s/q "%_NUGET_CACHE%\wixtoolset.burn" if exist "%_NUGET_CACHE%\wixtoolset.complus.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.complus.wixext" if exist "%_NUGET_CACHE%\wixtoolset.converters" rd /s/q "%_NUGET_CACHE%\wixtoolset.converters" @@ -49,7 +48,7 @@ if exist "%_NUGET_CACHE%\wixtoolset.firewall.wixext" rd /s/q "%_NUGET_CACHE%\wix if exist "%_NUGET_CACHE%\wixtoolset.heat" rd /s/q "%_NUGET_CACHE%\wixtoolset.heat" if exist "%_NUGET_CACHE%\wixtoolset.http.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.http.wixext" if exist "%_NUGET_CACHE%\wixtoolset.iis.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.iis.wixext" -if exist "%_NUGET_CACHE%\wixtoolset.mba.core" rd /s/q "%_NUGET_CACHE%\wixtoolset.mba.core" +if exist "%_NUGET_CACHE%\wixtoolset.bootstrapperapplicationapi" rd /s/q "%_NUGET_CACHE%\wixtoolset.bootstrapperapplicationapi" if exist "%_NUGET_CACHE%\wixtoolset.msmq.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.msmq.wixext" if exist "%_NUGET_CACHE%\wixtoolset.netfx.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.netfx.wixext" if exist "%_NUGET_CACHE%\wixtoolset.powershell.wixext" rd /s/q "%_NUGET_CACHE%\wixtoolset.powershell.wixext" diff --git a/src/ext/Bal/Bal.wixext.sln b/src/ext/Bal/Bal.wixext.sln index f341a7be..48eb190e 100644 --- a/src/ext/Bal/Bal.wixext.sln +++ b/src/ext/Bal/Bal.wixext.sln @@ -7,11 +7,11 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "bafunctions", "Samples\bafu EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixstdba", "wixstdba\wixstdba.vcxproj", "{41085A22-E6AA-4E8B-AB1B-DDEE0DC89DFA}" EndProject -Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "bal", "wixlib\bal.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}" +Project("{930C7802-8A8C-48F9-8165-68863BCCD9DD}") = "bas", "wixlib\bas.wixproj", "{3444D952-F21C-496F-AB6B-56435BFD0787}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Bal.wixext", "wixext\WixToolset.Bal.wixext.csproj", "{BF720A63-9D7B-456E-B60C-8122852D9FED}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.BootstrapperApplications.wixext", "wixext\WixToolset.BootstrapperApplications.wixext.csproj", "{BF720A63-9D7B-456E-B60C-8122852D9FED}" EndProject -Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.Bal", "test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}" +Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BootstrapperApplications", "test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj", "{89D479FC-20DA-44D8-AE38-48F063223498}" EndProject Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "wixiuiba", "wixiuiba\wixiuiba.vcxproj", "{0F73E566-925C-448D-99CB-3A7F5DF399C8}" EndProject diff --git a/src/ext/Bal/README.md b/src/ext/Bal/README.md index cc5d9b34..4a14b1a2 100644 --- a/src/ext/Bal/README.md +++ b/src/ext/Bal/README.md @@ -1,2 +1,2 @@ -# Bal.wixext -WixToolset.Bal.wixext - Bootstrapper Application Layer WiX Toolset Extension +# WixToolset.BootstrapperApplications.wixext +WixToolset.BootstrapperApplications.wixext - Bootstrapper Applications WiX Toolset Extension diff --git a/src/ext/Bal/Samples/bafunctions/bafunctions.vcxproj b/src/ext/Bal/Samples/bafunctions/bafunctions.vcxproj index 7e41313f..13ead500 100644 --- a/src/ext/Bal/Samples/bafunctions/bafunctions.vcxproj +++ b/src/ext/Bal/Samples/bafunctions/bafunctions.vcxproj @@ -60,7 +60,7 @@ - + diff --git a/src/ext/Bal/bal.cmd b/src/ext/Bal/bal.cmd index 23a53a91..7a48f6fc 100644 --- a/src/ext/Bal/bal.cmd +++ b/src/ext/Bal/bal.cmd @@ -17,31 +17,34 @@ @if "%_INC%"=="" call :clean @if NOT "%_CLEAN%"=="" goto :end -@echo Building ext\Bal %_C% using %_N% +@echo Building ext\BootstrapperApplications %_C% using %_N% :: Restore :: Build -msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.Bal\WixToolsetTest.Bal.csproj -bl:%_L%\ext_bal_build.binlog || exit /b +msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\WixToolsetTest.BootstrapperApplications\WixToolsetTest.BootstrapperApplications.csproj -bl:%_L%\ext_bal_build.binlog || exit /b msbuild -Restore -p:Configuration=%_C% -tl -nologo -m -warnaserror test\examples\examples.proj -bl:%_L%\bal_examples_build.binlog || exit /b :: Test dotnet test ^ - %_B%\net6.0\WixToolsetTest.Bal.dll ^ + %_B%\net6.0\WixToolsetTest.BootstrapperApplications.dll ^ --nologo -l "trx;LogFileName=%_L%\TestResults\bal.wixext.trx" || exit /b :: Pack -msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.Bal.wixext.csproj || exit /b +msbuild -t:Pack -p:Configuration=%_C% -tl -nologo -warnaserror -p:NoBuild=true wixext\WixToolset.BootstrapperApplications.wixext.csproj || exit /b +msbuild -t:Pack -Restore -p:Configuration=%_C% -tl -nologo -warnaserror wixext-backward-compatible\WixToolset.Bal.wixext.csproj || exit /b @goto :end :clean @rd /s/q "..\..\..\build\Bal.wixext" 2> nul @del "..\..\..\build\artifacts\WixToolset.Bal.wixext.*.nupkg" 2> nul +@del "..\..\..\build\artifacts\WixToolset.BootstrapperApplications.wixext.*.nupkg" 2> nul @del "%_L%\ext_bal_build.binlog" 2> nul @del "%_L%\TestResults\bal.wixext.trx" 2> nul @rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bal.wixext" 2> nul +@rd /s/q "%USERPROFILE%\.nuget\packages\wixtoolset.bootstrapperapplications.wixext" 2> nul @exit /b :end diff --git a/src/ext/Bal/stdbas/stdbas.vcxproj b/src/ext/Bal/stdbas/stdbas.vcxproj index 3722b40a..c9b1451b 100644 --- a/src/ext/Bal/stdbas/stdbas.vcxproj +++ b/src/ext/Bal/stdbas/stdbas.vcxproj @@ -71,7 +71,7 @@ rc.exe -fo "$(OutDir)stdbas.res" "$(IntDir)stdbas.messages.rc" - + diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs deleted file mode 100644 index 217fdfb1..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/BalExtensionFixture.cs +++ /dev/null @@ -1,262 +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 WixToolsetTest.Bal -{ - using System; - using System.IO; - using System.Linq; - using System.Xml; - using WixToolset.Bal; - using WixInternal.Core.TestPackage; - using WixInternal.TestSupport; - using Xunit; - - public class BalExtensionFixture - { - [Fact] - public void CanBuildUsingDisplayInternalUICondition() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "DisplayInternalUIConditionBundle.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", Path.Combine(bundleSourceFolder, "data"), - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); - WixAssert.CompareLineByLine(new string[] - { - "", - }, balPackageInfos); - - Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); - } - } - - [Fact] - public void CanBuildUsingOverridable() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\Overridable"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "Bundle.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balCommandLines = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixStdbaCommandLine"); - WixAssert.CompareLineByLine(new[] - { - "", - }, balCommandLines); - - var balOverridableVariables = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixStdbaOverridableVariable"); - WixAssert.CompareLineByLine(new[] - { - "", - }, balOverridableVariables); - } - } - - [Fact] - public void CanBuildUsingWixStdBa() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "Bundle.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - } - } - - //[Fact] - //public void CanBuildUsingMBAWithAlwaysInstallPrereqs() - //{ - // using (var fs = new DisposableFileSystem()) - // { - // var baseFolder = fs.GetFolder(); - // var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - // var bundleSourceFolder = TestData.Get("TestData", "MBA"); - // var intermediateFolder = Path.Combine(baseFolder, "obj"); - // var baFolderPath = Path.Combine(baseFolder, "ba"); - // var extractFolderPath = Path.Combine(baseFolder, "extract"); - - // var compileResult = WixRunner.Execute(new[] - // { - // "build", - // Path.Combine(bundleSourceFolder, "AlwaysInstallPrereqsBundle.wxs"), - // "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - // "-intermediateFolder", intermediateFolder, - // "-o", bundleFile, - // }); - - // compileResult.AssertSuccess(); - - // Assert.True(File.Exists(bundleFile)); - - // var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - // extractResult.AssertSuccess(); - - // var wixPrereqOptionsElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqOptions"); - // WixAssert.CompareLineByLine(new[] - // { - // "", - // }, wixPrereqOptionsElements); - - // var wixPrereqInformationElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); - // WixAssert.CompareLineByLine(new[] - // { - // "", - // }, wixPrereqInformationElements); - // } - //} - - [Fact] - public void CannotBuildUsingMBAWithNoPrereqs() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData", "MBA"); - var dataFolder = TestData.Get(@"TestData", ".Data"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "Bundle.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", dataFolder, - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "The WixManagedBootstrapperApplicationHost element has been deprecated.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - Assert.Equal(1130, compileResult.ExitCode); - - Assert.False(File.Exists(bundleFile)); - Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); - } - } - - [Fact] - public void CannotBuildUsingDncbaMissingBAFactoryPayload() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\Dncba"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "Bundle.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "The WixDotNetCoreBootstrapperApplicationHost element has been deprecated.", - "The BootstrapperApplication element's Name or SourceFile attribute was not found; one of these is required." - }, compileResult.Messages.Select(x => x.ToString()).ToArray()); - Assert.Equal(44, compileResult.ExitCode); - - Assert.False(File.Exists(bundleFile)); - Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); - } - } - - [Fact] - public void CannotBuildUsingOverridableWrongCase() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var result = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "Overridable", "WrongCaseBundle.wxs"), - "-loc", Path.Combine(bundleSourceFolder, "Overridable", "WrongCaseBundle.wxl"), - "-bindpath", Path.Combine(bundleSourceFolder, "WixStdBa", "Data"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", bundleFile, - }); - - Assert.InRange(result.ExitCode, 2, Int32.MaxValue); - - var messages = result.Messages.Select(m => m.ToString()).ToList(); - messages.Sort(); - - WixAssert.CompareLineByLine(new[] - { - "bal:Condition/@Condition contains the built-in Variable 'WixBundleAction', which is not available when it is evaluated. (Unavailable Variables are: 'WixBundleAction'.). Rewrite the condition to avoid Variables that are never valid during its evaluation.", - "Overridable variable 'TEST1' collides with 'Test1' with Bundle/@CommandLineVariables value 'caseInsensitive'.", - "The *Package/@bal:DisplayInternalUICondition attribute's value '=' is not a valid bundle condition.", - "The location of the Variable related to the previous error.", - }, messages.ToArray()); - } - } - } -} diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs b/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs deleted file mode 100644 index 22e2fec1..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/InternalUIBAFixture.cs +++ /dev/null @@ -1,519 +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 WixToolsetTest.Bal -{ - using System; - using System.IO; - using System.Linq; - using WixInternal.TestSupport; - using WixInternal.Core.TestPackage; - using Xunit; - - public class InternalUIBAFixture - { - [Fact] - public void CanBuildUsingWixIuiBa() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "SinglePrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); - WixAssert.CompareLineByLine(new string[] - { - "", - }, balPackageInfos); - - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); - } - } - - [Fact] - public void CanBuildUsingWixIuiBaWithUrlPrereqPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "UrlPrereqPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); - WixAssert.CompareLineByLine(new string[] - { - "", - }, balPackageInfos); - - var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); - WixAssert.CompareLineByLine(new[] - { - "", - }, mbaPrereqInfos); - - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); - } - } - - [Fact] - public void CanBuildUsingWixIuiBaWithImplicitPrimaryPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "ImplicitPrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); - WixAssert.CompareLineByLine(new string[] - { - "", - }, balPackageInfos); - - var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); - WixAssert.CompareLineByLine(new[] - { - "", - }, mbaPrereqInfos); - - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); - } - } - - [Fact] - public void CanBuildUsingWixIuiBaWithWarnings() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - var baFolderPath = Path.Combine(baseFolder, "ba"); - var extractFolderPath = Path.Combine(baseFolder, "extract"); - - var compileResult = WixRunner.Execute(warningsAsErrors: false, new[] - { - "build", - Path.Combine(bundleSourceFolder, "IuiBaWarnings.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "WixInternalUIBootstrapperApplication does not support the value of 'force' for Cache on prereq packages. Prereq packages are only cached when they need to be installed.", - "WixInternalUIBootstrapperApplication ignores InstallCondition for the primary package so that the MSI UI is always shown.", - "WixInternalUIBootstrapperApplication ignores DisplayInternalUICondition for the primary package so that the MSI UI is always shown.", - "When using WixInternalUIBootstrapperApplication, all prereq packages should be before the primary package in the chain. The prereq packages are always installed before the primary package.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - compileResult.AssertSuccess(); - - Assert.True(File.Exists(bundleFile)); - - var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); - extractResult.AssertSuccess(); - - var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); - WixAssert.CompareLineByLine(new string[] - { - "", - }, balPackageInfos); - - var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); - WixAssert.CompareLineByLine(new[] - { - "", - }, mbaPrereqInfos); - - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); - Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithAllPrereqPackages() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "AllPrereqPackages.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6808, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithImplicitNonMsiPrimaryPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "ImplicitNonMsiPrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6811, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithImplicitPrimaryPackageEnableFeatureSelection() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "ImplicitPrimaryPackageEnableFeatureSelection.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6811, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithMultipleNonPermanentNonPrimaryPackages() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "MultipleNonPermanentNonPrimaryPackages.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", - "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6811, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithMultiplePrimaryPackagesOfSameType() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "MultipleDefaultPrimaryPackages.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "There may only be one package in the bundle with PrimaryPackageType of 'default'.", - "The location of the package related to the previous error.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6810, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithNoDefaultPrimaryPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "NoDefaultPrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6808, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithNonMsiPrimaryPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "NonMsiPrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, each primary package must be an MsiPackage.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6814, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithNonPermanentPrereqPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "NonPermanentPrereqPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication and bal:PrereqPackage is set to 'yes', the package must be permanent.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6812, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithPermanentPrimaryPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "PermanentPrimaryPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, packages with the bal:PrimaryPackageType attribute must not be permanent.", - "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6808, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithPrimaryPackageEnableFeatureSelection() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "PrimaryPackageEnableFeatureSelection.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), - "-o", bundleFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "When using WixInternalUIBootstrapperApplication, primary packages must not have feature selection enabled because it interferes with the user selecting feature through the MSI UI.", - "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(6808, compileResult.ExitCode); - } - } - - [Fact] - public void CannotBuildUsingWixIuiBaWithPrimaryPrereqPackage() - { - using (var fs = new DisposableFileSystem()) - { - var baseFolder = fs.GetFolder(); - var wixlibFile = Path.Combine(baseFolder, "bin", "test.wixlib"); - var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); - var intermediateFolder = Path.Combine(baseFolder, "obj"); - - var compileResult = WixRunner.Execute(new[] - { - "build", - Path.Combine(bundleSourceFolder, "PrimaryPrereqPackage.wxs"), - "-ext", TestData.Get(@"WixToolset.Bal.wixext.dll"), - "-intermediateFolder", intermediateFolder, - "-o", wixlibFile, - }); - - WixAssert.CompareLineByLine(new[] - { - "The MsiPackage/@PrereqPackage attribute's value, 'yes', cannot be specified with attribute PrimaryPackageType present.", - }, compileResult.Messages.Select(m => m.ToString()).ToArray()); - - Assert.Equal(193, compileResult.ExitCode); - } - } - } -} diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe deleted file mode 100644 index f27639e9..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/.Data/fake.exe +++ /dev/null @@ -1 +0,0 @@ -This is fake.exe \ No newline at end of file diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs deleted file mode 100644 index 5b25da8c..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Dncba/Bundle.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/AlwaysInstallPrereqsBundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/AlwaysInstallPrereqsBundle.wxs deleted file mode 100644 index 685fef7b..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/AlwaysInstallPrereqsBundle.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs deleted file mode 100644 index 59be4bd4..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/MBA/Bundle.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs deleted file mode 100644 index 1274826f..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/Bundle.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxl b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxl deleted file mode 100644 index 0667c3cb..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxl +++ /dev/null @@ -1,4 +0,0 @@ - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxs deleted file mode 100644 index 67dfc589..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/Overridable/WrongCaseBundle.wxs +++ /dev/null @@ -1,16 +0,0 @@ - - - - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/AllPrereqPackages.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/AllPrereqPackages.wxs deleted file mode 100644 index 17f1ee77..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/AllPrereqPackages.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs deleted file mode 100644 index ca1f9358..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs deleted file mode 100644 index 16a99e92..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs deleted file mode 100644 index 85b9df65..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/IuibaWarnings.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/IuibaWarnings.wxs deleted file mode 100644 index 2cf9787d..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/IuibaWarnings.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs deleted file mode 100644 index 11736fbb..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs deleted file mode 100644 index c5b923df..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs deleted file mode 100644 index 7f7528d0..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs deleted file mode 100644 index a6f93bcb..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs deleted file mode 100644 index a60943b0..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PermanentPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PermanentPrimaryPackage.wxs deleted file mode 100644 index 43caaf86..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PermanentPrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs deleted file mode 100644 index 4f1c40dd..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPrereqPackage.wxs deleted file mode 100644 index bdb8c470..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/PrimaryPrereqPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/SinglePrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/SinglePrimaryPackage.wxs deleted file mode 100644 index 1e9a87c2..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/SinglePrimaryPackage.wxs +++ /dev/null @@ -1,13 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/UrlPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/UrlPrereqPackage.wxs deleted file mode 100644 index 0c68908c..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixIuiBa/UrlPrereqPackage.wxs +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs deleted file mode 100644 index c17b53ff..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Bundle.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi deleted file mode 100644 index 94aacd1a..00000000 Binary files a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/Data/test.msi and /dev/null differ diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs b/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs deleted file mode 100644 index f08cfe6a..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj b/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj deleted file mode 100644 index 644fb625..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.csproj +++ /dev/null @@ -1,25 +0,0 @@ - - - - - - net6.0 - true - - - - - - - - - - - - - - - - - - diff --git a/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject b/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject deleted file mode 100644 index 7b5b2139..00000000 --- a/src/ext/Bal/test/WixToolsetTest.Bal/WixToolsetTest.Bal.v3.ncrunchproject +++ /dev/null @@ -1,5 +0,0 @@ - - - True - - \ No newline at end of file diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs new file mode 100644 index 00000000..a9460008 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/BalExtensionFixture.cs @@ -0,0 +1,262 @@ +// 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 WixToolsetTest.BootstrapperApplications +{ + using System; + using System.IO; + using System.Linq; + using System.Xml; + using WixToolset.BootstrapperApplications; + using WixInternal.Core.TestPackage; + using WixInternal.TestSupport; + using Xunit; + + public class BalExtensionFixture + { + [Fact] + public void CanBuildUsingDisplayInternalUICondition() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "DisplayInternalUIConditionBundle.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", Path.Combine(bundleSourceFolder, "data"), + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); + WixAssert.CompareLineByLine(new string[] + { + "", + }, balPackageInfos); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "thm.wxl"))); + } + } + + [Fact] + public void CanBuildUsingOverridable() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\Overridable"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balCommandLines = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixStdbaCommandLine"); + WixAssert.CompareLineByLine(new[] + { + "", + }, balCommandLines); + + var balOverridableVariables = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixStdbaOverridableVariable"); + WixAssert.CompareLineByLine(new[] + { + "", + }, balOverridableVariables); + } + } + + [Fact] + public void CanBuildUsingWixStdBa() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixStdBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + } + } + + //[Fact] + //public void CanBuildUsingMBAWithAlwaysInstallPrereqs() + //{ + // using (var fs = new DisposableFileSystem()) + // { + // var baseFolder = fs.GetFolder(); + // var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + // var bundleSourceFolder = TestData.Get("TestData", "MBA"); + // var intermediateFolder = Path.Combine(baseFolder, "obj"); + // var baFolderPath = Path.Combine(baseFolder, "ba"); + // var extractFolderPath = Path.Combine(baseFolder, "extract"); + + // var compileResult = WixRunner.Execute(new[] + // { + // "build", + // Path.Combine(bundleSourceFolder, "AlwaysInstallPrereqsBundle.wxs"), + // "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + // "-intermediateFolder", intermediateFolder, + // "-o", bundleFile, + // }); + + // compileResult.AssertSuccess(); + + // Assert.True(File.Exists(bundleFile)); + + // var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + // extractResult.AssertSuccess(); + + // var wixPrereqOptionsElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqOptions"); + // WixAssert.CompareLineByLine(new[] + // { + // "", + // }, wixPrereqOptionsElements); + + // var wixPrereqInformationElements = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); + // WixAssert.CompareLineByLine(new[] + // { + // "", + // }, wixPrereqInformationElements); + // } + //} + + [Fact] + public void CannotBuildUsingMBAWithNoPrereqs() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData", "MBA"); + var dataFolder = TestData.Get(@"TestData", ".Data"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", dataFolder, + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "The WixManagedBootstrapperApplicationHost element has been deprecated.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + Assert.Equal(1130, compileResult.ExitCode); + + Assert.False(File.Exists(bundleFile)); + Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); + } + } + + [Fact] + public void CannotBuildUsingDncbaMissingBAFactoryPayload() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\Dncba"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Bundle.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "The WixDotNetCoreBootstrapperApplicationHost element has been deprecated.", + "The BootstrapperApplication element's Name or SourceFile attribute was not found; one of these is required." + }, compileResult.Messages.Select(x => x.ToString()).ToArray()); + Assert.Equal(44, compileResult.ExitCode); + + Assert.False(File.Exists(bundleFile)); + Assert.False(File.Exists(Path.Combine(intermediateFolder, "test.exe"))); + } + } + + [Fact] + public void CannotBuildUsingOverridableWrongCase() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "Overridable", "WrongCaseBundle.wxs"), + "-loc", Path.Combine(bundleSourceFolder, "Overridable", "WrongCaseBundle.wxl"), + "-bindpath", Path.Combine(bundleSourceFolder, "WixStdBa", "Data"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", bundleFile, + }); + + Assert.InRange(result.ExitCode, 2, Int32.MaxValue); + + var messages = result.Messages.Select(m => m.ToString()).ToList(); + messages.Sort(); + + WixAssert.CompareLineByLine(new[] + { + "bal:Condition/@Condition contains the built-in Variable 'WixBundleAction', which is not available when it is evaluated. (Unavailable Variables are: 'WixBundleAction'.). Rewrite the condition to avoid Variables that are never valid during its evaluation.", + "Overridable variable 'TEST1' collides with 'Test1' with Bundle/@CommandLineVariables value 'caseInsensitive'.", + "The *Package/@bal:DisplayInternalUICondition attribute's value '=' is not a valid bundle condition.", + "The location of the Variable related to the previous error.", + }, messages.ToArray()); + } + } + } +} diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs new file mode 100644 index 00000000..7e64c13f --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/InternalUIBAFixture.cs @@ -0,0 +1,519 @@ +// 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 WixToolsetTest.BootstrapperApplications +{ + using System; + using System.IO; + using System.Linq; + using WixInternal.TestSupport; + using WixInternal.Core.TestPackage; + using Xunit; + + public class InternalUIBAFixture + { + [Fact] + public void CanBuildUsingWixIuiBa() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "SinglePrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); + WixAssert.CompareLineByLine(new string[] + { + "", + }, balPackageInfos); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); + } + } + + [Fact] + public void CanBuildUsingWixIuiBaWithUrlPrereqPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "UrlPrereqPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); + WixAssert.CompareLineByLine(new string[] + { + "", + }, balPackageInfos); + + var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); + WixAssert.CompareLineByLine(new[] + { + "", + }, mbaPrereqInfos); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); + } + } + + [Fact] + public void CanBuildUsingWixIuiBaWithImplicitPrimaryPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "ImplicitPrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); + WixAssert.CompareLineByLine(new string[] + { + "", + }, balPackageInfos); + + var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); + WixAssert.CompareLineByLine(new[] + { + "", + }, mbaPrereqInfos); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); + } + } + + [Fact] + public void CanBuildUsingWixIuiBaWithWarnings() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var baFolderPath = Path.Combine(baseFolder, "ba"); + var extractFolderPath = Path.Combine(baseFolder, "extract"); + + var compileResult = WixRunner.Execute(warningsAsErrors: false, new[] + { + "build", + Path.Combine(bundleSourceFolder, "IuiBaWarnings.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "WixInternalUIBootstrapperApplication does not support the value of 'force' for Cache on prereq packages. Prereq packages are only cached when they need to be installed.", + "WixInternalUIBootstrapperApplication ignores InstallCondition for the primary package so that the MSI UI is always shown.", + "WixInternalUIBootstrapperApplication ignores DisplayInternalUICondition for the primary package so that the MSI UI is always shown.", + "When using WixInternalUIBootstrapperApplication, all prereq packages should be before the primary package in the chain. The prereq packages are always installed before the primary package.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + compileResult.AssertSuccess(); + + Assert.True(File.Exists(bundleFile)); + + var extractResult = BundleExtractor.ExtractBAContainer(null, bundleFile, baFolderPath, extractFolderPath); + extractResult.AssertSuccess(); + + var balPackageInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixBalPackageInfo"); + WixAssert.CompareLineByLine(new string[] + { + "", + }, balPackageInfos); + + var mbaPrereqInfos = extractResult.GetBADataTestXmlLines("/ba:BootstrapperApplicationData/ba:WixPrereqInformation"); + WixAssert.CompareLineByLine(new[] + { + "", + }, mbaPrereqInfos); + + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.thm"))); + Assert.True(File.Exists(Path.Combine(baFolderPath, "wixpreq.wxl"))); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithAllPrereqPackages() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "AllPrereqPackages.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6808, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithImplicitNonMsiPrimaryPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "ImplicitNonMsiPrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6811, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithImplicitPrimaryPackageEnableFeatureSelection() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "ImplicitPrimaryPackageEnableFeatureSelection.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6811, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithMultipleNonPermanentNonPrimaryPackages() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "MultipleNonPermanentNonPrimaryPackages.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", + "When using WixInternalUIBootstrapperApplication, packages must either be non-permanent and have the bal:PrimaryPackageType attribute, or be permanent and have the bal:PrereqPackage attribute set to 'yes'.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6811, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithMultiplePrimaryPackagesOfSameType() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "MultipleDefaultPrimaryPackages.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "There may only be one package in the bundle with PrimaryPackageType of 'default'.", + "The location of the package related to the previous error.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6810, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithNoDefaultPrimaryPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "NoDefaultPrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6808, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithNonMsiPrimaryPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "NonMsiPrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, each primary package must be an MsiPackage.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6814, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithNonPermanentPrereqPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "NonPermanentPrereqPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication and bal:PrereqPackage is set to 'yes', the package must be permanent.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6812, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithPermanentPrimaryPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "PermanentPrimaryPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, packages with the bal:PrimaryPackageType attribute must not be permanent.", + "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6808, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithPrimaryPackageEnableFeatureSelection() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var bundleFile = Path.Combine(baseFolder, "bin", "test.exe"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "PrimaryPackageEnableFeatureSelection.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-bindpath", TestData.Get(@"TestData\WixStdBa\Data"), + "-o", bundleFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "When using WixInternalUIBootstrapperApplication, primary packages must not have feature selection enabled because it interferes with the user selecting feature through the MSI UI.", + "When using WixInternalUIBootstrapperApplication, there must be one package with bal:PrimaryPackageType=\"default\".", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(6808, compileResult.ExitCode); + } + } + + [Fact] + public void CannotBuildUsingWixIuiBaWithPrimaryPrereqPackage() + { + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var wixlibFile = Path.Combine(baseFolder, "bin", "test.wixlib"); + var bundleSourceFolder = TestData.Get(@"TestData\WixIuiBa"); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + + var compileResult = WixRunner.Execute(new[] + { + "build", + Path.Combine(bundleSourceFolder, "PrimaryPrereqPackage.wxs"), + "-ext", TestData.Get(@"WixToolset.BootstrapperApplications.wixext.dll"), + "-intermediateFolder", intermediateFolder, + "-o", wixlibFile, + }); + + WixAssert.CompareLineByLine(new[] + { + "The MsiPackage/@PrereqPackage attribute's value, 'yes', cannot be specified with attribute PrimaryPackageType present.", + }, compileResult.Messages.Select(m => m.ToString()).ToArray()); + + Assert.Equal(193, compileResult.ExitCode); + } + } + } +} diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/.Data/fake.exe b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/.Data/fake.exe new file mode 100644 index 00000000..f27639e9 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/.Data/fake.exe @@ -0,0 +1 @@ +This is fake.exe \ No newline at end of file diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Dncba/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Dncba/Bundle.wxs new file mode 100644 index 00000000..5b25da8c --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Dncba/Bundle.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/AlwaysInstallPrereqsBundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/AlwaysInstallPrereqsBundle.wxs new file mode 100644 index 00000000..685fef7b --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/AlwaysInstallPrereqsBundle.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/Bundle.wxs new file mode 100644 index 00000000..59be4bd4 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/MBA/Bundle.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/Bundle.wxs new file mode 100644 index 00000000..1274826f --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/Bundle.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxl b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxl new file mode 100644 index 00000000..0667c3cb --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxl @@ -0,0 +1,4 @@ + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs new file mode 100644 index 00000000..67dfc589 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/Overridable/WrongCaseBundle.wxs @@ -0,0 +1,16 @@ + + + + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/AllPrereqPackages.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/AllPrereqPackages.wxs new file mode 100644 index 00000000..17f1ee77 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/AllPrereqPackages.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs new file mode 100644 index 00000000..ca1f9358 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitNonMsiPrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs new file mode 100644 index 00000000..16a99e92 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs new file mode 100644 index 00000000..85b9df65 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/ImplicitPrimaryPackageEnableFeatureSelection.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs new file mode 100644 index 00000000..2cf9787d --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/IuibaWarnings.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs new file mode 100644 index 00000000..11736fbb --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleDefaultPrimaryPackages.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs new file mode 100644 index 00000000..c5b923df --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/MultipleNonPermanentNonPrimaryPackages.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs new file mode 100644 index 00000000..7f7528d0 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NoDefaultPrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs new file mode 100644 index 00000000..a6f93bcb --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonMsiPrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs new file mode 100644 index 00000000..a60943b0 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/NonPermanentPrereqPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PermanentPrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PermanentPrimaryPackage.wxs new file mode 100644 index 00000000..43caaf86 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PermanentPrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs new file mode 100644 index 00000000..4f1c40dd --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPackageEnableFeatureSelection.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPrereqPackage.wxs new file mode 100644 index 00000000..bdb8c470 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/PrimaryPrereqPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/SinglePrimaryPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/SinglePrimaryPackage.wxs new file mode 100644 index 00000000..1e9a87c2 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/SinglePrimaryPackage.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/UrlPrereqPackage.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/UrlPrereqPackage.wxs new file mode 100644 index 00000000..0c68908c --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixIuiBa/UrlPrereqPackage.wxs @@ -0,0 +1,19 @@ + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Bundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Bundle.wxs new file mode 100644 index 00000000..c17b53ff --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Bundle.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Data/test.msi b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Data/test.msi new file mode 100644 index 00000000..94aacd1a Binary files /dev/null and b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/Data/test.msi differ diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs new file mode 100644 index 00000000..f08cfe6a --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/TestData/WixStdBa/DisplayInternalUIConditionBundle.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj new file mode 100644 index 00000000..64fc297c --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.csproj @@ -0,0 +1,25 @@ + + + + + + net6.0 + true + + + + + + + + + + + + + + + + + + diff --git a/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.v3.ncrunchproject b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.v3.ncrunchproject new file mode 100644 index 00000000..7b5b2139 --- /dev/null +++ b/src/ext/Bal/test/WixToolsetTest.BootstrapperApplications/WixToolsetTest.BootstrapperApplications.v3.ncrunchproject @@ -0,0 +1,5 @@ + + + True + + \ No newline at end of file diff --git a/src/ext/Bal/test/examples/Directory.wixproj.targets b/src/ext/Bal/test/examples/Directory.wixproj.targets index f126c632..a50ebcf4 100644 --- a/src/ext/Bal/test/examples/Directory.wixproj.targets +++ b/src/ext/Bal/test/examples/Directory.wixproj.targets @@ -3,6 +3,6 @@ - + diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs index bb83568f..3d92eb55 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDD/FrameworkDependentBundle.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs index ca3d4cf0..071b21fc 100644 --- a/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/EarliestCoreBundleFDDx86/FrameworkDependentBundle.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs index 490f4051..2e92f911 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/EarliestCoreBA.cs @@ -2,7 +2,7 @@ namespace Example.EarliestCoreMBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class EarliestCoreBA : BootstrapperApplication { diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj index 958381c3..93ceb7d4 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Example.EarliestCoreMBA.csproj @@ -9,6 +9,6 @@ - + diff --git a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs index 11cc46f0..97d471bf 100644 --- a/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs +++ b/src/ext/Bal/test/examples/EarliestCoreMBA/Program.cs @@ -2,7 +2,7 @@ namespace Example.EarliestCoreMBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; internal class Program { diff --git a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs index 9ca93c7f..3bc823e9 100644 --- a/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework2Bundle/Bundle.wxs @@ -3,7 +3,7 @@ - + diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj index 7c4db8c1..ff4df6fb 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Example.FullFramework2MBA.csproj @@ -12,10 +12,6 @@ - - - - - + diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs index c6d478af..ab93a796 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs +++ b/src/ext/Bal/test/examples/FullFramework2MBA/FullFramework2BA.cs @@ -2,7 +2,7 @@ namespace Example.FullFramework2MBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class FullFramework2BA : BootstrapperApplication { diff --git a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs index 067fefe8..bfa62666 100644 --- a/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs +++ b/src/ext/Bal/test/examples/FullFramework2MBA/Program.cs @@ -2,7 +2,7 @@ namespace Example.FullFramework2MBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; internal class Program { diff --git a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs index 7cac54f2..48668c19 100644 --- a/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs +++ b/src/ext/Bal/test/examples/FullFramework4Bundle/Bundle.wxs @@ -4,7 +4,7 @@ - + diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj index 09665180..e17e7525 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Example.FullFramework4MBA.csproj @@ -11,6 +11,6 @@ - + diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs index 8a91195a..3c6fa13b 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs +++ b/src/ext/Bal/test/examples/FullFramework4MBA/FullFramework4BA.cs @@ -2,7 +2,7 @@ namespace Example.FullFramework4MBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class FullFramework4BA : BootstrapperApplication { diff --git a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs index 23fb6851..3e21a0fd 100644 --- a/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs +++ b/src/ext/Bal/test/examples/FullFramework4MBA/Program.cs @@ -2,7 +2,7 @@ namespace Example.FullFramework4MBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; internal class Program { diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs index 74f82d99..07fb4ac3 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDD/FrameworkDependentBundle.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs index ab40a543..928cfb3b 100644 --- a/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/LatestCoreBundleFDDx86/FrameworkDependentBundle.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj index c4d31151..96587d26 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Example.LatestCoreMBA.csproj @@ -9,6 +9,6 @@ - + diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs index bd5378eb..f3195bfe 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs +++ b/src/ext/Bal/test/examples/LatestCoreMBA/LatestCoreBA.cs @@ -2,7 +2,7 @@ namespace Example.LatestCoreMBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class LatestCoreBA : BootstrapperApplication { diff --git a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs index 94da360b..d8205b62 100644 --- a/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs +++ b/src/ext/Bal/test/examples/LatestCoreMBA/Program.cs @@ -2,7 +2,7 @@ namespace Example.LatestCoreMBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; internal class Program { diff --git a/src/ext/Bal/test/examples/TestEngine/Example.TestEngine.vcxproj b/src/ext/Bal/test/examples/TestEngine/Example.TestEngine.vcxproj index 42c51c9e..8a3b8120 100644 --- a/src/ext/Bal/test/examples/TestEngine/Example.TestEngine.vcxproj +++ b/src/ext/Bal/test/examples/TestEngine/Example.TestEngine.vcxproj @@ -61,7 +61,7 @@ - + diff --git a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs index e95fbba0..f35f9251 100644 --- a/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs +++ b/src/ext/Bal/test/examples/WPFCoreBundleFDD/FrameworkDependentBundle.wxs @@ -5,7 +5,7 @@ - + diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj index 279b498f..37639021 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Example.WPFCoreMBA.csproj @@ -9,6 +9,6 @@ - + diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs index 185e92cc..17a3a7ca 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs +++ b/src/ext/Bal/test/examples/WPFCoreMBA/Program.cs @@ -2,7 +2,7 @@ namespace Example.WPFCoreMBA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; // using WixToolset.BootstrapperApplications.Managed; public class Program diff --git a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs index 7bc06094..c9bcef23 100644 --- a/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs +++ b/src/ext/Bal/test/examples/WPFCoreMBA/WPFCoreBA.cs @@ -3,7 +3,7 @@ namespace Example.WPFCoreMBA { using System.Windows.Threading; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class WPFCoreBA : BootstrapperApplication { diff --git a/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.csproj b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.csproj new file mode 100644 index 00000000..91253621 --- /dev/null +++ b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.csproj @@ -0,0 +1,16 @@ + + + + + + + + net6.0 + false + WiX Toolset BootstrapperApplications extension + WiX Toolset BootstrapperApplications extension + WixToolset.Bal.wixext + $(OutputPath)netstandard2.0 + $(NuspecProperties);WixExtensionPackageFolder=$(WixExtensionPackageFolder) + + diff --git a/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.nuspec b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.nuspec new file mode 100644 index 00000000..7a681707 --- /dev/null +++ b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.nuspec @@ -0,0 +1,22 @@ + + + + $id$ + $version$ + $title$ + $description$ + $authors$ + wix.png + MS-RL + false + $copyright$ + $projectUrl$ + + + + + + + + + diff --git a/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.targets b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.targets new file mode 100644 index 00000000..8203d95b --- /dev/null +++ b/src/ext/Bal/wixext-backward-compatible/WixToolset.Bal.wixext.targets @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/src/ext/Bal/wixext/BalBurnBackendExtension.cs b/src/ext/Bal/wixext/BalBurnBackendExtension.cs index 84e4323e..82195549 100644 --- a/src/ext/Bal/wixext/BalBurnBackendExtension.cs +++ b/src/ext/Bal/wixext/BalBurnBackendExtension.cs @@ -1,13 +1,13 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Xml; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; using WixToolset.Data; using WixToolset.Data.Burn; using WixToolset.Data.Symbols; diff --git a/src/ext/Bal/wixext/BalCompiler.cs b/src/ext/Bal/wixext/BalCompiler.cs index 829da0e6..35c86233 100644 --- a/src/ext/Bal/wixext/BalCompiler.cs +++ b/src/ext/Bal/wixext/BalCompiler.cs @@ -1,11 +1,11 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using System.Collections.Generic; using System.Xml.Linq; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; using WixToolset.Data; using WixToolset.Data.Burn; using WixToolset.Data.Symbols; diff --git a/src/ext/Bal/wixext/BalErrors.cs b/src/ext/Bal/wixext/BalErrors.cs index 10986f0e..4c719091 100644 --- a/src/ext/Bal/wixext/BalErrors.cs +++ b/src/ext/Bal/wixext/BalErrors.cs @@ -1,6 +1,6 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using System.Resources; diff --git a/src/ext/Bal/wixext/BalExtensionData.cs b/src/ext/Bal/wixext/BalExtensionData.cs index 9dc99705..a005d695 100644 --- a/src/ext/Bal/wixext/BalExtensionData.cs +++ b/src/ext/Bal/wixext/BalExtensionData.cs @@ -1,6 +1,6 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; using WixToolset.Extensibility; @@ -18,7 +18,7 @@ namespace WixToolset.Bal public override Intermediate GetLibrary(ISymbolDefinitionCreator symbolDefinitions) { - return Intermediate.Load(typeof(BalExtensionData).Assembly, "WixToolset.Bal.bal.wixlib", symbolDefinitions); + return Intermediate.Load(typeof(BalExtensionData).Assembly, "WixToolset.BootstrapperApplications.bas.wixlib", symbolDefinitions); } } } diff --git a/src/ext/Bal/wixext/BalExtensionFactory.cs b/src/ext/Bal/wixext/BalExtensionFactory.cs index 0bfb6c5f..88b59a4c 100644 --- a/src/ext/Bal/wixext/BalExtensionFactory.cs +++ b/src/ext/Bal/wixext/BalExtensionFactory.cs @@ -1,6 +1,6 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using System.Collections.Generic; diff --git a/src/ext/Bal/wixext/BalWarnings.cs b/src/ext/Bal/wixext/BalWarnings.cs index 73a19d07..8c5d892f 100644 --- a/src/ext/Bal/wixext/BalWarnings.cs +++ b/src/ext/Bal/wixext/BalWarnings.cs @@ -1,6 +1,6 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using System.Resources; diff --git a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs index 5e9fb936..8179e38b 100644 --- a/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs +++ b/src/ext/Bal/wixext/Symbols/BalSymbolDefinitions.cs @@ -1,6 +1,6 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs index 3ce535a3..c418843b 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBAFactoryAssemblySymbol.cs @@ -1,10 +1,10 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using System; using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -20,7 +20,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using System; using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixBalBAFunctionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBAFunctionsSymbol.cs index 83dd20b0..0cd80de1 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBAFunctionsSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBAFunctionsSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -18,7 +18,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; @@ -52,4 +52,4 @@ namespace WixToolset.Bal.Symbols set => this.Set((int)WixBalBAFunctionsSymbolFields.FilePath, value); } } -} \ No newline at end of file +} diff --git a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs index 47e930c2..4f6dfd91 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalBootstrapperApplicationSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -17,7 +17,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using System; using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixBalConditionSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalConditionSymbol.cs index c2527fbc..40976c5a 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalConditionSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalConditionSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -18,7 +18,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; @@ -52,4 +52,4 @@ namespace WixToolset.Bal.Symbols set => this.Set((int)WixBalConditionSymbolFields.Message, value); } } -} \ No newline at end of file +} diff --git a/src/ext/Bal/wixext/Symbols/WixBalPackageInfoSymbol.cs b/src/ext/Bal/wixext/Symbols/WixBalPackageInfoSymbol.cs index 08d4ce4e..e2636d33 100644 --- a/src/ext/Bal/wixext/Symbols/WixBalPackageInfoSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixBalPackageInfoSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -19,7 +19,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs index 4b5e301e..9ab492e6 100644 --- a/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixPrereqInformationSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -19,7 +19,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs index a351d7da..9fc2a8fc 100644 --- a/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixPrereqOptionsSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -19,7 +19,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs b/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs index 3b3823f3..17f0afaa 100644 --- a/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixStdbaCommandLineSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -17,7 +17,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using System; using WixToolset.Data; diff --git a/src/ext/Bal/wixext/Symbols/WixStdbaOptionsSymbol.cs b/src/ext/Bal/wixext/Symbols/WixStdbaOptionsSymbol.cs index cb2694da..43f634ea 100644 --- a/src/ext/Bal/wixext/Symbols/WixStdbaOptionsSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixStdbaOptionsSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -21,7 +21,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; @@ -76,4 +76,4 @@ namespace WixToolset.Bal.Symbols set => this.Set((int)WixStdbaOptionsSymbolFields.SupportCacheOnly, value); } } -} \ No newline at end of file +} diff --git a/src/ext/Bal/wixext/Symbols/WixStdbaOverridableVariableSymbol.cs b/src/ext/Bal/wixext/Symbols/WixStdbaOverridableVariableSymbol.cs index 1d84d1aa..2b5f2a9c 100644 --- a/src/ext/Bal/wixext/Symbols/WixStdbaOverridableVariableSymbol.cs +++ b/src/ext/Bal/wixext/Symbols/WixStdbaOverridableVariableSymbol.cs @@ -1,9 +1,9 @@ // 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 WixToolset.Bal +namespace WixToolset.BootstrapperApplications { using WixToolset.Data; - using WixToolset.Bal.Symbols; + using WixToolset.BootstrapperApplications.Symbols; public static partial class BalSymbolDefinitions { @@ -17,7 +17,7 @@ namespace WixToolset.Bal } } -namespace WixToolset.Bal.Symbols +namespace WixToolset.BootstrapperApplications.Symbols { using WixToolset.Data; @@ -44,4 +44,4 @@ namespace WixToolset.Bal.Symbols set => this.Set((int)WixStdbaOverridableVariableSymbolFields.Name, value); } } -} \ No newline at end of file +} diff --git a/src/ext/Bal/wixext/WixToolset.Bal.wixext.csproj b/src/ext/Bal/wixext/WixToolset.Bal.wixext.csproj deleted file mode 100644 index 5591abde..00000000 --- a/src/ext/Bal/wixext/WixToolset.Bal.wixext.csproj +++ /dev/null @@ -1,22 +0,0 @@ - - - - - - netstandard2.0 - WixToolset.Bal - WiX Toolset Bundle extension - WiX Toolset Bundle extension - embedded - - - - - - - - - - - - diff --git a/src/ext/Bal/wixext/WixToolset.Bal.wixext.targets b/src/ext/Bal/wixext/WixToolset.Bal.wixext.targets deleted file mode 100644 index bf6df083..00000000 --- a/src/ext/Bal/wixext/WixToolset.Bal.wixext.targets +++ /dev/null @@ -1,11 +0,0 @@ - - - - - - - - - diff --git a/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.csproj b/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.csproj new file mode 100644 index 00000000..3dd8d306 --- /dev/null +++ b/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.csproj @@ -0,0 +1,22 @@ + + + + + + netstandard2.0 + WixToolset.BootstrapperApplications + WiX Toolset BootstrapperApplications extension + WiX Toolset BootstrapperApplications extension + embedded + + + + + + + + + + + + diff --git a/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.targets b/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.targets new file mode 100644 index 00000000..bf6df083 --- /dev/null +++ b/src/ext/Bal/wixext/WixToolset.BootstrapperApplications.wixext.targets @@ -0,0 +1,11 @@ + + + + + + + + + diff --git a/src/ext/Bal/wixiuiba/wixiuiba.vcxproj b/src/ext/Bal/wixiuiba/wixiuiba.vcxproj index 6b20db30..8d47c39a 100644 --- a/src/ext/Bal/wixiuiba/wixiuiba.vcxproj +++ b/src/ext/Bal/wixiuiba/wixiuiba.vcxproj @@ -82,7 +82,7 @@ - + diff --git a/src/ext/Bal/wixlib/bal.wixproj b/src/ext/Bal/wixlib/bal.wixproj deleted file mode 100644 index 31369115..00000000 --- a/src/ext/Bal/wixlib/bal.wixproj +++ /dev/null @@ -1,23 +0,0 @@ - - - - Library - true - en-us - - - - - - - - - - - - - - - - - diff --git a/src/ext/Bal/wixlib/bal_arm64.wxs b/src/ext/Bal/wixlib/bal_arm64.wxs deleted file mode 100644 index 4ddbfc47..00000000 --- a/src/ext/Bal/wixlib/bal_arm64.wxs +++ /dev/null @@ -1,6 +0,0 @@ - - - - - - diff --git a/src/ext/Bal/wixlib/bal_platform.wxi b/src/ext/Bal/wixlib/bal_platform.wxi deleted file mode 100644 index af58f4c3..00000000 --- a/src/ext/Bal/wixlib/bal_platform.wxi +++ /dev/null @@ -1,34 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/src/ext/Bal/wixlib/bal_x64.wxs b/src/ext/Bal/wixlib/bal_x64.wxs deleted file mode 100644 index f2c62418..00000000 --- a/src/ext/Bal/wixlib/bal_x64.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/Bal/wixlib/bal_x86.wxs b/src/ext/Bal/wixlib/bal_x86.wxs deleted file mode 100644 index e00115b2..00000000 --- a/src/ext/Bal/wixlib/bal_x86.wxs +++ /dev/null @@ -1,7 +0,0 @@ - - - - - - - diff --git a/src/ext/Bal/wixlib/bas.wixproj b/src/ext/Bal/wixlib/bas.wixproj new file mode 100644 index 00000000..31369115 --- /dev/null +++ b/src/ext/Bal/wixlib/bas.wixproj @@ -0,0 +1,23 @@ + + + + Library + true + en-us + + + + + + + + + + + + + + + + + diff --git a/src/ext/Bal/wixlib/bas_arm64.wxs b/src/ext/Bal/wixlib/bas_arm64.wxs new file mode 100644 index 00000000..ba6c5d82 --- /dev/null +++ b/src/ext/Bal/wixlib/bas_arm64.wxs @@ -0,0 +1,6 @@ + + + + + + diff --git a/src/ext/Bal/wixlib/bas_platform.wxi b/src/ext/Bal/wixlib/bas_platform.wxi new file mode 100644 index 00000000..af58f4c3 --- /dev/null +++ b/src/ext/Bal/wixlib/bas_platform.wxi @@ -0,0 +1,34 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/ext/Bal/wixlib/bas_x64.wxs b/src/ext/Bal/wixlib/bas_x64.wxs new file mode 100644 index 00000000..7a8cade5 --- /dev/null +++ b/src/ext/Bal/wixlib/bas_x64.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/Bal/wixlib/bas_x86.wxs b/src/ext/Bal/wixlib/bas_x86.wxs new file mode 100644 index 00000000..419702db --- /dev/null +++ b/src/ext/Bal/wixlib/bas_x86.wxs @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/ext/Bal/wixprqba/wixprqba.vcxproj b/src/ext/Bal/wixprqba/wixprqba.vcxproj index b992fe14..8c838fb5 100644 --- a/src/ext/Bal/wixprqba/wixprqba.vcxproj +++ b/src/ext/Bal/wixprqba/wixprqba.vcxproj @@ -82,7 +82,7 @@ - + diff --git a/src/ext/Bal/wixstdba/wixstdba.vcxproj b/src/ext/Bal/wixstdba/wixstdba.vcxproj index e8317fbf..1f961018 100644 --- a/src/ext/Bal/wixstdba/wixstdba.vcxproj +++ b/src/ext/Bal/wixstdba/wixstdba.vcxproj @@ -82,7 +82,7 @@ - + diff --git a/src/ext/NetFx/be/precomp.h b/src/ext/NetFx/be/precomp.h index c164834d..a0ae1038 100644 --- a/src/ext/NetFx/be/precomp.h +++ b/src/ext/NetFx/be/precomp.h @@ -19,11 +19,6 @@ #include #include -#include -#include - -#include -#include #include #include diff --git a/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs b/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs index 27a19116..a78a5617 100644 --- a/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs +++ b/src/ext/NetFx/test/WixToolsetTest.Netfx/NetfxExtensionFixture.cs @@ -24,7 +24,7 @@ namespace WixToolsetTest.Netfx var extensionResult = WixRunner.Execute(new[] { "extension", "add", - "WixToolset.Bal.wixext" + "WixToolset.BootstrapperApplications.wixext" }); var compileResult = WixRunner.Execute(new[] @@ -33,7 +33,7 @@ namespace WixToolsetTest.Netfx Path.Combine(bundleSourceFolder, "BundleLatest.wxs"), Path.Combine(bundleSourceFolder, "NetCore3.1.12_x86.wxs"), Path.Combine(bundleSourceFolder, "NetCore3.1.12_x64.wxs"), - "-ext", "WixToolset.Bal.wixext", + "-ext", "WixToolset.BootstrapperApplications.wixext", "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), "-intermediateFolder", intermediateFolder, "-o", bundleFile, @@ -57,7 +57,7 @@ namespace WixToolsetTest.Netfx var extensionResult = WixRunner.Execute(new[] { "extension", "add", - "WixToolset.Bal.wixext" + "WixToolset.BootstrapperApplications.wixext" }); var compileResult = WixRunner.Execute(new[] @@ -65,7 +65,7 @@ namespace WixToolsetTest.Netfx "build", Path.Combine(bundleSourceFolder, "BundleLatest_x64.wxs"), Path.Combine(bundleSourceFolder, "NetCore3.1.12_x64.wxs"), - "-ext", "WixToolset.Bal.wixext", + "-ext", "WixToolset.BootstrapperApplications.wixext", "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), "-intermediateFolder", intermediateFolder, "-o", bundleFile, @@ -89,14 +89,14 @@ namespace WixToolsetTest.Netfx var extensionResult = WixRunner.Execute(new[] { "extension", "add", - "WixToolset.Bal.wixext" + "WixToolset.BootstrapperApplications.wixext" }); var compileResult = WixRunner.Execute(new[] { "build", Path.Combine(bundleSourceFolder, "BundleLatest.wxs"), - "-ext", "WixToolset.Bal.wixext", + "-ext", "WixToolset.BootstrapperApplications.wixext", "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), "-intermediateFolder", intermediateFolder, "-o", bundleFile, @@ -121,7 +121,7 @@ namespace WixToolsetTest.Netfx var extensionResult = WixRunner.Execute(warningsAsErrors: true, new[] { "extension", "add", - "WixToolset.Bal.wixext", + "WixToolset.BootstrapperApplications.wixext", "extension", "add", "WixToolset.Util.wixext", }); @@ -130,7 +130,7 @@ namespace WixToolsetTest.Netfx { "build", Path.Combine(bundleSourceFolder, "BundleLatest.wxs"), - "-ext", "WixToolset.Bal.wixext", + "-ext", "WixToolset.BootstrapperApplications.wixext", "-ext", "WixToolset.Util.wixext", "-ext", TestData.Get(@"WixToolset.Netfx.wixext.dll"), "-intermediateFolder", intermediateFolder, diff --git a/src/ext/NetFx/wixlib/netfx.wixproj b/src/ext/NetFx/wixlib/netfx.wixproj index 2bd09d95..4327257a 100644 --- a/src/ext/NetFx/wixlib/netfx.wixproj +++ b/src/ext/NetFx/wixlib/netfx.wixproj @@ -20,7 +20,7 @@ - + diff --git a/src/ext/Util/be/precomp.h b/src/ext/Util/be/precomp.h index 5ce5744f..d04bf305 100644 --- a/src/ext/Util/be/precomp.h +++ b/src/ext/Util/be/precomp.h @@ -23,11 +23,6 @@ #include #include -#include -#include - -#include -#include #include #include diff --git a/src/ext/WixExt.props b/src/ext/WixExt.props index 19a96254..4babfb7c 100644 --- a/src/ext/WixExt.props +++ b/src/ext/WixExt.props @@ -6,11 +6,12 @@ false true NU5100 + wixext5 - + diff --git a/src/internal/SetBuildNumber/Directory.Packages.props.pp b/src/internal/SetBuildNumber/Directory.Packages.props.pp index 35f96eb6..2189a371 100644 --- a/src/internal/SetBuildNumber/Directory.Packages.props.pp +++ b/src/internal/SetBuildNumber/Directory.Packages.props.pp @@ -13,10 +13,8 @@ - - - + @@ -32,6 +30,7 @@ + diff --git a/src/setup/WixAdditionalTools/WixAdditionalTools.wixproj b/src/setup/WixAdditionalTools/WixAdditionalTools.wixproj index 847e144a..bb1764fb 100644 --- a/src/setup/WixAdditionalTools/WixAdditionalTools.wixproj +++ b/src/setup/WixAdditionalTools/WixAdditionalTools.wixproj @@ -11,7 +11,7 @@ - + diff --git a/src/test/burn/TestBA/Program.cs b/src/test/burn/TestBA/Program.cs index 6986a057..c6777b89 100644 --- a/src/test/burn/TestBA/Program.cs +++ b/src/test/burn/TestBA/Program.cs @@ -2,7 +2,7 @@ namespace WixToolset.Test.BA { - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; internal class Program { diff --git a/src/test/burn/TestBA/TestBA.cs b/src/test/burn/TestBA/TestBA.cs index 8a116957..1556acd0 100644 --- a/src/test/burn/TestBA/TestBA.cs +++ b/src/test/burn/TestBA/TestBA.cs @@ -10,7 +10,7 @@ namespace WixToolset.Test.BA using System.Threading; using System.Windows.Forms; using Microsoft.Win32; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; /// /// A minimal UX used for testing. diff --git a/src/test/burn/TestBA/TestBA.csproj b/src/test/burn/TestBA/TestBA.csproj index 715ac5bc..6db83b20 100644 --- a/src/test/burn/TestBA/TestBA.csproj +++ b/src/test/burn/TestBA/TestBA.csproj @@ -20,6 +20,6 @@ - + diff --git a/src/test/burn/TestBA/TestBA_x64.csproj b/src/test/burn/TestBA/TestBA_x64.csproj index 1f8659a0..9d8dc330 100644 --- a/src/test/burn/TestBA/TestBA_x64.csproj +++ b/src/test/burn/TestBA/TestBA_x64.csproj @@ -20,6 +20,6 @@ - + diff --git a/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.vcxproj b/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.vcxproj index 94d44ac3..58db7048 100644 --- a/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.vcxproj +++ b/src/test/burn/TestData/BAFunctionsTests/BafRelatedBundleVariableTesting/BafRelatedBundleVariableTesting.vcxproj @@ -59,7 +59,7 @@ - + diff --git a/src/test/burn/TestData/BAFunctionsTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/BAFunctionsTests/BundleAv1/BundleAv1.wixproj index b2045deb..d2688a00 100644 --- a/src/test/burn/TestData/BAFunctionsTests/BundleAv1/BundleAv1.wixproj +++ b/src/test/burn/TestData/BAFunctionsTests/BundleAv1/BundleAv1.wixproj @@ -5,6 +5,7 @@ + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wixproj index dee120d7..63d8079e 100644 --- a/src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wixproj +++ b/src/test/burn/TestData/BAFunctionsTests/BundleAv2/BundleAv2.wixproj @@ -8,6 +8,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj index dcd38527..c643fe9f 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA/BundleA.wixproj @@ -12,6 +12,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_arm64/BundleA_arm64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_arm64/BundleA_arm64.wixproj index 535129df..b3c0f4fd 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_arm64/BundleA_arm64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_arm64/BundleA_arm64.wixproj @@ -13,6 +13,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj index 7e29856f..43bc988c 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleA_x64/BundleA_x64.wixproj @@ -13,6 +13,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleApu_x64/BundleApu_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleApu_x64/BundleApu_x64.wixproj index 3cbedc3d..5841cf09 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleApu_x64/BundleApu_x64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleApu_x64/BundleApu_x64.wixproj @@ -13,6 +13,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj index 6f39097a..06b07dcb 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleB/BundleB.wixproj @@ -13,7 +13,8 @@ + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj index c940f02a..bf3a8efb 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleB_x64/BundleB_x64.wixproj @@ -15,7 +15,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj index 0eb66ee3..d025a728 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleC/BundleC.wixproj @@ -14,7 +14,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj index af028ed4..1c036ed5 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleC_x64/BundleC_x64.wixproj @@ -15,7 +15,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleD/BundleD.wixproj index a2af1aa5..5972dc7e 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleD/BundleD.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleD/BundleD.wixproj @@ -14,7 +14,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BasicFunctionalityTests/BundleD_x64/BundleD_x64.wixproj b/src/test/burn/TestData/BasicFunctionalityTests/BundleD_x64/BundleD_x64.wixproj index 338d523d..4071910c 100644 --- a/src/test/burn/TestData/BasicFunctionalityTests/BundleD_x64/BundleD_x64.wixproj +++ b/src/test/burn/TestData/BasicFunctionalityTests/BundleD_x64/BundleD_x64.wixproj @@ -15,7 +15,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BundlePackageTests/BundlePackageUninstallFailureBundle/BundlePackageUninstallFailureBundle.wixproj b/src/test/burn/TestData/BundlePackageTests/BundlePackageUninstallFailureBundle/BundlePackageUninstallFailureBundle.wixproj index 276d9dcb..c7d97ed1 100644 --- a/src/test/burn/TestData/BundlePackageTests/BundlePackageUninstallFailureBundle/BundlePackageUninstallFailureBundle.wixproj +++ b/src/test/burn/TestData/BundlePackageTests/BundlePackageUninstallFailureBundle/BundlePackageUninstallFailureBundle.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesBundle/MultipleBundlePackagesBundle.wixproj b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesBundle/MultipleBundlePackagesBundle.wixproj index a9639014..872fab7c 100644 --- a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesBundle/MultipleBundlePackagesBundle.wixproj +++ b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesBundle/MultipleBundlePackagesBundle.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wixproj b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wixproj index 0a6ef51e..ad9766cc 100644 --- a/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wixproj +++ b/src/test/burn/TestData/BundlePackageTests/MultipleBundlePackagesWithRemoteBundle/MultipleBundlePackagesWithRemoteBundle.wixproj @@ -11,7 +11,7 @@ - + diff --git a/src/test/burn/TestData/BundlePackageTests/UpgradeBundlePackageBundlev1/UpgradeBundlePackageBundle.props b/src/test/burn/TestData/BundlePackageTests/UpgradeBundlePackageBundlev1/UpgradeBundlePackageBundle.props index 1c761dfc..d187d093 100644 --- a/src/test/burn/TestData/BundlePackageTests/UpgradeBundlePackageBundlev1/UpgradeBundlePackageBundle.props +++ b/src/test/burn/TestData/BundlePackageTests/UpgradeBundlePackageBundlev1/UpgradeBundlePackageBundle.props @@ -9,6 +9,6 @@ - + diff --git a/src/test/burn/TestData/BundlePackageTests/V3BundlePackageBundle/V3BundlePackageBundle.wixproj b/src/test/burn/TestData/BundlePackageTests/V3BundlePackageBundle/V3BundlePackageBundle.wixproj index a7930a09..4a9305ff 100644 --- a/src/test/burn/TestData/BundlePackageTests/V3BundlePackageBundle/V3BundlePackageBundle.wixproj +++ b/src/test/burn/TestData/BundlePackageTests/V3BundlePackageBundle/V3BundlePackageBundle.wixproj @@ -17,7 +17,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj index 4fe00693..fc5e1443 100644 --- a/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/CacheTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj index ab711157..01a488d3 100644 --- a/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/CacheTests/BundleB/BundleB.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj index a0776d08..a5a8c6e3 100644 --- a/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/CacheTests/BundleC/BundleC.wixproj @@ -12,7 +12,7 @@ - + @@ -24,4 +24,4 @@ - \ No newline at end of file + diff --git a/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj index 1c2f1651..8202491c 100644 --- a/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/ContainerTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj index a91e6317..b6d3d123 100644 --- a/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/ContainerTests/BundleB/BundleB.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj index 8a5c9594..4f0f4bed 100644 --- a/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 4c6a0993..82646d2d 100644 --- a/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleAv2/BundleAv2.wixproj index eab737f8..0c1ac068 100644 --- a/src/test/burn/TestData/DependencyTests/BundleAv2/BundleAv2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleAv2/BundleAv2.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj index 2d2f4eaa..4a659ab1 100644 --- a/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleB/BundleB.wixproj @@ -11,8 +11,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj index cd65ea69..0ec02f6a 100644 --- a/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleC/BundleC.wixproj @@ -15,8 +15,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj index 25af31de..f44759a6 100644 --- a/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleD/BundleD.wixproj @@ -15,8 +15,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj index 3fddc2d4..32ef2b42 100644 --- a/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleE/BundleE.wixproj @@ -14,8 +14,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj index 75481940..62617f5e 100644 --- a/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleF/BundleF.wixproj @@ -11,11 +11,11 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj index 14072fed..ea71ae07 100644 --- a/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleF_AddOnA/BundleF_AddOnA.wixproj @@ -13,11 +13,11 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj index c467222f..ed46e89c 100644 --- a/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleF_AddOnB/BundleF_AddOnB.wixproj @@ -13,11 +13,11 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj index 1c8ad4d3..89c9441a 100644 --- a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_1/BundleF_PatchAv1_0_1.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj index dcc89f67..5861f538 100644 --- a/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleF_PatchAv1_0_2/BundleF_PatchAv1_0_2.wixproj @@ -10,8 +10,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleFv2/BundleFv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleFv2/BundleFv2.wixproj index 7b6aa9f3..a8b3c894 100644 --- a/src/test/burn/TestData/DependencyTests/BundleFv2/BundleFv2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleFv2/BundleFv2.wixproj @@ -10,8 +10,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj index 14817b3a..da763f89 100644 --- a/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleHv1/BundleHv1.wixproj @@ -7,7 +7,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj index 6a96e230..5a0a0d8f 100644 --- a/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleHv2/BundleHv2.wixproj @@ -10,7 +10,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj index 5a418642..afe4d72c 100644 --- a/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleJ/BundleJ.wixproj @@ -14,8 +14,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj index e31d3423..19dbd4d5 100644 --- a/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleJ_Patch/BundleJ_Patch.wixproj @@ -14,8 +14,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj index ff9db038..8cf03ae6 100644 --- a/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleKv1/BundleKv1.wixproj @@ -6,7 +6,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj index 9f55fa9a..c234c54f 100644 --- a/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleKv2/BundleKv2.wixproj @@ -9,7 +9,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj index e1a60b4e..6f28e222 100644 --- a/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleL/BundleL.wixproj @@ -13,8 +13,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleM/BundleM.wixproj b/src/test/burn/TestData/DependencyTests/BundleM/BundleM.wixproj index 3aee3643..9f135e71 100644 --- a/src/test/burn/TestData/DependencyTests/BundleM/BundleM.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleM/BundleM.wixproj @@ -13,8 +13,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wixproj b/src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wixproj index 3bcd8c0c..6b8fb17c 100644 --- a/src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleNv1/BundleNv1.wixproj @@ -7,7 +7,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wixproj b/src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wixproj index 68a0d0d3..f90d8177 100644 --- a/src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleNv1_0_1/BundleNv1_0_1.wixproj @@ -11,7 +11,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wixproj b/src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wixproj index a66c39f8..e87d9914 100644 --- a/src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wixproj +++ b/src/test/burn/TestData/DependencyTests/BundleNv2/BundleNv2.wixproj @@ -11,7 +11,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj index 27c6e583..88146f06 100644 --- a/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/ElevationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/BrokenPerUserArpEntryExePackage/BrokenPerUserArpEntryExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/BrokenPerUserArpEntryExePackage/BrokenPerUserArpEntryExePackage.wixproj index bcb447b0..f164886b 100644 --- a/src/test/burn/TestData/ExePackageTests/BrokenPerUserArpEntryExePackage/BrokenPerUserArpEntryExePackage.wixproj +++ b/src/test/burn/TestData/ExePackageTests/BrokenPerUserArpEntryExePackage/BrokenPerUserArpEntryExePackage.wixproj @@ -11,7 +11,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj index 403f3320..d87407f2 100644 --- a/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj +++ b/src/test/burn/TestData/ExePackageTests/CustomExitCodeExePackage/CustomExitCodeExePackage.wixproj @@ -11,7 +11,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackage/PerMachineArpEntryExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackage/PerMachineArpEntryExePackage.wixproj index ed46e6a5..c298711c 100644 --- a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackage/PerMachineArpEntryExePackage.wixproj +++ b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackage/PerMachineArpEntryExePackage.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageFailure/PerMachineArpEntryExePackageFailure.wixproj b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageFailure/PerMachineArpEntryExePackageFailure.wixproj index e4219565..dd8007e9 100644 --- a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageFailure/PerMachineArpEntryExePackageFailure.wixproj +++ b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageFailure/PerMachineArpEntryExePackageFailure.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageUninstallFailure/PerMachineArpEntryExePackageUninstallFailure.wixproj b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageUninstallFailure/PerMachineArpEntryExePackageUninstallFailure.wixproj index bbab2b75..1072365c 100644 --- a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageUninstallFailure/PerMachineArpEntryExePackageUninstallFailure.wixproj +++ b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryExePackageUninstallFailure/PerMachineArpEntryExePackageUninstallFailure.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryWithUninstallStringExePackage/PerMachineArpEntryWithUninstallStringExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryWithUninstallStringExePackage/PerMachineArpEntryWithUninstallStringExePackage.wixproj index afdd9e5b..cf32e269 100644 --- a/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryWithUninstallStringExePackage/PerMachineArpEntryWithUninstallStringExePackage.wixproj +++ b/src/test/burn/TestData/ExePackageTests/PerMachineArpEntryWithUninstallStringExePackage/PerMachineArpEntryWithUninstallStringExePackage.wixproj @@ -13,7 +13,7 @@ - + diff --git a/src/test/burn/TestData/ExePackageTests/PerUserArpEntryExePackage/PerUserArpEntryExePackage.wixproj b/src/test/burn/TestData/ExePackageTests/PerUserArpEntryExePackage/PerUserArpEntryExePackage.wixproj index 06395843..4141cc8f 100644 --- a/src/test/burn/TestData/ExePackageTests/PerUserArpEntryExePackage/PerUserArpEntryExePackage.wixproj +++ b/src/test/burn/TestData/ExePackageTests/PerUserArpEntryExePackage/PerUserArpEntryExePackage.wixproj @@ -11,7 +11,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj index 9cd861af..768644a2 100644 --- a/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/FailureTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj index 4b2da9fd..34ab1aef 100644 --- a/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/FailureTests/BundleB/BundleB.wixproj @@ -10,7 +10,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj index cdabf5ca..97b6ce0c 100644 --- a/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/FailureTests/BundleC/BundleC.wixproj @@ -13,10 +13,10 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FailureTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/FailureTests/BundleD/BundleD.wixproj index 7b7408c6..38748d4a 100644 --- a/src/test/burn/TestData/FailureTests/BundleD/BundleD.wixproj +++ b/src/test/burn/TestData/FailureTests/BundleD/BundleD.wixproj @@ -12,8 +12,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FeatureTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/FeatureTests/BundleAv1/BundleAv1.wixproj index 8a5c9594..4f0f4bed 100644 --- a/src/test/burn/TestData/FeatureTests/BundleAv1/BundleAv1.wixproj +++ b/src/test/burn/TestData/FeatureTests/BundleAv1/BundleAv1.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FeatureTests/BundleAv1_0_1/BundleAv1_0_1.wixproj b/src/test/burn/TestData/FeatureTests/BundleAv1_0_1/BundleAv1_0_1.wixproj index 4c6a0993..82646d2d 100644 --- a/src/test/burn/TestData/FeatureTests/BundleAv1_0_1/BundleAv1_0_1.wixproj +++ b/src/test/burn/TestData/FeatureTests/BundleAv1_0_1/BundleAv1_0_1.wixproj @@ -9,8 +9,8 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FilesInUseTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/FilesInUseTests/BundleA/BundleA.wixproj index c71410c2..838f37db 100644 --- a/src/test/burn/TestData/FilesInUseTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/FilesInUseTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj index e0860665..445f4eda 100644 --- a/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj +++ b/src/test/burn/TestData/FilesInUseTests/WixStdBaBundle/WixStdBaBundle.wixproj @@ -12,6 +12,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj index ee0e38cb..0dea1e40 100644 --- a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv1/BundleAv1.wixproj @@ -6,7 +6,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj index b094f48a..595c9160 100644 --- a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleAv2/BundleAv2.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj index 18a3e364..f21da8ef 100644 --- a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv1/BundleCv1.wixproj @@ -6,7 +6,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj index e3fc3a86..5e00b79e 100644 --- a/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj +++ b/src/test/burn/TestData/ForwardCompatibleBundleTests/BundleCv2/BundleCv2.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj index 5796178b..7b3e9250 100644 --- a/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/LayoutTests/BundleA/BundleA.wixproj @@ -9,7 +9,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/LayoutTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/LayoutTests/BundleB/BundleB.wixproj index 2ce22ea1..c19f3f25 100644 --- a/src/test/burn/TestData/LayoutTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/LayoutTests/BundleB/BundleB.wixproj @@ -12,6 +12,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/LongPathTests/NonCompressedBundle/NonCompressedBundle.wixproj b/src/test/burn/TestData/LongPathTests/NonCompressedBundle/NonCompressedBundle.wixproj index 3686200c..eb84c6b4 100644 --- a/src/test/burn/TestData/LongPathTests/NonCompressedBundle/NonCompressedBundle.wixproj +++ b/src/test/burn/TestData/LongPathTests/NonCompressedBundle/NonCompressedBundle.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj index 88bb083b..b6de5844 100644 --- a/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj +++ b/src/test/burn/TestData/Manual/BafThmutilTesting/BafThmUtilTesting.vcxproj @@ -62,7 +62,7 @@ - + diff --git a/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj index 225664b9..3d539908 100644 --- a/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/Manual/BundleA/BundleA.wixproj @@ -14,9 +14,9 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj index e7d029a3..b37138e0 100644 --- a/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/Manual/BundleB/BundleB.wixproj @@ -26,7 +26,7 @@ - + diff --git a/src/test/burn/TestData/Manual/BundleC/BundleC.wixproj b/src/test/burn/TestData/Manual/BundleC/BundleC.wixproj index eabd529c..abb9f506 100644 --- a/src/test/burn/TestData/Manual/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/Manual/BundleC/BundleC.wixproj @@ -13,6 +13,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj index 2a284491..c70f191c 100644 --- a/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv1/BundleAv1.wixproj @@ -7,6 +7,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj index a259ed2e..c2978b3d 100644 --- a/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj +++ b/src/test/burn/TestData/MsiTransactionTests/BundleAv2/BundleAv2.wixproj @@ -10,6 +10,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj index 8ee83380..1ea9d30d 100644 --- a/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv1/BundleBv1.wixproj @@ -5,7 +5,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj index 70bec122..6cf88241 100644 --- a/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj +++ b/src/test/burn/TestData/MsiTransactionTests/BundleBv2/BundleBv2.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj index 8ca41da7..c3c09a4b 100644 --- a/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/PatchTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj index 5eeaff59..b0787ad7 100644 --- a/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj +++ b/src/test/burn/TestData/PatchTests/BundlePatchA/BundlePatchA.wixproj @@ -16,7 +16,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj index b80d5613..c4bfbe01 100644 --- a/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj +++ b/src/test/burn/TestData/PatchTests/BundlePatchA2/BundlePatchA2.wixproj @@ -14,7 +14,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj index b084997c..06916058 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj @@ -18,7 +18,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs index f56a7f8a..a86f498f 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs @@ -9,7 +9,7 @@ - + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj index ade73a52..cc99a817 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj @@ -18,7 +18,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs index 87b8be36..7a84bd5b 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs @@ -8,7 +8,7 @@ - + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj index 81641f66..7ed34aa5 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj @@ -18,7 +18,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs index 9bf7932b..e03cad62 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs @@ -8,7 +8,7 @@ - + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj index b3ba4987..280193df 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj @@ -18,7 +18,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wxs b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wxs index 68baba22..2eed4bd1 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wxs @@ -7,7 +7,7 @@ - + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj index 5d271f55..6e3bbfa5 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj @@ -16,7 +16,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs index 4855c66e..b6962b65 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs @@ -8,7 +8,7 @@ - + diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj index 0d8d63be..4156a8f5 100644 --- a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj @@ -59,7 +59,7 @@ - + diff --git a/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj index 1a1df1b6..26119b20 100644 --- a/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/RegistrationTests/BundleA/BundleA.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj index 5d7e7756..ba23c2b2 100644 --- a/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/RollbackBoundaryTests/BundleA/BundleA.wixproj @@ -15,6 +15,6 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj index 80c91e07..57aeab6e 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleA/BundleA.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj index 0a320fa5..d5fc3e1f 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleAReverse/BundleAReverse.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj index e489a5cf..71ffb1a6 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleB/BundleB.wixproj @@ -14,7 +14,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj index 5e8f6d13..38cdae50 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleC/BundleC.wixproj @@ -15,7 +15,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj index 7a3a99a7..e0850f95 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleD/BundleD.wixproj @@ -13,7 +13,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj index 72634a2f..450b699d 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyA/BundleOnlyA.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj index 1f950289..f48ce034 100644 --- a/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj +++ b/src/test/burn/TestData/SlipstreamTests/BundleOnlyPatchA/BundleOnlyPatchA.wixproj @@ -12,7 +12,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs index 98c3acb2..13f32146 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/TestBA.wxs @@ -6,7 +6,7 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/WixBA.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib/WixBA.wxs index 3d4eb274..372dbd9b 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib/WixBA.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/WixBA.wxs @@ -4,7 +4,7 @@ - + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj b/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj index 788353d6..f80dc6cc 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj +++ b/src/test/burn/TestData/TestBA/TestBAWixlib/testbawixlib.wixproj @@ -16,7 +16,7 @@ - + - \ No newline at end of file + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs index 08d428a1..1cf70162 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/TestBA_x64.wxs @@ -6,7 +6,7 @@ - + @@ -17,7 +17,7 @@ - + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs index ef465e23..97b41651 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/WixBA_x64.wxs @@ -6,7 +6,7 @@ - + diff --git a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj index 154367e3..86edc0e1 100644 --- a/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj +++ b/src/test/burn/TestData/TestBA/TestBAWixlib_x64/testbawixlib_x64.wixproj @@ -13,7 +13,7 @@ - - - - - -
- - - - - - - - - diff --git a/src/test/burn/WixToolset.WixBA/WixBA.cs b/src/test/burn/WixToolset.WixBA/WixBA.cs index 5b7444c4..dca12ce8 100644 --- a/src/test/burn/WixToolset.WixBA/WixBA.cs +++ b/src/test/burn/WixToolset.WixBA/WixBA.cs @@ -8,7 +8,7 @@ namespace WixToolset.WixBA using System.IO; using System.Net; using System.Text; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Threading = System.Windows.Threading; using WinForms = System.Windows.Forms; diff --git a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj index a0b47744..e87501e9 100644 --- a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj +++ b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA.csproj @@ -23,10 +23,6 @@ true - - - - @@ -41,6 +37,6 @@ - + diff --git a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj index b17622a6..3437119c 100644 --- a/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj +++ b/src/test/burn/WixToolset.WixBA/WixToolset.WixBA_x64.csproj @@ -23,10 +23,6 @@ true - - - - @@ -41,6 +37,6 @@ - + diff --git a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs index 228c95c6..dc793cf0 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/BundlePackageTests.cs @@ -5,7 +5,7 @@ namespace WixToolsetTest.BurnE2E using System; using System.IO; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs index 3622e2e6..05144e8d 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/CacheTests.cs @@ -8,7 +8,7 @@ namespace WixToolsetTest.BurnE2E using Microsoft.Win32; using WixInternal.TestSupport; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs index e47a49d9..b14b227e 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/DependencyTests.cs @@ -4,7 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; @@ -170,7 +170,7 @@ namespace WixToolsetTest.BurnE2E packageAv2.VerifyInstalled(true); bundleAv2.VerifyPackageIsCached("PackageA"); bundleAv1.VerifyExeTestRegistryValue(testRegistryValueExe, "2.0.0.0"); - + // Verify https://github.com/wixtoolset/issues/issues/3190 bundleB.Uninstall(); diff --git a/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs index dc0b6b5a..a7438564 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/ExePackageTests.cs @@ -3,7 +3,7 @@ namespace WixToolsetTest.BurnE2E { using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs index cb758131..bd3762ed 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/FailureTests.cs @@ -4,7 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System.Threading; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/FeatureTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/FeatureTests.cs index b3d0dfe1..b078c979 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/FeatureTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/FeatureTests.cs @@ -5,7 +5,7 @@ namespace WixToolsetTest.BurnE2E using System; using System.IO; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/LongPathTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/LongPathTests.cs index 58b8ae18..0c58e676 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/LongPathTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/LongPathTests.cs @@ -9,7 +9,7 @@ namespace WixToolsetTest.BurnE2E using Microsoft.Win32; using WixInternal.TestSupport; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs index 65d0c9cd..8f97ae0e 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/RegistrationTests.cs @@ -4,7 +4,7 @@ namespace WixToolsetTest.BurnE2E { using System; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs index aa005cb1..d07e80f1 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/SlipstreamTests.cs @@ -5,7 +5,7 @@ namespace WixToolsetTest.BurnE2E using System; using System.IO; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs index 115f3b54..a378545e 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/Utilities/TestBAController.cs @@ -5,7 +5,7 @@ namespace WixToolsetTest.BurnE2E using System; using Microsoft.Win32; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; public class TestBAController : IDisposable { diff --git a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs index fcd46e0b..57224c68 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs +++ b/src/test/burn/WixToolsetTest.BurnE2E/VariableTests.cs @@ -6,7 +6,7 @@ namespace WixToolsetTest.BurnE2E using System.IO; using WixInternal.TestSupport; using WixTestTools; - using WixToolset.Mba.Core; + using WixToolset.BootstrapperApplicationApi; using Xunit; using Xunit.Abstractions; diff --git a/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj b/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj index a5099d9b..751b7748 100644 --- a/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj +++ b/src/test/burn/WixToolsetTest.BurnE2E/WixToolsetTest.BurnE2E.csproj @@ -22,6 +22,6 @@ - + -- cgit v1.2.3-55-g6feb