diff options
author | Bob Arnson <bob@firegiant.com> | 2025-03-10 12:05:05 -0400 |
---|---|---|
committer | Bob Arnson <github@bobs.org> | 2025-03-10 15:13:24 -0400 |
commit | 63d1d722bb7ddcbc9ef6730791ae967bf3880f71 (patch) | |
tree | dba578b455d872b6550d549752536e36ba471645 /src | |
parent | ae4c3947277a5c05368276c31bc2cd562d7580bb (diff) | |
download | wix-63d1d722bb7ddcbc9ef6730791ae967bf3880f71.tar.gz wix-63d1d722bb7ddcbc9ef6730791ae967bf3880f71.tar.bz2 wix-63d1d722bb7ddcbc9ef6730791ae967bf3880f71.zip |
Set keypath when parsing naked File child elements
Fixes https://github.com/wixtoolset/issues/issues/8976
Diffstat (limited to 'src')
3 files changed, 6 insertions, 9 deletions
diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs index b4980b07..2efca5eb 100644 --- a/src/wix/WixToolset.Core/Compiler.cs +++ b/src/wix/WixToolset.Core/Compiler.cs | |||
@@ -5694,7 +5694,7 @@ namespace WixToolset.Core | |||
5694 | // so and create a file and component symbol with the right data. | 5694 | // so and create a file and component symbol with the right data. |
5695 | id = id ?? this.Core.CreateIdentifier("nkf", directoryId, name, condition, win64.ToString()); | 5695 | id = id ?? this.Core.CreateIdentifier("nkf", directoryId, name, condition, win64.ToString()); |
5696 | 5696 | ||
5697 | var keyPath = this.ParseFileElementOtherAttributes(node, id.Id, directoryId, diskId: CompilerConstants.IntegerNotSet, id, name, shortName, source, out var _, componentGuid: "*", isNakedFile: true, fileSymbol: out var fileSymbol, assemblySymbol: out var assemblySymbol); | 5697 | this.ParseFileElementOtherAttributes(node, id.Id, directoryId, diskId: CompilerConstants.IntegerNotSet, id, name, shortName, source, out var _, componentGuid: "*", isNakedFile: true, fileSymbol: out var fileSymbol, assemblySymbol: out var assemblySymbol); |
5698 | 5698 | ||
5699 | this.Core.AddSymbol(fileSymbol); | 5699 | this.Core.AddSymbol(fileSymbol); |
5700 | 5700 | ||
@@ -5721,7 +5721,7 @@ namespace WixToolset.Core | |||
5721 | this.Core.AddSymbol(assemblySymbol); | 5721 | this.Core.AddSymbol(assemblySymbol); |
5722 | } | 5722 | } |
5723 | 5723 | ||
5724 | this.ParseFileElementChildren(node, fileSymbol, keyPath, win64); | 5724 | this.ParseFileElementChildren(node, fileSymbol, keyPath: YesNoType.Yes, win64); |
5725 | 5725 | ||
5726 | // if this is a module, automatically add this component to the references to ensure it gets in the ModuleComponents table | 5726 | // if this is a module, automatically add this component to the references to ensure it gets in the ModuleComponents table |
5727 | if (this.compilingModule) | 5727 | if (this.compilingModule) |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/DirectoryRef.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/DirectoryRef.wxs index 6de50ac4..06f5feb2 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/DirectoryRef.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/DirectoryRef.wxs | |||
@@ -2,16 +2,11 @@ | |||
2 | <Package Name="MsiPackage" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | 2 | <Package Name="MsiPackage" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> |
3 | <MajorUpgrade DowngradeErrorMessage="Downgrade error message." /> | 3 | <MajorUpgrade DowngradeErrorMessage="Downgrade error message." /> |
4 | 4 | ||
5 | <!-- Relies on default INSTALLFOLDER feature. --> | ||
5 | <DirectoryRef Id="INSTALLFOLDER"> | 6 | <DirectoryRef Id="INSTALLFOLDER"> |
6 | <!-- Relies on default-feature feature to include naked files in package. --> | 7 | <!-- Relies on default-feature feature to include naked files in package. --> |
7 | <File Id="test.txt" Source="test.txt" /> | 8 | <File Id="test.txt" Source="test.txt" /> |
8 | <File Id="test2.txt" Source="test.txt" Name="test2.txt" /> | 9 | <File Id="test2.txt" Source="test.txt" Name="test2.txt" /> |
9 | </DirectoryRef> | 10 | </DirectoryRef> |
10 | </Package> | 11 | </Package> |
11 | |||
12 | <Fragment> | ||
13 | <StandardDirectory Id="ProgramFilesFolder"> | ||
14 | <Directory Id="INSTALLFOLDER" Name="MsiPackage" /> | ||
15 | </StandardDirectory> | ||
16 | </Fragment> | ||
17 | </Wix> | 12 | </Wix> |
diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/Package.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/Package.wxs index 9ddd4787..913dfc39 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/Package.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/NakedFile/Package.wxs | |||
@@ -1,6 +1,8 @@ | |||
1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> | 1 | <Wix xmlns="http://wixtoolset.org/schemas/v4/wxs"> |
2 | <Package Name="MsiPackage" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> | 2 | <Package Name="MsiPackage" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> |
3 | <File Directory="INSTALLFOLDER" Subdirectory="X" Source="test.txt" /> | 3 | <File Directory="INSTALLFOLDER" Subdirectory="X" Source="test.txt"> |
4 | <Shortcut Advertise="yes" Directory="ProgramMenuFolder" Name="Test" /> | ||
5 | </File> | ||
4 | <File Directory="INSTALLFOLDER" Subdirectory="X" Source="test.txt" Name="test2.txt" /> | 6 | <File Directory="INSTALLFOLDER" Subdirectory="X" Source="test.txt" Name="test2.txt" /> |
5 | <File Directory="INSTALLFOLDER" Subdirectory="X3" Source="test.txt" Name="test3.txt" /> | 7 | <File Directory="INSTALLFOLDER" Subdirectory="X3" Source="test.txt" Name="test3.txt" /> |
6 | <File Directory="INSTALLFOLDER" Subdirectory="X4" Source="test.txt" Name="test4.txt" /> | 8 | <File Directory="INSTALLFOLDER" Subdirectory="X4" Source="test.txt" Name="test4.txt" /> |