diff options
| author | Bob Arnson <bob@firegiant.com> | 2023-04-27 21:06:35 -0400 |
|---|---|---|
| committer | Bob Arnson <github@bobs.org> | 2023-04-27 23:28:39 -0400 |
| commit | ab8d368fe8e7a41e503ec295b196035922293ef4 (patch) | |
| tree | d423d78d327b06602bb3a2a0683b626ae2707c62 /src/test/msi/TestData | |
| parent | b3b9decfab8a26851e2bc85d777824220ff804b6 (diff) | |
| download | wix-ab8d368fe8e7a41e503ec295b196035922293ef4.tar.gz wix-ab8d368fe8e7a41e503ec295b196035922293ef4.tar.bz2 wix-ab8d368fe8e7a41e503ec295b196035922293ef4.zip | |
Fix XmlConfig lookup logic.
Fixes https://github.com/wixtoolset/issues/issues/7377.
Requires fix for https://github.com/wixtoolset/issues/issues/7444.
Diffstat (limited to 'src/test/msi/TestData')
3 files changed, 44 insertions, 0 deletions
diff --git a/src/test/msi/TestData/XmlConfigTests/XmlConfig/Package.wxs b/src/test/msi/TestData/XmlConfigTests/XmlConfig/Package.wxs new file mode 100644 index 00000000..e5223ea8 --- /dev/null +++ b/src/test/msi/TestData/XmlConfigTests/XmlConfig/Package.wxs | |||
| @@ -0,0 +1,27 @@ | |||
| 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> | ||
| 2 | <Package Name="XmlConfig" Language="1033" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | ||
| 3 | <MajorUpgrade DowngradeErrorMessage="A newer version of [ProductName] is already installed." /> | ||
| 4 | |||
| 5 | <Feature Id="ProductFeature" Title="XmlConfig"> | ||
| 6 | <Component Directory="INSTALLFOLDER"> | ||
| 7 | <File Id="MyXmlFile" Source="my.xml" /> | ||
| 8 | </Component> | ||
| 9 | |||
| 10 | <Component Id="Del" Directory="INSTALLFOLDER" Guid="3613414c-11f5-40fa-a1f1-a0ba722a6895"> | ||
| 11 | <util:XmlConfig Id="DelElement" File="[#MyXmlFile]" Action="delete" Node="element" VerifyPath="grandchild1" ElementPath="//root/child1" On="install" /> | ||
| 12 | </Component> | ||
| 13 | |||
| 14 | <Component Id="Add" Directory="INSTALLFOLDER" Guid="30A9FF8B-7AC8-47F3-BB24-9EA81AA38856"> | ||
| 15 | <util:XmlConfig Id="AddElement" File="[#MyXmlFile]" Action="create" Node="element" ElementPath="//root/child2" Name="grandchild3" On="install" Sequence="2" /> | ||
| 16 | <util:XmlConfig ElementId="AddElement" File="[#MyXmlFile]" Name="TheAttribute1" Value="AttributeValue1" Sequence="3" /> | ||
| 17 | <util:XmlConfig Id="AddAttribute2" ElementId="AddElement" File="[INSTALLFOLDER]my.xml" Name="TheAttribute2" Value="AttributeValue2" Sequence="4" /> | ||
| 18 | </Component> | ||
| 19 | </Feature> | ||
| 20 | </Package> | ||
| 21 | |||
| 22 | <Fragment> | ||
| 23 | <StandardDirectory Id="ProgramFilesFolder"> | ||
| 24 | <Directory Id="INSTALLFOLDER" Name="XmlConfig" /> | ||
| 25 | </StandardDirectory> | ||
| 26 | </Fragment> | ||
| 27 | </Wix> | ||
diff --git a/src/test/msi/TestData/XmlConfigTests/XmlConfig/XmlConfig.wixproj b/src/test/msi/TestData/XmlConfigTests/XmlConfig/XmlConfig.wixproj new file mode 100644 index 00000000..58321e7e --- /dev/null +++ b/src/test/msi/TestData/XmlConfigTests/XmlConfig/XmlConfig.wixproj | |||
| @@ -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 | <Project Sdk="WixToolset.Sdk"> | ||
| 3 | <ItemGroup> | ||
| 4 | <PackageReference Include="WixToolset.Util.wixext" /> | ||
| 5 | </ItemGroup> | ||
| 6 | </Project> \ No newline at end of file | ||
diff --git a/src/test/msi/TestData/XmlConfigTests/XmlConfig/my.xml b/src/test/msi/TestData/XmlConfigTests/XmlConfig/my.xml new file mode 100644 index 00000000..3f44c27c --- /dev/null +++ b/src/test/msi/TestData/XmlConfigTests/XmlConfig/my.xml | |||
| @@ -0,0 +1,11 @@ | |||
| 1 | <root> | ||
| 2 | <child1> | ||
| 3 | <grandchild1> | ||
| 4 | </grandchild1> | ||
| 5 | </child1> | ||
| 6 | |||
| 7 | <child2> | ||
| 8 | <grandchild2> | ||
| 9 | </grandchild2> | ||
| 10 | </child2> | ||
| 11 | </root> | ||
