diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2022-05-13 15:39:40 -0500 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2022-05-14 11:12:31 -0500 |
| commit | d5985a1688bc878e42ffd3ce3939fa52303cab16 (patch) | |
| tree | 0c283fe5454659c569317b37840a040474cfa032 /src/test/burn/TestData | |
| parent | 6a6974a15deb6edf593736cdb8043bfb93064782 (diff) | |
| download | wix-d5985a1688bc878e42ffd3ce3939fa52303cab16.tar.gz wix-d5985a1688bc878e42ffd3ce3939fa52303cab16.tar.bz2 wix-d5985a1688bc878e42ffd3ce3939fa52303cab16.zip | |
Add option to hosts to always install prereqs.
Add PrereqPackage to BundlePackage
Implements 4718
Diffstat (limited to 'src/test/burn/TestData')
22 files changed, 557 insertions, 10 deletions
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj index 0199f91f..b084997c 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wixproj | |||
| @@ -13,9 +13,12 @@ | |||
| 13 | </ItemGroup> | 13 | </ItemGroup> |
| 14 | <ItemGroup> | 14 | <ItemGroup> |
| 15 | <ProjectReference Include="..\PackageA\PackageA.wixproj" /> | 15 | <ProjectReference Include="..\PackageA\PackageA.wixproj" /> |
| 16 | <ProjectReference Include="..\PackageF\PackageF.wixproj" /> | 16 | <ProjectReference Include="..\PackageC\PackageC.wixproj" /> |
| 17 | <ProjectReference Include="..\PrereqBaf\PrereqBaf.vcxproj" /> | ||
| 18 | <ProjectReference Include="..\ReplaceConfig\ReplaceConfig.vcxproj" /> | ||
| 17 | </ItemGroup> | 19 | </ItemGroup> |
| 18 | <ItemGroup> | 20 | <ItemGroup> |
| 19 | <PackageReference Include="WixToolset.Bal.wixext" /> | 21 | <PackageReference Include="WixToolset.Bal.wixext" /> |
| 22 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 20 | </ItemGroup> | 23 | </ItemGroup> |
| 21 | </Project> \ No newline at end of file | 24 | </Project> \ 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 682f0bd7..6073e09f 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleA/BundleA.wxs | |||
| @@ -1,22 +1,30 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
| 5 | <Fragment> | 5 | <Fragment> |
| 6 | <BootstrapperApplication Id="BrokenDnc"> | 6 | <BootstrapperApplication Id="BrokenDnc"> |
| 7 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.deps.json" /> | 7 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.deps.json" /> |
| 8 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.dll" bal:BAFactoryAssembly="yes" /> | 8 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.dll" bal:BAFactoryAssembly="yes" /> |
| 9 | <Payload Name="good.runtimeconfig.json" SourceFile="!(bindpath.dncx86)\TestBA.runtimeconfig.json" /> | ||
| 9 | <Payload Name="TestBA.runtimeconfig.json" SourceFile="bad.runtimeconfig.json" /> | 10 | <Payload Name="TestBA.runtimeconfig.json" SourceFile="bad.runtimeconfig.json" /> |
| 10 | <Payload SourceFile="!(bindpath.dncx86)\mbanative.dll" /> | 11 | <Payload SourceFile="!(bindpath.dncx86)\mbanative.dll" /> |
| 11 | <Payload SourceFile="!(bindpath.dncx86)\WixToolset.Mba.Core.dll" /> | 12 | <Payload SourceFile="!(bindpath.dncx86)\WixToolset.Mba.Core.dll" /> |
| 13 | <Payload SourceFile="$(var.PrereqBaf.TargetPath)" bal:BAFunctions="yes" /> | ||
| 12 | <bal:WixDotNetCoreBootstrapperApplicationHost /> | 14 | <bal:WixDotNetCoreBootstrapperApplicationHost /> |
| 13 | </BootstrapperApplication> | 15 | </BootstrapperApplication> |
| 14 | </Fragment> | 16 | </Fragment> |
| 15 | 17 | ||
| 16 | <Fragment> | 18 | <Fragment> |
| 19 | <util:FileSearch Variable="GoodConfigPresent" Path="[BARuntimeDirectory]\good.runtimeconfig.json" Result="exists" /> | ||
| 20 | <Variable Name="CAUSEINFINITELOOP" bal:Overridable="yes" /> | ||
| 21 | |||
| 17 | <PackageGroup Id="BundlePackages"> | 22 | <PackageGroup Id="BundlePackages"> |
| 23 | <ExePackage SourceFile="$(var.ReplaceConfig.TargetPath)" bal:PrereqPackage="yes" | ||
| 24 | Permanent="yes" DetectCondition="NOT GoodConfigPresent OR CAUSEINFINITELOOP = 1" | ||
| 25 | InstallArguments=""[BARuntimeDirectory]TestBA.runtimeconfig.json" "[BARuntimeDirectory]good.runtimeconfig.json" "[BARuntimeDirectory]bad.runtimeconfig.json"" /> | ||
| 18 | <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> | 26 | <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> |
| 19 | <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" Cache="force" /> | 27 | <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" Cache="force" /> |
| 20 | </PackageGroup> | 28 | </PackageGroup> |
| 21 | </Fragment> | 29 | </Fragment> |
| 22 | </Wix> | 30 | </Wix> |
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj index d4288d4b..843b382a 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wixproj | |||
| @@ -13,9 +13,12 @@ | |||
| 13 | </ItemGroup> | 13 | </ItemGroup> |
| 14 | <ItemGroup> | 14 | <ItemGroup> |
| 15 | <ProjectReference Include="..\PackageB\PackageB.wixproj" /> | 15 | <ProjectReference Include="..\PackageB\PackageB.wixproj" /> |
| 16 | <ProjectReference Include="..\PackageF\PackageF.wixproj" /> | 16 | <ProjectReference Include="..\PackageC\PackageC.wixproj" /> |
| 17 | <ProjectReference Include="..\PrereqBaf\PrereqBaf.vcxproj" /> | ||
| 18 | <ProjectReference Include="..\ReplaceConfig\ReplaceConfig.vcxproj" /> | ||
| 17 | </ItemGroup> | 19 | </ItemGroup> |
| 18 | <ItemGroup> | 20 | <ItemGroup> |
| 19 | <PackageReference Include="WixToolset.Bal.wixext" /> | 21 | <PackageReference Include="WixToolset.Bal.wixext" /> |
| 22 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 20 | </ItemGroup> | 23 | </ItemGroup> |
| 21 | </Project> \ No newline at end of file | 24 | </Project> \ 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 603c3aee..b7742582 100644 --- a/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs +++ b/src/test/burn/TestData/PrereqBaTests/BundleB/BundleB.wxs | |||
| @@ -1,21 +1,29 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> |
| 2 | 2 | ||
| 3 | 3 | ||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal"> | 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> |
| 5 | <Fragment> | 5 | <Fragment> |
| 6 | <BootstrapperApplication Id="BrokenMba"> | 6 | <BootstrapperApplication Id="BrokenMba"> |
| 7 | <Payload Name="good.config" SourceFile="!(bindpath.net2x86)\TestBA.BootstrapperCore.config" /> | ||
| 7 | <Payload Name="WixToolset.Mba.Host.config" SourceFile="bad.config" /> | 8 | <Payload Name="WixToolset.Mba.Host.config" SourceFile="bad.config" /> |
| 8 | <Payload SourceFile="!(bindpath.net2x86)\TestBA.dll" /> | 9 | <Payload SourceFile="!(bindpath.net2x86)\TestBA.dll" /> |
| 9 | <Payload SourceFile="!(bindpath.net2x86)\mbanative.dll" /> | 10 | <Payload SourceFile="!(bindpath.net2x86)\mbanative.dll" /> |
| 10 | <Payload SourceFile="!(bindpath.net2x86)\WixToolset.Mba.Core.dll" /> | 11 | <Payload SourceFile="!(bindpath.net2x86)\WixToolset.Mba.Core.dll" /> |
| 12 | <Payload SourceFile="$(var.PrereqBaf.TargetPath)" bal:BAFunctions="yes" /> | ||
| 11 | <bal:WixManagedBootstrapperApplicationHost /> | 13 | <bal:WixManagedBootstrapperApplicationHost /> |
| 12 | </BootstrapperApplication> | 14 | </BootstrapperApplication> |
| 13 | </Fragment> | 15 | </Fragment> |
| 14 | 16 | ||
| 15 | <Fragment> | 17 | <Fragment> |
| 18 | <util:FileSearch Variable="GoodConfigPresent" Path="[BARuntimeDirectory]\good.config" Result="exists" /> | ||
| 19 | <Variable Name="CAUSEINFINITELOOP" bal:Overridable="yes" /> | ||
| 20 | |||
| 16 | <PackageGroup Id="BundlePackages"> | 21 | <PackageGroup Id="BundlePackages"> |
| 22 | <ExePackage SourceFile="$(var.ReplaceConfig.TargetPath)" bal:PrereqPackage="yes" | ||
| 23 | Permanent="yes" DetectCondition="NOT GoodConfigPresent OR CAUSEINFINITELOOP = 1" | ||
| 24 | InstallArguments=""[BARuntimeDirectory]WixToolset.Mba.Host.config" "[BARuntimeDirectory]good.config" "[BARuntimeDirectory]bad.config"" /> | ||
| 17 | <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> | 25 | <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> |
| 18 | <MsiPackage Id="PackageF" SourceFile="$(var.PackageF.TargetPath)" /> | 26 | <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" /> |
| 19 | </PackageGroup> | 27 | </PackageGroup> |
| 20 | </Fragment> | 28 | </Fragment> |
| 21 | </Wix> | 29 | </Wix> |
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj new file mode 100644 index 00000000..81641f66 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wixproj | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <OutputType>Bundle</OutputType> | ||
| 5 | <BA>BrokenDncAlwaysPrereq</BA> | ||
| 6 | <UpgradeCode>{D2763AB7-979B-485C-AE52-DD03C23CCB93}</UpgradeCode> | ||
| 7 | </PropertyGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
| 10 | </ItemGroup> | ||
| 11 | <ItemGroup> | ||
| 12 | <BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net6.0-windows\win-x86" BindName="dncx86" /> | ||
| 13 | </ItemGroup> | ||
| 14 | <ItemGroup> | ||
| 15 | <ProjectReference Include="..\PackageA\PackageA.wixproj" /> | ||
| 16 | <ProjectReference Include="..\PackageC\PackageC.wixproj" /> | ||
| 17 | <ProjectReference Include="..\PrereqBaf\PrereqBaf.vcxproj" /> | ||
| 18 | <ProjectReference Include="..\ReplaceConfig\ReplaceConfig.vcxproj" /> | ||
| 19 | </ItemGroup> | ||
| 20 | <ItemGroup> | ||
| 21 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
| 22 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 23 | </ItemGroup> | ||
| 24 | </Project> \ 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 new file mode 100644 index 00000000..fe9425f7 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/BundleC.wxs | |||
| @@ -0,0 +1,30 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | |||
| 3 | |||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 5 | <Fragment> | ||
| 6 | <BootstrapperApplication Id="BrokenDncAlwaysPrereq"> | ||
| 7 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.deps.json" /> | ||
| 8 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.dll" bal:BAFactoryAssembly="yes" /> | ||
| 9 | <Payload Name="good.runtimeconfig.json" SourceFile="!(bindpath.dncx86)\TestBA.runtimeconfig.json" /> | ||
| 10 | <Payload Name="TestBA.runtimeconfig.json" SourceFile="bad.runtimeconfig.json" /> | ||
| 11 | <Payload SourceFile="!(bindpath.dncx86)\mbanative.dll" /> | ||
| 12 | <Payload SourceFile="!(bindpath.dncx86)\WixToolset.Mba.Core.dll" /> | ||
| 13 | <Payload SourceFile="$(var.PrereqBaf.TargetPath)" bal:BAFunctions="yes" /> | ||
| 14 | <bal:WixDotNetCoreBootstrapperApplicationHost AlwaysInstallPrereqs="yes" /> | ||
| 15 | </BootstrapperApplication> | ||
| 16 | </Fragment> | ||
| 17 | |||
| 18 | <Fragment> | ||
| 19 | <util:FileSearch Variable="GoodConfigPresent" Path="[BARuntimeDirectory]\good.runtimeconfig.json" Result="exists" /> | ||
| 20 | <Variable Name="CAUSEINFINITELOOP" bal:Overridable="yes" /> | ||
| 21 | |||
| 22 | <PackageGroup Id="BundlePackages"> | ||
| 23 | <ExePackage SourceFile="$(var.ReplaceConfig.TargetPath)" bal:PrereqPackage="yes" | ||
| 24 | Permanent="yes" DetectCondition="NOT GoodConfigPresent OR CAUSEINFINITELOOP = 1" | ||
| 25 | InstallArguments=""[BARuntimeDirectory]TestBA.runtimeconfig.json" "[BARuntimeDirectory]good.runtimeconfig.json" "[BARuntimeDirectory]bad.runtimeconfig.json"" /> | ||
| 26 | <MsiPackage Id="PackageA" SourceFile="$(var.PackageA.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> | ||
| 27 | <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" Cache="force" /> | ||
| 28 | </PackageGroup> | ||
| 29 | </Fragment> | ||
| 30 | </Wix> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleC/bad.runtimeconfig.json b/src/test/burn/TestData/PrereqBaTests/BundleC/bad.runtimeconfig.json new file mode 100644 index 00000000..07a1a830 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleC/bad.runtimeconfig.json | |||
| @@ -0,0 +1,10 @@ | |||
| 1 | { | ||
| 2 | "runtimeOptions": { | ||
| 3 | "tfm": "net5.5", | ||
| 4 | "rollForward": "Disable", | ||
| 5 | "framework": { | ||
| 6 | "name": "Microsoft.WindowsDesktop.App", | ||
| 7 | "version": "5.5.0" | ||
| 8 | } | ||
| 9 | } | ||
| 10 | } \ No newline at end of file | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj new file mode 100644 index 00000000..314fe2e2 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wixproj | |||
| @@ -0,0 +1,24 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <OutputType>Bundle</OutputType> | ||
| 5 | <BA>BrokenMbaAlwaysPrereq</BA> | ||
| 6 | <UpgradeCode>{415CA128-60E1-4D16-ACE8-A1D43E98B997}</UpgradeCode> | ||
| 7 | </PropertyGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
| 10 | </ItemGroup> | ||
| 11 | <ItemGroup> | ||
| 12 | <BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net35\win-x86" BindName="net2x86" /> | ||
| 13 | </ItemGroup> | ||
| 14 | <ItemGroup> | ||
| 15 | <ProjectReference Include="..\PackageB\PackageB.wixproj" /> | ||
| 16 | <ProjectReference Include="..\PackageC\PackageC.wixproj" /> | ||
| 17 | <ProjectReference Include="..\PrereqBaf\PrereqBaf.vcxproj" /> | ||
| 18 | <ProjectReference Include="..\ReplaceConfig\ReplaceConfig.vcxproj" /> | ||
| 19 | </ItemGroup> | ||
| 20 | <ItemGroup> | ||
| 21 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
| 22 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 23 | </ItemGroup> | ||
| 24 | </Project> \ 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 new file mode 100644 index 00000000..0e866295 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleD/BundleD.wxs | |||
| @@ -0,0 +1,29 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | |||
| 3 | |||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 5 | <Fragment> | ||
| 6 | <BootstrapperApplication Id="BrokenMbaAlwaysPrereq"> | ||
| 7 | <Payload Name="good.config" SourceFile="!(bindpath.net2x86)\TestBA.BootstrapperCore.config" /> | ||
| 8 | <Payload Name="WixToolset.Mba.Host.config" SourceFile="bad.config" /> | ||
| 9 | <Payload SourceFile="!(bindpath.net2x86)\TestBA.dll" /> | ||
| 10 | <Payload SourceFile="!(bindpath.net2x86)\mbanative.dll" /> | ||
| 11 | <Payload SourceFile="!(bindpath.net2x86)\WixToolset.Mba.Core.dll" /> | ||
| 12 | <Payload SourceFile="$(var.PrereqBaf.TargetPath)" bal:BAFunctions="yes" /> | ||
| 13 | <bal:WixManagedBootstrapperApplicationHost AlwaysInstallPrereqs="yes" /> | ||
| 14 | </BootstrapperApplication> | ||
| 15 | </Fragment> | ||
| 16 | |||
| 17 | <Fragment> | ||
| 18 | <util:FileSearch Variable="GoodConfigPresent" Path="[BARuntimeDirectory]\good.config" Result="exists" /> | ||
| 19 | <Variable Name="CAUSEINFINITELOOP" bal:Overridable="yes" /> | ||
| 20 | |||
| 21 | <PackageGroup Id="BundlePackages"> | ||
| 22 | <ExePackage SourceFile="$(var.ReplaceConfig.TargetPath)" bal:PrereqPackage="yes" | ||
| 23 | Permanent="yes" DetectCondition="NOT GoodConfigPresent OR CAUSEINFINITELOOP = 1" | ||
| 24 | InstallArguments=""[BARuntimeDirectory]WixToolset.Mba.Host.config" "[BARuntimeDirectory]good.config" "[BARuntimeDirectory]bad.config"" /> | ||
| 25 | <MsiPackage Id="PackageB" SourceFile="$(var.PackageB.TargetPath)" bal:PrereqPackage="yes" Permanent="yes" /> | ||
| 26 | <MsiPackage Id="PackageC" SourceFile="$(var.PackageC.TargetPath)" /> | ||
| 27 | </PackageGroup> | ||
| 28 | </Fragment> | ||
| 29 | </Wix> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleD/bad.config b/src/test/burn/TestData/PrereqBaTests/BundleD/bad.config new file mode 100644 index 00000000..1512e59a --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleD/bad.config | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8" ?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | |||
| 5 | <configuration> | ||
| 6 | <configSections> | ||
| 7 | <sectionGroup name="wix.bootstrapper" type="WixToolset.Mba.Host.BootstrapperSectionGroup, WixToolset.Mba.Host"> | ||
| 8 | <section name="host" type="WixToolset.Mba.Host.HostSection, WixToolset.Mba.Host" /> | ||
| 9 | </sectionGroup> | ||
| 10 | </configSections> | ||
| 11 | <startup> | ||
| 12 | <supportedRuntime version="v4.0" sku=".NETFramework,Version=v5.8" /> | ||
| 13 | </startup> | ||
| 14 | <wix.bootstrapper> | ||
| 15 | <host assemblyName="TestBA" /> | ||
| 16 | </wix.bootstrapper> | ||
| 17 | </configuration> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj new file mode 100644 index 00000000..5d271f55 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wixproj | |||
| @@ -0,0 +1,22 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <PropertyGroup> | ||
| 4 | <OutputType>Bundle</OutputType> | ||
| 5 | <BA>DncAlwaysPrereq</BA> | ||
| 6 | <UpgradeCode>{2F61ECD8-C28B-4FF9-9609-0E9633716CF9}</UpgradeCode> | ||
| 7 | </PropertyGroup> | ||
| 8 | <ItemGroup> | ||
| 9 | <Compile Include="..\..\Templates\Bundle.wxs" Link="Bundle.wxs" /> | ||
| 10 | </ItemGroup> | ||
| 11 | <ItemGroup> | ||
| 12 | <BindInputPaths Include="$(BaseOutputPath)$(Configuration)\net6.0-windows\win-x86" BindName="dncx86" /> | ||
| 13 | </ItemGroup> | ||
| 14 | <ItemGroup> | ||
| 15 | <ProjectReference Include="..\PrereqBaf\PrereqBaf.vcxproj" /> | ||
| 16 | <ProjectReference Include="..\ReplaceConfig\ReplaceConfig.vcxproj" /> | ||
| 17 | </ItemGroup> | ||
| 18 | <ItemGroup> | ||
| 19 | <PackageReference Include="WixToolset.Bal.wixext" /> | ||
| 20 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 21 | </ItemGroup> | ||
| 22 | </Project> \ 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 new file mode 100644 index 00000000..5f2e6a75 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/BundleE/BundleE.wxs | |||
| @@ -0,0 +1,26 @@ | |||
| 1 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 2 | |||
| 3 | |||
| 4 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:bal="http://wixtoolset.org/schemas/v4/wxs/bal" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 5 | <Fragment> | ||
| 6 | <BootstrapperApplication Id="DncAlwaysPrereq"> | ||
| 7 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.deps.json" /> | ||
| 8 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.dll" bal:BAFactoryAssembly="yes" /> | ||
| 9 | <Payload SourceFile="!(bindpath.dncx86)\TestBA.runtimeconfig.json" /> | ||
| 10 | <Payload SourceFile="!(bindpath.dncx86)\mbanative.dll" /> | ||
| 11 | <Payload SourceFile="!(bindpath.dncx86)\WixToolset.Mba.Core.dll" /> | ||
| 12 | <Payload SourceFile="$(var.PrereqBaf.TargetPath)" bal:BAFunctions="yes" /> | ||
| 13 | <bal:WixDotNetCoreBootstrapperApplicationHost AlwaysInstallPrereqs="yes" /> | ||
| 14 | </BootstrapperApplication> | ||
| 15 | </Fragment> | ||
| 16 | |||
| 17 | <Fragment> | ||
| 18 | <util:FileSearch Variable="GoodConfigPresent" Path="[BARuntimeDirectory]\good.runtimeconfig.json" Result="exists" /> | ||
| 19 | |||
| 20 | <PackageGroup Id="BundlePackages"> | ||
| 21 | <ExePackage SourceFile="$(var.ReplaceConfig.TargetPath)" bal:PrereqPackage="yes" | ||
| 22 | Permanent="yes" DetectCondition="NOT GoodConfigPresent" | ||
| 23 | InstallArguments=""[BARuntimeDirectory]TestBA.runtimeconfig.json" "[BARuntimeDirectory]good.runtimeconfig.json" "[BARuntimeDirectory]bad.runtimeconfig.json"" /> | ||
| 24 | </PackageGroup> | ||
| 25 | </Fragment> | ||
| 26 | </Wix> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj b/src/test/burn/TestData/PrereqBaTests/PackageC/PackageC.wixproj index 00ffb7d8..1c8c4fa8 100644 --- a/src/test/burn/TestData/PrereqBaTests/PackageF/PackageF.wixproj +++ b/src/test/burn/TestData/PrereqBaTests/PackageC/PackageC.wixproj | |||
| @@ -4,9 +4,6 @@ | |||
| 4 | <UpgradeCode>{7DEEE928-CD7F-49AD-8000-2ED6339D8A78}</UpgradeCode> | 4 | <UpgradeCode>{7DEEE928-CD7F-49AD-8000-2ED6339D8A78}</UpgradeCode> |
| 5 | </PropertyGroup> | 5 | </PropertyGroup> |
| 6 | <ItemGroup> | 6 | <ItemGroup> |
| 7 | <Compile Include="..\..\Templates\PackageFail.wxs" Link="PackageFail.wxs" /> | 7 | <Compile Include="..\..\Templates\Package.wxs" Link="Package.wxs" /> |
| 8 | </ItemGroup> | ||
| 9 | <ItemGroup> | ||
| 10 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 11 | </ItemGroup> | 8 | </ItemGroup> |
| 12 | </Project> \ No newline at end of file | 9 | </Project> \ No newline at end of file |
diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp new file mode 100644 index 00000000..35949eb9 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.cpp | |||
| @@ -0,0 +1,79 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | #include "BalBaseBAFunctions.h" | ||
| 5 | #include "BalBaseBAFunctionsProc.h" | ||
| 6 | |||
| 7 | class CPrereqBaf : public CBalBaseBAFunctions | ||
| 8 | { | ||
| 9 | public: // IBAFunctions | ||
| 10 | |||
| 11 | public: //IBootstrapperApplication | ||
| 12 | |||
| 13 | virtual STDMETHODIMP OnDetectBegin( | ||
| 14 | __in BOOL /*fCached*/, | ||
| 15 | __in BOOTSTRAPPER_REGISTRATION_TYPE /*registrationType*/, | ||
| 16 | __in DWORD /*cPackages*/, | ||
| 17 | __inout BOOL* /*pfCancel*/ | ||
| 18 | ) | ||
| 19 | { | ||
| 20 | HRESULT hr = S_OK; | ||
| 21 | |||
| 22 | hr = m_pEngine->SetVariableString(L"BARuntimeDirectory", m_command.wzBootstrapperWorkingFolder, FALSE); | ||
| 23 | ExitOnFailure(hr, "Failed to set BARuntimeDirectory"); | ||
| 24 | |||
| 25 | LExit: | ||
| 26 | return hr; | ||
| 27 | } | ||
| 28 | |||
| 29 | private: | ||
| 30 | |||
| 31 | public: | ||
| 32 | // | ||
| 33 | // Constructor - initialize member variables. | ||
| 34 | // | ||
| 35 | CPrereqBaf( | ||
| 36 | __in HMODULE hModule, | ||
| 37 | __in IBootstrapperEngine* pEngine, | ||
| 38 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs | ||
| 39 | ) : CBalBaseBAFunctions(hModule, pEngine, pArgs) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | // | ||
| 44 | // Destructor - release member variables. | ||
| 45 | // | ||
| 46 | ~CPrereqBaf() | ||
| 47 | { | ||
| 48 | } | ||
| 49 | |||
| 50 | private: | ||
| 51 | }; | ||
| 52 | |||
| 53 | |||
| 54 | HRESULT WINAPI CreateBAFunctions( | ||
| 55 | __in HMODULE hModule, | ||
| 56 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 57 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 58 | ) | ||
| 59 | { | ||
| 60 | HRESULT hr = S_OK; | ||
| 61 | CPrereqBaf* pBAFunctions = NULL; | ||
| 62 | IBootstrapperEngine* pEngine = NULL; | ||
| 63 | |||
| 64 | hr = BalInitializeFromCreateArgs(pArgs->pBootstrapperCreateArgs, &pEngine); | ||
| 65 | ExitOnFailure(hr, "Failed to initialize Bal."); | ||
| 66 | |||
| 67 | pBAFunctions = new CPrereqBaf(hModule, pEngine, pArgs); | ||
| 68 | ExitOnNull(pBAFunctions, hr, E_OUTOFMEMORY, "Failed to create new CPrereqBaf object."); | ||
| 69 | |||
| 70 | pResults->pfnBAFunctionsProc = BalBaseBAFunctionsProc; | ||
| 71 | pResults->pvBAFunctionsProcContext = pBAFunctions; | ||
| 72 | pBAFunctions = NULL; | ||
| 73 | |||
| 74 | LExit: | ||
| 75 | ReleaseObject(pBAFunctions); | ||
| 76 | ReleaseObject(pEngine); | ||
| 77 | |||
| 78 | return hr; | ||
| 79 | } | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.def b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.def new file mode 100644 index 00000000..6e016dad --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.def | |||
| @@ -0,0 +1,6 @@ | |||
| 1 | ; Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | |||
| 4 | EXPORTS | ||
| 5 | BAFunctionsCreate | ||
| 6 | BAFunctionsDestroy | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj new file mode 100644 index 00000000..0d8d63be --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/PrereqBaf.vcxproj | |||
| @@ -0,0 +1,66 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | <Project DefaultTargets="Build" Toolsxmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 5 | <ItemGroup Label="ProjectConfigurations"> | ||
| 6 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 7 | <Configuration>Debug</Configuration> | ||
| 8 | <Platform>ARM64</Platform> | ||
| 9 | </ProjectConfiguration> | ||
| 10 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 11 | <Configuration>Release</Configuration> | ||
| 12 | <Platform>ARM64</Platform> | ||
| 13 | </ProjectConfiguration> | ||
| 14 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 15 | <Configuration>Debug</Configuration> | ||
| 16 | <Platform>Win32</Platform> | ||
| 17 | </ProjectConfiguration> | ||
| 18 | <ProjectConfiguration Include="Release|Win32"> | ||
| 19 | <Configuration>Release</Configuration> | ||
| 20 | <Platform>Win32</Platform> | ||
| 21 | </ProjectConfiguration> | ||
| 22 | <ProjectConfiguration Include="Debug|x64"> | ||
| 23 | <Configuration>Debug</Configuration> | ||
| 24 | <Platform>x64</Platform> | ||
| 25 | </ProjectConfiguration> | ||
| 26 | <ProjectConfiguration Include="Release|x64"> | ||
| 27 | <Configuration>Release</Configuration> | ||
| 28 | <Platform>x64</Platform> | ||
| 29 | </ProjectConfiguration> | ||
| 30 | </ItemGroup> | ||
| 31 | |||
| 32 | <PropertyGroup Label="Globals"> | ||
| 33 | <ProjectGuid>{C0A11DDB-6CCE-44EC-88FD-93910C2916E3}</ProjectGuid> | ||
| 34 | <ConfigurationType>DynamicLibrary</ConfigurationType> | ||
| 35 | <CharacterSet>Unicode</CharacterSet> | ||
| 36 | <TargetName>PrereqBaf</TargetName> | ||
| 37 | <ProjectModuleDefinitionFile>PrereqBaf.def</ProjectModuleDefinitionFile> | ||
| 38 | <IsWixTestProject>true</IsWixTestProject> | ||
| 39 | </PropertyGroup> | ||
| 40 | |||
| 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 43 | |||
| 44 | <PropertyGroup> | ||
| 45 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib</ProjectAdditionalLinkLibraries> | ||
| 46 | </PropertyGroup> | ||
| 47 | |||
| 48 | <ItemGroup> | ||
| 49 | <ClCompile Include="precomp.cpp"> | ||
| 50 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
| 51 | </ClCompile> | ||
| 52 | <ClCompile Include="PrereqBaf.cpp" /> | ||
| 53 | </ItemGroup> | ||
| 54 | <ItemGroup> | ||
| 55 | <ClInclude Include="precomp.h" /> | ||
| 56 | </ItemGroup> | ||
| 57 | <ItemGroup> | ||
| 58 | <None Include="PrereqBaf.def" /> | ||
| 59 | </ItemGroup> | ||
| 60 | |||
| 61 | <ItemGroup> | ||
| 62 | <PackageReference Include="WixToolset.BalUtil" /> | ||
| 63 | </ItemGroup> | ||
| 64 | |||
| 65 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 66 | </Project> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.cpp b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.cpp new file mode 100644 index 00000000..fc9d1177 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.cpp | |||
| @@ -0,0 +1,48 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | |||
| 5 | static HINSTANCE vhInstance = NULL; | ||
| 6 | |||
| 7 | extern "C" BOOL WINAPI DllMain( | ||
| 8 | IN HINSTANCE hInstance, | ||
| 9 | IN DWORD dwReason, | ||
| 10 | IN LPVOID /* pvReserved */ | ||
| 11 | ) | ||
| 12 | { | ||
| 13 | switch (dwReason) | ||
| 14 | { | ||
| 15 | case DLL_PROCESS_ATTACH: | ||
| 16 | ::DisableThreadLibraryCalls(hInstance); | ||
| 17 | vhInstance = hInstance; | ||
| 18 | break; | ||
| 19 | |||
| 20 | case DLL_PROCESS_DETACH: | ||
| 21 | vhInstance = NULL; | ||
| 22 | break; | ||
| 23 | } | ||
| 24 | |||
| 25 | return TRUE; | ||
| 26 | } | ||
| 27 | |||
| 28 | extern "C" HRESULT WINAPI BAFunctionsCreate( | ||
| 29 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 30 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 31 | ) | ||
| 32 | { | ||
| 33 | HRESULT hr = S_OK; | ||
| 34 | |||
| 35 | hr = CreateBAFunctions(vhInstance, pArgs, pResults); | ||
| 36 | BalExitOnFailure(hr, "Failed to create BAFunctions interface."); | ||
| 37 | |||
| 38 | LExit: | ||
| 39 | return hr; | ||
| 40 | } | ||
| 41 | |||
| 42 | extern "C" void WINAPI BAFunctionsDestroy( | ||
| 43 | __in const BA_FUNCTIONS_DESTROY_ARGS* /*pArgs*/, | ||
| 44 | __inout BA_FUNCTIONS_DESTROY_RESULTS* /*pResults*/ | ||
| 45 | ) | ||
| 46 | { | ||
| 47 | BalUninitialize(); | ||
| 48 | } | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.h b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.h new file mode 100644 index 00000000..8320bdd8 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/PrereqBaf/precomp.h | |||
| @@ -0,0 +1,31 @@ | |||
| 1 | #pragma once | ||
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 3 | |||
| 4 | |||
| 5 | #include <windows.h> | ||
| 6 | #include <msiquery.h> | ||
| 7 | #include <objbase.h> | ||
| 8 | #include <shlobj.h> | ||
| 9 | #include <shlwapi.h> | ||
| 10 | #include <stdlib.h> | ||
| 11 | #include <strsafe.h> | ||
| 12 | #include <CommCtrl.h> | ||
| 13 | |||
| 14 | #include "dutil.h" | ||
| 15 | #include "dictutil.h" | ||
| 16 | #include "fileutil.h" | ||
| 17 | #include "locutil.h" | ||
| 18 | #include "pathutil.h" | ||
| 19 | #include "strutil.h" | ||
| 20 | |||
| 21 | #include "BalBaseBootstrapperApplication.h" | ||
| 22 | #include "balutil.h" | ||
| 23 | |||
| 24 | #include "BAFunctions.h" | ||
| 25 | #include "IBAFunctions.h" | ||
| 26 | |||
| 27 | HRESULT WINAPI CreateBAFunctions( | ||
| 28 | __in HMODULE hModule, | ||
| 29 | __in const BA_FUNCTIONS_CREATE_ARGS* pArgs, | ||
| 30 | __inout BA_FUNCTIONS_CREATE_RESULTS* pResults | ||
| 31 | ); | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.cpp b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.cpp new file mode 100644 index 00000000..1fa71bc2 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.cpp | |||
| @@ -0,0 +1,33 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
| 4 | |||
| 5 | int __cdecl wmain( | ||
| 6 | __in int argc, | ||
| 7 | __in LPWSTR argv[] | ||
| 8 | ) | ||
| 9 | { | ||
| 10 | HRESULT hr = S_OK; | ||
| 11 | DWORD dwExitCode = 0; | ||
| 12 | LPCWSTR wzDestinationFile = argc > 1 ? argv[1] : NULL; | ||
| 13 | LPCWSTR wzGoodFile = argc > 2 ? argv[2] : NULL; | ||
| 14 | LPCWSTR wzBadFile = argc > 3 ? argv[3] : NULL; | ||
| 15 | |||
| 16 | if (argc != 4) | ||
| 17 | { | ||
| 18 | ExitWithRootFailure(hr, E_INVALIDARG, "Invalid args"); | ||
| 19 | } | ||
| 20 | |||
| 21 | if (!::MoveFileW(wzDestinationFile, wzBadFile)) | ||
| 22 | { | ||
| 23 | ExitWithLastError(hr, "Failed to move bad file"); | ||
| 24 | } | ||
| 25 | |||
| 26 | if (!::MoveFileW(wzGoodFile, wzDestinationFile)) | ||
| 27 | { | ||
| 28 | ExitWithLastError(hr, "Failed to move good file"); | ||
| 29 | } | ||
| 30 | |||
| 31 | LExit: | ||
| 32 | return FAILED(hr) ? (int)hr : (int)dwExitCode; | ||
| 33 | } | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.vcxproj b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.vcxproj new file mode 100644 index 00000000..c5d7b046 --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/ReplaceConfig.vcxproj | |||
| @@ -0,0 +1,63 @@ | |||
| 1 | <?xml version="1.0" encoding="utf-8"?> | ||
| 2 | <!-- Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. --> | ||
| 3 | |||
| 4 | <Project DefaultTargets="Build" Toolsxmlns="http://schemas.microsoft.com/developer/msbuild/2003"> | ||
| 5 | <ItemGroup Label="ProjectConfigurations"> | ||
| 6 | <ProjectConfiguration Include="Debug|ARM64"> | ||
| 7 | <Configuration>Debug</Configuration> | ||
| 8 | <Platform>ARM64</Platform> | ||
| 9 | </ProjectConfiguration> | ||
| 10 | <ProjectConfiguration Include="Release|ARM64"> | ||
| 11 | <Configuration>Release</Configuration> | ||
| 12 | <Platform>ARM64</Platform> | ||
| 13 | </ProjectConfiguration> | ||
| 14 | <ProjectConfiguration Include="Debug|Win32"> | ||
| 15 | <Configuration>Debug</Configuration> | ||
| 16 | <Platform>Win32</Platform> | ||
| 17 | </ProjectConfiguration> | ||
| 18 | <ProjectConfiguration Include="Release|Win32"> | ||
| 19 | <Configuration>Release</Configuration> | ||
| 20 | <Platform>Win32</Platform> | ||
| 21 | </ProjectConfiguration> | ||
| 22 | <ProjectConfiguration Include="Debug|x64"> | ||
| 23 | <Configuration>Debug</Configuration> | ||
| 24 | <Platform>x64</Platform> | ||
| 25 | </ProjectConfiguration> | ||
| 26 | <ProjectConfiguration Include="Release|x64"> | ||
| 27 | <Configuration>Release</Configuration> | ||
| 28 | <Platform>x64</Platform> | ||
| 29 | </ProjectConfiguration> | ||
| 30 | </ItemGroup> | ||
| 31 | |||
| 32 | <PropertyGroup Label="Globals"> | ||
| 33 | <ProjectGuid>{3D10A07D-3321-4F8E-B884-951F8FB5D636}</ProjectGuid> | ||
| 34 | <ConfigurationType>Application</ConfigurationType> | ||
| 35 | <ProjectSubSystem>Console</ProjectSubSystem> | ||
| 36 | <CharacterSet>Unicode</CharacterSet> | ||
| 37 | <TargetName>ReplaceConfig</TargetName> | ||
| 38 | <IsWixTestProject>true</IsWixTestProject> | ||
| 39 | </PropertyGroup> | ||
| 40 | |||
| 41 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" /> | ||
| 42 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" /> | ||
| 43 | |||
| 44 | <PropertyGroup> | ||
| 45 | <ProjectAdditionalLinkLibraries>comctl32.lib;gdiplus.lib;msimg32.lib;shlwapi.lib;wininet.lib</ProjectAdditionalLinkLibraries> | ||
| 46 | </PropertyGroup> | ||
| 47 | |||
| 48 | <ItemGroup> | ||
| 49 | <ClCompile Include="precomp.cpp"> | ||
| 50 | <PrecompiledHeader>Create</PrecompiledHeader> | ||
| 51 | </ClCompile> | ||
| 52 | <ClCompile Include="ReplaceConfig.cpp" /> | ||
| 53 | </ItemGroup> | ||
| 54 | <ItemGroup> | ||
| 55 | <ClInclude Include="precomp.h" /> | ||
| 56 | </ItemGroup> | ||
| 57 | |||
| 58 | <ItemGroup> | ||
| 59 | <PackageReference Include="WixToolset.DUtil" /> | ||
| 60 | </ItemGroup> | ||
| 61 | |||
| 62 | <Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" /> | ||
| 63 | </Project> | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.cpp b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.cpp new file mode 100644 index 00000000..37664a1c --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.cpp | |||
| @@ -0,0 +1,3 @@ | |||
| 1 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 2 | |||
| 3 | #include "precomp.h" | ||
diff --git a/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.h b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.h new file mode 100644 index 00000000..f4180c2e --- /dev/null +++ b/src/test/burn/TestData/PrereqBaTests/ReplaceConfig/precomp.h | |||
| @@ -0,0 +1,17 @@ | |||
| 1 | #pragma once | ||
| 2 | // Copyright (c) .NET Foundation and contributors. All rights reserved. Licensed under the Microsoft Reciprocal License. See LICENSE.TXT file in the project root for full license information. | ||
| 3 | |||
| 4 | |||
| 5 | #include <windows.h> | ||
| 6 | #include <msiquery.h> | ||
| 7 | #include <objbase.h> | ||
| 8 | #include <shlobj.h> | ||
| 9 | #include <shlwapi.h> | ||
| 10 | #include <stdlib.h> | ||
| 11 | #include <strsafe.h> | ||
| 12 | #include <CommCtrl.h> | ||
| 13 | |||
| 14 | #include "dutil.h" | ||
| 15 | #include "fileutil.h" | ||
| 16 | #include "pathutil.h" | ||
| 17 | #include "strutil.h" | ||
