diff --git a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs index facca956a..64f51162e 100644 --- a/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs +++ b/src/api/wix/WixToolset.Data/Symbols/SymbolDefinitions.cs @@ -322,6 +322,9 @@ public static IntermediateSymbolDefinition ByType(SymbolDefinitionType type) case SymbolDefinitionType.FileSFPCatalog: return SymbolDefinitions.FileSFPCatalog; + case SymbolDefinitionType.HarvestFiles: + return SymbolDefinitions.HarvestFiles; + case SymbolDefinitionType.Icon: return SymbolDefinitions.Icon; diff --git a/src/test/burn/WixTestTools/PackageVerifier.cs b/src/test/burn/WixTestTools/PackageVerifier.cs index 4545b9ec2..76bc17ab5 100644 --- a/src/test/burn/WixTestTools/PackageVerifier.cs +++ b/src/test/burn/WixTestTools/PackageVerifier.cs @@ -63,6 +63,12 @@ public string GetProperty(string name) return row.Value; } + public string GetControlText(string dialog, string control) + { + var row = this.WiData.Tables["Control"].Rows.Cast().Single(r => r.Dialog == dialog && r.Control == control); + return row.Text; + } + public bool IsInstalled() { var productCode = this.GetProperty("ProductCode"); diff --git a/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj new file mode 100644 index 000000000..cb8f31bb4 --- /dev/null +++ b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wixproj @@ -0,0 +1,14 @@ + + + + {4D188568-1CCF-4EEE-BC27-17C3DCC83E58} + true + + + + + + + + + \ No newline at end of file diff --git a/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs new file mode 100644 index 000000000..083905386 --- /dev/null +++ b/src/test/msi/TestData/UIExtensionTests/LocalizedWixUI/LocalizedWixUI.wxs @@ -0,0 +1,13 @@ + + + + + + + + + + + + + diff --git a/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs b/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs new file mode 100644 index 000000000..093ae7cef --- /dev/null +++ b/src/test/msi/WixToolsetTest.MsiE2E/UIExtensionTests.cs @@ -0,0 +1,26 @@ +// 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. + +namespace WixToolsetTest.MsiE2E +{ + using Xunit; + using Xunit.Abstractions; + + public class UIExtensionTests : MsiE2ETests + { + public UIExtensionTests(ITestOutputHelper testOutputHelper) : base(testOutputHelper) { } + + [Fact] + public void CanBuildLocalizedWixUIPackageWithDefaultUSEnglish() + { + var product = this.CreatePackageInstaller("LocalizedWixUI"); + + var nextButton = product.GetControlText("WelcomeDlg", "Next"); + var cancelButton = product.GetControlText("ExitDialog", "Cancel"); + var updateButton = product.GetControlText("VerifyReadyDlg", "Update"); + + Assert.Equal("&Next", nextButton); + Assert.Equal("Cancel", cancelButton); + Assert.Equal("&Update", updateButton); + } + } +} diff --git a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs index d5c698380..20f7e83aa 100644 --- a/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs +++ b/src/wix/WixToolset.Core/Link/CollateLocalizationsCommand.cs @@ -65,7 +65,7 @@ private Localization Merge(Localization existingLocalization, Localization local } } - return new Localization(existingLocalization.Codepage ?? localization.Codepage, existingLocalization.SummaryInformationCodepage ?? localization.SummaryInformationCodepage, existingLocalization.Culture, variables, controls); + return new Localization(existingLocalization.Location, existingLocalization.Codepage ?? localization.Codepage, existingLocalization.SummaryInformationCodepage ?? localization.SummaryInformationCodepage, existingLocalization.Culture, variables, controls); } } }