@joebigelow / wix / commits / 3f05c650

Replace BinaryKey with BinaryRef and FileKey with FileRef.

Bob Arnson committed Sep 6, 2020 at 21:09 UTC 3f05c650723ecd0a8fe7ab151c67db6c13cb5d75
6 files changed +22 -25
src/WixToolset.Core.WindowsInstaller/Decompile/Decompiler.cs
+2 -2
@@ -3997,12 +3997,12 @@ namespace WixToolset.Core.WindowsInstaller
3997 switch (source)
3998 {
3999 case WindowsInstallerConstants.MsidbCustomActionTypeBinaryData:
4000 - xCustomAction.SetAttributeValue("BinaryKey", row.FieldAsString(2));
4000 + xCustomAction.SetAttributeValue("BinaryRef", row.FieldAsString(2));
4001 break;
4002 case WindowsInstallerConstants.MsidbCustomActionTypeSourceFile:
4003 if (!row.IsColumnNull(2))
4004 {
4005 - xCustomAction.SetAttributeValue("FileKey", row.FieldAsString(2));
4005 + xCustomAction.SetAttributeValue("FileRef", row.FieldAsString(2));
4006 }
4007 break;
4008 case WindowsInstallerConstants.MsidbCustomActionTypeDirectory:
src/WixToolset.Core/Compiler.cs
+10 -10
@@ -3159,10 +3159,10 @@ namespace WixToolset.Core
3159 case "Id":
3160 id = this.Core.GetAttributeIdentifier(sourceLineNumbers, attrib);
3161 break;
3162 - case "BinaryKey":
3162 + case "BinaryRef":
3163 if (null != source)
3164 {
3165 - this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3165 + this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3166 }
3167 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3168 sourceType = CustomActionSourceType.Binary;
@@ -3171,7 +3171,7 @@ namespace WixToolset.Core
3171 case "Directory":
3172 if (null != source)
3173 {
3174 - this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3174 + this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileRef", "Property", "Script"));
3175 }
3176 source = this.Core.CreateDirectoryReferenceFromInlineSyntax(sourceLineNumbers, attrib, null);
3177 sourceType = CustomActionSourceType.Directory;
@@ -3239,10 +3239,10 @@ namespace WixToolset.Core
3239 break;
3240 }
3241 break;
3242 - case "FileKey":
3242 + case "FileRef":
3243 if (null != source)
3244 {
3245 - this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3245 + this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3246 }
3247 source = this.Core.GetAttributeIdentifierValue(sourceLineNumbers, attrib);
3248 sourceType = CustomActionSourceType.File;
@@ -3268,7 +3268,7 @@ namespace WixToolset.Core
3268 case "Property":
3269 if (null != source)
3270 {
3271 - this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3271 + this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3272 }
3273 source = this.Core.GetAttributeValue(sourceLineNumbers, attrib);
3274 sourceType = CustomActionSourceType.Property;
@@ -3299,7 +3299,7 @@ namespace WixToolset.Core
3299 case "Script":
3300 if (null != source)
3301 {
3302 - this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryKey", "Directory", "FileKey", "Property", "Script"));
3302 + this.Core.Write(ErrorMessages.CustomActionMultipleSources(sourceLineNumbers, node.Name.LocalName, attrib.Name.LocalName, "BinaryRef", "Directory", "FileRef", "Property", "Script"));
3303 }
3304
3305 if (null != target)
@@ -3394,7 +3394,7 @@ namespace WixToolset.Core
3394 {
3395 if (null == source)
3396 {
3397 - this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryKey", "FileKey", "Property"));
3397 + this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "VBScriptCall", "BinaryRef", "FileRef", "Property"));
3398 }
3399 else if (CustomActionSourceType.Directory == sourceType)
3400 {
@@ -3405,7 +3405,7 @@ namespace WixToolset.Core
3405 {
3406 if (null == source)
3407 {
3408 - this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryKey", "FileKey", "Property"));
3408 + this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "JScriptCall", "BinaryRef", "FileRef", "Property"));
3409 }
3410 else if (CustomActionSourceType.Directory == sourceType)
3411 {
@@ -3416,7 +3416,7 @@ namespace WixToolset.Core
3416 {
3417 if (null == source)
3418 {
3419 - this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryKey", "Directory", "FileKey", "Property"));
3419 + this.Core.Write(ErrorMessages.IllegalAttributeWithoutOtherAttributes(sourceLineNumbers, node.Name.LocalName, "ExeCommand", "BinaryRef", "Directory", "FileRef", "Property"));
3420 }
3421 }
3422 else if (CustomActionTargetType.TextData == targetType && CustomActionSourceType.Directory != sourceType && CustomActionSourceType.Property != sourceType && CustomActionSourceType.File != sourceType)
src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/CustomActionCycle.wxs
+4 -5
@@ -1,14 +1,13 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Fragment>
3 <ComponentGroup Id="ProductComponents">
4 <ComponentGroupRef Id="MinimalComponentGroup" />
5 </ComponentGroup>
6
7 <Binary Id="Binary1" SourceFile="test.txt" />
9 - <CustomAction Id="Action1" BinaryKey="Binary1" DllEntry="EntryPoint1" />
10 - <CustomAction Id="Action2" BinaryKey="Binary1" DllEntry="EntryPoint2" />
11 - <CustomAction Id="Action3" BinaryKey="Binary1" DllEntry="EntryPoint3" />
8 + <CustomAction Id="Action1" DllEntry="EntryPoint1" BinaryRef="Binary1" />
9 + <CustomAction Id="Action2" DllEntry="EntryPoint2" BinaryRef="Binary1" />
10 + <CustomAction Id="Action3" DllEntry="EntryPoint3" BinaryRef="Binary1" />
11
12 <InstallExecuteSequence>
13 <Custom Action="Action1" After="Action2" />
src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/SimpleCustomAction.wxs
+2 -3
@@ -1,12 +1,11 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Fragment>
3 <ComponentGroup Id="ProductComponents">
4 <ComponentGroupRef Id="MinimalComponentGroup" />
5 </ComponentGroup>
6
7 <Binary Id="Binary1" SourceFile="test.txt" />
9 - <CustomAction Id="Action1" BinaryKey="Binary1" DllEntry="EntryPoint1" />
8 + <CustomAction Id="Action1" DllEntry="EntryPoint1" BinaryRef="Binary1" />
9
10 <InstallExecuteSequence>
11 <Custom Action="Action1" After="InstallFiles" />
src/test/WixToolsetTest.CoreIntegration/TestData/CustomAction/UnscheduledCustomAction.wxs
+3 -4
@@ -1,14 +1,13 @@
1 -<?xml version="1.0" encoding="utf-8"?>
2 -<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
1 +<Wix xmlns="http://wixtoolset.org/schemas/v4/wxs">
2 <Fragment>
3 <ComponentGroup Id="ProductComponents">
4 <ComponentGroupRef Id="MinimalComponentGroup" />
5 </ComponentGroup>
6
7 <Binary Id="Binary1" SourceFile="test.txt" />
9 - <CustomAction Id="CustomAction1" BinaryKey="Binary1" DllEntry="InvalidEntryPoint" />
8 + <CustomAction Id="CustomAction1" DllEntry="InvalidEntryPoint" BinaryRef="Binary1" />
9 <CustomAction Id="DiscardOptimismAllBeingsWhoProceed" Error="Abandon hope all ye who enter here." />
11 - <CustomAction Id="CustomActionWithHiddenTarget" BinaryKey="Binary1" DllEntry="InvalidEntryPoint" Execute="deferred" HideTarget="yes" />
10 + <CustomAction Id="CustomActionWithHiddenTarget" DllEntry="InvalidEntryPoint" Execute="deferred" HideTarget="yes" BinaryRef="Binary1" />
11 <CustomAction Id="CustomAction2" Property="TestAdvtExecuteSequenceProperty" Value="1" />
12 <AdminExecuteSequence>
13 <Custom Action="CustomAction2" After="CostInitialize" />
src/test/WixToolsetTest.CoreIntegration/TestData/Wixipl/Package.wxs
+1 -1
@@ -5,7 +5,7 @@
5
6 <MajorUpgrade DowngradeErrorMessage="!(loc.DowngradeError)" />
7
8 - <CustomAction Id="CAFromExtension" BinaryKey="BinFromWir" DllEntry="DoesntExist" />
8 + <CustomAction Id="CAFromExtension" DllEntry="DoesntExist" BinaryRef="BinFromWir" />
9
10 <Feature Id="ProductFeature" Title="!(loc.FeatureTitle)">
11 <ComponentGroupRef Id="ProductComponents" />