diff --git a/src/burn/engine/registration.cpp b/src/burn/engine/registration.cpp index fd8a32a48..15e110cfb 100644 --- a/src/burn/engine/registration.cpp +++ b/src/burn/engine/registration.cpp @@ -5,7 +5,6 @@ // constants -const LPCWSTR REGISTRY_RUN_KEY = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\Run"; const LPCWSTR REGISTRY_RUN_ONCE_KEY = L"SOFTWARE\\Microsoft\\Windows\\CurrentVersion\\RunOnce"; const LPCWSTR REGISTRY_BUNDLE_DISPLAY_ICON = L"DisplayIcon"; const LPCWSTR REGISTRY_BUNDLE_DISPLAY_VERSION = L"DisplayVersion"; diff --git a/src/wix/WixToolset.Core/Compiler.cs b/src/wix/WixToolset.Core/Compiler.cs index d13f1a682..84f313449 100644 --- a/src/wix/WixToolset.Core/Compiler.cs +++ b/src/wix/WixToolset.Core/Compiler.cs @@ -1948,10 +1948,10 @@ private List ParseSearchSignatures(XElement node) signature = this.ParseComponentSearchElement(child); break; case "DirectorySearch": - signature = this.ParseDirectorySearchElement(child, String.Empty); + signature = this.ParseDirectorySearchElement(child, null); break; case "DirectorySearchRef": - signature = this.ParseDirectorySearchRefElement(child, String.Empty); + signature = this.ParseDirectorySearchRefElement(child, null); break; case "IniFileSearch": signature = this.ParseIniFileSearchElement(child); diff --git a/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs b/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs index 3d5280a22..b433b0390 100644 --- a/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs +++ b/src/wix/WixToolset.Core/Link/AddDefaultSymbolsCommand.cs @@ -56,8 +56,7 @@ public void Execute() // conjure a default major upgrade with the stdlib localization string for the // downgrade error message. var symbols = this.Sections.SelectMany(section => section.Symbols); - var upgradeSymbols = symbols.OfType(); - if (!upgradeSymbols.Any()) + if (!symbols.OfType().Any(us => !us.OnlyDetect)) { var packageSymbol = this.Find.EntrySection.Symbols.OfType().FirstOrDefault(); diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs index a8b9c3e85..3194ed7a0 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/MsiQueryFixture.cs @@ -115,6 +115,39 @@ public void PopulatesAppSearchTablesFromFileSearch() } } + [Fact] + public void PopulatesAppSearchTablesFromDirectorySearchInMergeModule() + { + var folder = TestData.Get(@"TestData"); + + using (var fs = new DisposableFileSystem()) + { + var baseFolder = fs.GetFolder(); + var intermediateFolder = Path.Combine(baseFolder, "obj"); + var msmPath = Path.Combine(baseFolder, @"bin\test.msm"); + + var result = WixRunner.Execute(new[] + { + "build", + Path.Combine(folder, "AppSearch", "DirectorySearchInModule.wxs"), + "-bindpath", Path.Combine(folder, "SingleFile", "data"), + "-intermediateFolder", intermediateFolder, + "-o", msmPath, + "-sw1079", + }); + + result.AssertSuccess(); + + Assert.True(File.Exists(msmPath)); + var results = Query.QueryDatabase(msmPath, new[] { "AppSearch", "DrLocator", "IniLocator" }); + WixAssert.CompareLineByLine(new[] + { + "AppSearch:SYSTEM32FOLDER.7361203A_597E_4DA2_9024_27246B8446B2\tWindowsDrLocator.7361203A_597E_4DA2_9024_27246B8446B2", + "DrLocator:WindowsDrLocator.7361203A_597E_4DA2_9024_27246B8446B2\t\t[WindowsFolder.7361203A_597E_4DA2_9024_27246B8446B2]System32\t", + }, results); + } + } + [Fact] public void PopulatesAppSearchTablesFromRegistrySearch() { diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs new file mode 100644 index 000000000..9f4cb47e0 --- /dev/null +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/AppSearch/DirectorySearchInModule.wxs @@ -0,0 +1,9 @@ + + + + + + + + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs index ce9fd96fb..95ebcd94d 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/TestData/DefaultMajorUpgrade/DefaultMajorUpgrade.wxs @@ -1,12 +1,8 @@ - - - - - - - - + + + + diff --git a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs index 2d2c0703f..49c83c073 100644 --- a/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs +++ b/src/wix/test/WixToolsetTest.CoreIntegration/UpgradeFixture.cs @@ -68,6 +68,7 @@ public void DefaultMajorUpgradePopulatesUpgradeRowsAsExpected() WixAssert.CompareLineByLine(new[] { "LaunchCondition:NOT WIX_DOWNGRADE_DETECTED\tA newer version of [ProductName] is already installed.", + "Upgrade:{46649344-6CDF-4531-B91C-DCC088CBF6D3}\t1.0\t\t\t258\t\tPRODUCT", "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t\t2.0.0\t1033\t1\t\tWIX_UPGRADE_DETECTED", "Upgrade:{7AB24276-C628-43DB-9E65-A184D052909B}\t2.0.0\t\t1033\t2\t\tWIX_DOWNGRADE_DETECTED", }, results);