aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--global.json2
-rw-r--r--src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs14
-rw-r--r--src/test/WixToolsetTest.Util/UtilExtensionFixture.cs4
-rw-r--r--src/wixext/UtilCompiler.cs25
4 files changed, 37 insertions, 8 deletions
diff --git a/global.json b/global.json
index f227ec06..745a2571 100644
--- a/global.json
+++ b/global.json
@@ -1,6 +1,6 @@
1{ 1{
2 "msbuild-sdks": { 2 "msbuild-sdks": {
3 "WixToolset.Sdk": "4.0.0-build-0186" 3 "WixToolset.Sdk": "4.0.0-build-0188"
4 }, 4 },
5 "sdk": { 5 "sdk": {
6 "allowPrerelease": false 6 "allowPrerelease": false
diff --git a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs
index 3c40b09a..7fef0725 100644
--- a/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs
+++ b/src/test/WixToolsetTest.Util/TestData/BundleWithSearches/Bundle.wxs
@@ -1,10 +1,11 @@
1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util"> 1<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs" xmlns:util="http://wixtoolset.org/schemas/v4/wxs/util">
2 <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a"> 2 <Bundle Name="!(loc.BundleName)" Version="1.0.0.0" Manufacturer="Example Corporation" UpgradeCode="047730a5-30fe-4a62-a520-da9381b8226a">
3 <BootstrapperApplication> 3 <BootstrapperApplication>
4 <BootstrapperApplicationDll SourceFile="fakeba.dll" /> 4 <BootstrapperApplicationDll SourceFile="fakeba.dll" />
5 </BootstrapperApplication> 5 </BootstrapperApplication>
6 6
7 <util:RegistrySearchRef Id="RegistrySearchId" /> 7 <util:RegistrySearchRef Id="RegistrySearchId" />
8 <util:RegistrySearchRef Id="RegistrySearchId64" />
8 <util:ProductSearchRef Id="ProductSearchId" /> 9 <util:ProductSearchRef Id="ProductSearchId" />
9 <util:FileSearchRef Id="FileSearchId" /> 10 <util:FileSearchRef Id="FileSearchId" />
10 <util:WindowsFeatureSearchRef Id="DetectSHA2SupportId" /> 11 <util:WindowsFeatureSearchRef Id="DetectSHA2SupportId" />
@@ -27,6 +28,17 @@
27 </Fragment> 28 </Fragment>
28 29
29 <Fragment> 30 <Fragment>
31 <util:RegistrySearch
32 Id="RegistrySearchId64"
33 Variable="RegistrySearchVariable64"
34 Root="HKLM"
35 Key="SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full"
36 Value="Release"
37 Result="value"
38 Bitness="always64" />
39 </Fragment>
40
41 <Fragment>
30 <util:ProductSearch Id="ProductSearchId" Variable="ProductSearchVariable" UpgradeCode="738D02BF-E231-4370-8209-E9FD4E1BE2A1" Condition="1 &amp; 2 &lt; 3" Result="version" /> 42 <util:ProductSearch Id="ProductSearchId" Variable="ProductSearchVariable" UpgradeCode="738D02BF-E231-4370-8209-E9FD4E1BE2A1" Condition="1 &amp; 2 &lt; 3" Result="version" />
31 </Fragment> 43 </Fragment>
32 44
diff --git a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs
index d9440614..e1a608d3 100644
--- a/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs
+++ b/src/test/WixToolsetTest.Util/UtilExtensionFixture.cs
@@ -243,7 +243,7 @@ namespace WixToolsetTest.Util
243 "</BundleExtension>", bundleExtensionDatas[0].GetTestXml()); 243 "</BundleExtension>", bundleExtensionDatas[0].GetTestXml());
244 244
245 var utilSearches = extractResult.SelectManifestNodes("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]"); 245 var utilSearches = extractResult.SelectManifestNodes("/burn:BurnManifest/*[self::burn:ExtensionSearch or self::burn:FileSearch or self::burn:MsiProductSearch or self::burn:RegistrySearch]");
246 Assert.Equal(4, utilSearches.Count); 246 Assert.Equal(5, utilSearches.Count);
247 Assert.Equal("<ExtensionSearch Id='DetectSHA2SupportId' Variable='IsSHA2Supported' " + 247 Assert.Equal("<ExtensionSearch Id='DetectSHA2SupportId' Variable='IsSHA2Supported' " +
248 "ExtensionId='Wix4UtilBundleExtension_X86' />", utilSearches[0].GetTestXml()); 248 "ExtensionId='Wix4UtilBundleExtension_X86' />", utilSearches[0].GetTestXml());
249 Assert.Equal("<FileSearch Id='FileSearchId' Variable='FileSearchVariable' " + 249 Assert.Equal("<FileSearch Id='FileSearchId' Variable='FileSearchVariable' " +
@@ -252,6 +252,8 @@ namespace WixToolsetTest.Util
252 "UpgradeCode='{738D02BF-E231-4370-8209-E9FD4E1BE2A1}' Type='version' />", utilSearches[2].GetTestXml()); 252 "UpgradeCode='{738D02BF-E231-4370-8209-E9FD4E1BE2A1}' Type='version' />", utilSearches[2].GetTestXml());
253 Assert.Equal("<RegistrySearch Id='RegistrySearchId' Variable='RegistrySearchVariable' " + 253 Assert.Equal("<RegistrySearch Id='RegistrySearchId' Variable='RegistrySearchVariable' " +
254 @"Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' VariableType='string' />", utilSearches[3].GetTestXml()); 254 @"Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' VariableType='string' />", utilSearches[3].GetTestXml());
255 Assert.Equal("<RegistrySearch Id='RegistrySearchId64' Variable='RegistrySearchVariable64' " +
256 @"Root='HKLM' Key='SOFTWARE\Microsoft\NET Framework Setup\NDP\v4\Full' Value='Release' Type='value' Win64='yes' VariableType='string' />", utilSearches[4].GetTestXml());
255 } 257 }
256 } 258 }
257 259
diff --git a/src/wixext/UtilCompiler.cs b/src/wixext/UtilCompiler.cs
index 7314570e..183f286b 100644
--- a/src/wixext/UtilCompiler.cs
+++ b/src/wixext/UtilCompiler.cs
@@ -2684,7 +2684,7 @@ namespace WixToolset.Util
2684 string key = null; 2684 string key = null;
2685 string value = null; 2685 string value = null;
2686 var expand = YesNoType.NotSet; 2686 var expand = YesNoType.NotSet;
2687 var win64 = YesNoType.NotSet; 2687 var win64 = this.Context.IsCurrentPlatform64Bit;
2688 var attributes = WixRegistrySearchAttributes.Raw | WixRegistrySearchAttributes.WantValue; 2688 var attributes = WixRegistrySearchAttributes.Raw | WixRegistrySearchAttributes.WantValue;
2689 2689
2690 foreach (var attrib in element.Attributes()) 2690 foreach (var attrib in element.Attributes())
@@ -2699,6 +2699,24 @@ namespace WixToolset.Util
2699 case "After": 2699 case "After":
2700 this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after); 2700 this.ParseCommonSearchAttributes(sourceLineNumbers, attrib, ref id, ref variable, ref condition, ref after);
2701 break; 2701 break;
2702 case "Bitness":
2703 var bitnessValue = this.ParseHelper.GetAttributeValue(sourceLineNumbers, attrib);
2704 switch (bitnessValue)
2705 {
2706 case "always32":
2707 win64 = false;
2708 break;
2709 case "always64":
2710 win64 = true;
2711 break;
2712 case "default":
2713 case "":
2714 break;
2715 default:
2716 this.Messaging.Write(ErrorMessages.IllegalAttributeValue(sourceLineNumbers, attrib.Name.LocalName, attrib.Name.LocalName, bitnessValue, "default", "always32", "always64"));
2717 break;
2718 }
2719 break;
2702 case "Root": 2720 case "Root":
2703 root = this.ParseHelper.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, false); 2721 root = this.ParseHelper.GetAttributeRegistryRootValue(sourceLineNumbers, attrib, false);
2704 break; 2722 break;
@@ -2741,9 +2759,6 @@ namespace WixToolset.Util
2741 break; 2759 break;
2742 } 2760 }
2743 break; 2761 break;
2744 case "Win64":
2745 win64 = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib);
2746 break;
2747 default: 2762 default:
2748 this.ParseHelper.UnexpectedAttribute(element, attrib); 2763 this.ParseHelper.UnexpectedAttribute(element, attrib);
2749 break; 2764 break;
@@ -2780,7 +2795,7 @@ namespace WixToolset.Util
2780 attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables; 2795 attributes |= WixRegistrySearchAttributes.ExpandEnvironmentVariables;
2781 } 2796 }
2782 2797
2783 if (win64 == YesNoType.Yes) 2798 if (win64)
2784 { 2799 {
2785 attributes |= WixRegistrySearchAttributes.Win64; 2800 attributes |= WixRegistrySearchAttributes.Win64;
2786 } 2801 }