diff options
Diffstat (limited to 'src')
5 files changed, 28 insertions, 10 deletions
diff --git a/src/WixToolset.Converters/WixConverter.cs b/src/WixToolset.Converters/WixConverter.cs index 5f6ee2df..b82c4490 100644 --- a/src/WixToolset.Converters/WixConverter.cs +++ b/src/WixToolset.Converters/WixConverter.cs | |||
| @@ -469,7 +469,7 @@ namespace WixToolset.Converters | |||
| 469 | if (modularization != null) | 469 | if (modularization != null) |
| 470 | { | 470 | { |
| 471 | var camelCaseValue = LowercaseFirstChar(modularization.Value); | 471 | var camelCaseValue = LowercaseFirstChar(modularization.Value); |
| 472 | if (category.Value != camelCaseValue && | 472 | if (modularization.Value != camelCaseValue && |
| 473 | this.OnError(ConverterTestType.ColumnModularizeCamelCase, element, "The CustomTable Modularize attribute contains an incorrectly cased '{0}' value. Lowercase the first character instead.", modularization.Name)) | 473 | this.OnError(ConverterTestType.ColumnModularizeCamelCase, element, "The CustomTable Modularize attribute contains an incorrectly cased '{0}' value. Lowercase the first character instead.", modularization.Name)) |
| 474 | { | 474 | { |
| 475 | modularization.Value = camelCaseValue; | 475 | modularization.Value = camelCaseValue; |
| @@ -759,6 +759,19 @@ namespace WixToolset.Converters | |||
| 759 | private void ConvertCustomActionElement(XElement xCustomAction) | 759 | private void ConvertCustomActionElement(XElement xCustomAction) |
| 760 | { | 760 | { |
| 761 | var xBinaryKey = xCustomAction.Attribute("BinaryKey"); | 761 | var xBinaryKey = xCustomAction.Attribute("BinaryKey"); |
| 762 | if (xBinaryKey != null && this.OnError(ConverterTestType.CustomActionKeysAreNowRefs, xCustomAction, "The CustomAction attributes have been renamed from BinaryKey and FileKey to BinaryRef and FileRef.")) | ||
| 763 | { | ||
| 764 | xCustomAction.SetAttributeValue("BinaryRef", xBinaryKey.Value); | ||
| 765 | xBinaryKey.Remove(); | ||
| 766 | xBinaryKey = xCustomAction.Attribute("BinaryRef"); | ||
| 767 | } | ||
| 768 | |||
| 769 | var xFileKey = xCustomAction.Attribute("FileKey"); | ||
| 770 | if (xFileKey != null && this.OnError(ConverterTestType.CustomActionKeysAreNowRefs, xCustomAction, "The CustomAction attributes have been renamed from BinaryKey and FileKey to BinaryRef and FileRef.")) | ||
| 771 | { | ||
| 772 | xCustomAction.SetAttributeValue("FileRef", xFileKey.Value); | ||
| 773 | xFileKey.Remove(); | ||
| 774 | } | ||
| 762 | 775 | ||
| 763 | if (xBinaryKey?.Value == "WixCA" || xBinaryKey?.Value == "UtilCA") | 776 | if (xBinaryKey?.Value == "WixCA" || xBinaryKey?.Value == "UtilCA") |
| 764 | { | 777 | { |
| @@ -1282,6 +1295,11 @@ namespace WixToolset.Converters | |||
| 1282 | /// The string variable type was previously treated as formatted. | 1295 | /// The string variable type was previously treated as formatted. |
| 1283 | /// </summary> | 1296 | /// </summary> |
| 1284 | AssignVariableTypeFormatted, | 1297 | AssignVariableTypeFormatted, |
| 1298 | |||
| 1299 | /// <summary> | ||
| 1300 | /// The CustomAction attributes have been renamed from BinaryKey and FileKey to BinaryRef and FileRef. | ||
| 1301 | /// </summary> | ||
| 1302 | CustomActionKeysAreNowRefs, | ||
| 1285 | } | 1303 | } |
| 1286 | } | 1304 | } |
| 1287 | } | 1305 | } |
diff --git a/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs b/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs index 79cc3f69..09387590 100644 --- a/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs +++ b/src/test/WixToolsetTest.Converters/ConverterIntegrationFixture.cs | |||
| @@ -108,7 +108,7 @@ namespace WixToolsetTest.Converters | |||
| 108 | File.Copy(Path.Combine(folder, beforeFileName), Path.Combine(baseFolder, beforeFileName)); | 108 | File.Copy(Path.Combine(folder, beforeFileName), Path.Combine(baseFolder, beforeFileName)); |
| 109 | 109 | ||
| 110 | var result = RunConversion(targetFile); | 110 | var result = RunConversion(targetFile); |
| 111 | Assert.Equal(10, result.ExitCode); | 111 | Assert.Equal(11, result.ExitCode); |
| 112 | 112 | ||
| 113 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); | 113 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); |
| 114 | var actual = File.ReadAllText(targetFile).Replace("\r\n", "\n"); | 114 | var actual = File.ReadAllText(targetFile).Replace("\r\n", "\n"); |
| @@ -133,7 +133,7 @@ namespace WixToolsetTest.Converters | |||
| 133 | 133 | ||
| 134 | var result = RunConversion(targetFile); | 134 | var result = RunConversion(targetFile); |
| 135 | 135 | ||
| 136 | Assert.Equal(10, result.ExitCode); | 136 | Assert.Equal(11, result.ExitCode); |
| 137 | Assert.Single(result.Messages.Where(message => message.ToString().EndsWith("(QtExecCmdTimeoutAmbiguous)"))); | 137 | Assert.Single(result.Messages.Where(message => message.ToString().EndsWith("(QtExecCmdTimeoutAmbiguous)"))); |
| 138 | 138 | ||
| 139 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); | 139 | var expected = File.ReadAllText(Path.Combine(folder, afterFileName)).Replace("\r\n", "\n"); |
diff --git a/src/test/WixToolsetTest.Converters/CustomActionFixture.cs b/src/test/WixToolsetTest.Converters/CustomActionFixture.cs index 4ad7dcfd..eafc171a 100644 --- a/src/test/WixToolsetTest.Converters/CustomActionFixture.cs +++ b/src/test/WixToolsetTest.Converters/CustomActionFixture.cs | |||
| @@ -25,10 +25,10 @@ namespace WixToolsetTest.Converters | |||
| 25 | 25 | ||
| 26 | var expected = String.Join(Environment.NewLine, | 26 | var expected = String.Join(Environment.NewLine, |
| 27 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", | 27 | "<Wix xmlns=\"http://wixtoolset.org/schemas/v4/wxs\">", |
| 28 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", | 28 | " <CustomAction Id=\"Foo\" DllEntry=\"WixQuietExec\" BinaryRef=\"Wix4UtilCA_X86\" />", |
| 29 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", | 29 | " <CustomAction Id=\"Foo\" DllEntry=\"WixQuietExec64\" BinaryRef=\"Wix4UtilCA_X64\" />", |
| 30 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X86\" DllEntry=\"WixQuietExec\" />", | 30 | " <CustomAction Id=\"Foo\" DllEntry=\"WixQuietExec\" BinaryRef=\"Wix4UtilCA_X86\" />", |
| 31 | " <CustomAction Id=\"Foo\" BinaryKey=\"Wix4UtilCA_X64\" DllEntry=\"WixQuietExec64\" />", | 31 | " <CustomAction Id=\"Foo\" DllEntry=\"WixQuietExec64\" BinaryRef=\"Wix4UtilCA_X64\" />", |
| 32 | "</Wix>"); | 32 | "</Wix>"); |
| 33 | 33 | ||
| 34 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); | 34 | var document = XDocument.Parse(parse, LoadOptions.PreserveWhitespace | LoadOptions.SetLineInfo); |
| @@ -40,7 +40,7 @@ namespace WixToolsetTest.Converters | |||
| 40 | 40 | ||
| 41 | var actual = UnformattedDocumentString(document); | 41 | var actual = UnformattedDocumentString(document); |
| 42 | 42 | ||
| 43 | Assert.Equal(7, errors); | 43 | Assert.Equal(11, errors); |
| 44 | Assert.Equal(expected, actual); | 44 | Assert.Equal(expected, actual); |
| 45 | } | 45 | } |
| 46 | 46 | ||
diff --git a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs index 02a06cff..0266e177 100644 --- a/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/QtExec.bad/v4_expected.wxs | |||
| @@ -15,7 +15,7 @@ | |||
| 15 | 15 | ||
| 16 | <Property Id="QtExecCmdTimeout" Value="600000" /> | 16 | <Property Id="QtExecCmdTimeout" Value="600000" /> |
| 17 | <CustomAction Id="InstallVSTemplateCommand" Property="WixQuietExecCmdLine" Value=""[VSENVPRODUCT80]\devenv.exe" /setup" /> | 17 | <CustomAction Id="InstallVSTemplateCommand" Property="WixQuietExecCmdLine" Value=""[VSENVPRODUCT80]\devenv.exe" /setup" /> |
| 18 | <CustomAction Id="InstallVSTemplate" BinaryKey="Wix4UtilCA_X86" DllEntry="WixQuietExec" Return="asyncWait" /> | 18 | <CustomAction Id="InstallVSTemplate" DllEntry="WixQuietExec" Return="asyncWait" BinaryRef="Wix4UtilCA_X86" /> |
| 19 | 19 | ||
| 20 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | 20 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> |
| 21 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | 21 | <Component Id="Licensing" Directory="INSTALLFOLDER"> |
diff --git a/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs b/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs index 00ce8461..da4f5135 100644 --- a/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs +++ b/src/test/WixToolsetTest.Converters/TestData/QtExec/v4_expected.wxs | |||
| @@ -14,7 +14,7 @@ | |||
| 14 | <MediaTemplate CabinetTemplate="core{0}.cab" /> | 14 | <MediaTemplate CabinetTemplate="core{0}.cab" /> |
| 15 | 15 | ||
| 16 | <CustomAction Id="InstallVSTemplateCommand" Property="WixQuietExecCmdLine" Value=""[VSENVPRODUCT80]\devenv.exe" /setup" /> | 16 | <CustomAction Id="InstallVSTemplateCommand" Property="WixQuietExecCmdLine" Value=""[VSENVPRODUCT80]\devenv.exe" /setup" /> |
| 17 | <CustomAction Id="InstallVSTemplate" BinaryKey="Wix4UtilCA_X86" DllEntry="WixQuietExec" Return="asyncWait" /> | 17 | <CustomAction Id="InstallVSTemplate" DllEntry="WixQuietExec" Return="asyncWait" BinaryRef="Wix4UtilCA_X86" /> |
| 18 | 18 | ||
| 19 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> | 19 | <Feature Id="Feature_WiX" Title="WiX Toolset" Level="1"> |
| 20 | <Component Id="Licensing" Directory="INSTALLFOLDER"> | 20 | <Component Id="Licensing" Directory="INSTALLFOLDER"> |
