aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorSean Hall <r.sean.hall@gmail.com>2020-05-23 21:59:02 +1000
committerSean Hall <r.sean.hall@gmail.com>2020-05-23 22:02:42 +1000
commita783c83bc1e1efaf054d957c8a097386cb8f6b4a (patch)
tree690b592e04205e5601b66321436474544d94adaa /src
parent1e9243a38caaf9eecff0dff995d50fdb4897aa1b (diff)
downloadwix-a783c83bc1e1efaf054d957c8a097386cb8f6b4a.tar.gz
wix-a783c83bc1e1efaf054d957c8a097386cb8f6b4a.tar.bz2
wix-a783c83bc1e1efaf054d957c8a097386cb8f6b4a.zip
Handle util:PermissionEx/@Inheritable
Diffstat (limited to 'src')
-rw-r--r--src/WixToolset.Converters/Wix3Converter.cs26
1 files changed, 25 insertions, 1 deletions
diff --git a/src/WixToolset.Converters/Wix3Converter.cs b/src/WixToolset.Converters/Wix3Converter.cs
index 1ae65e4f..66ccd9d3 100644
--- a/src/WixToolset.Converters/Wix3Converter.cs
+++ b/src/WixToolset.Converters/Wix3Converter.cs
@@ -24,7 +24,9 @@ namespace WixToolset.Converters
24 24
25 private const char XDocumentNewLine = '\n'; // XDocument normalizes "\r\n" to just "\n". 25 private const char XDocumentNewLine = '\n'; // XDocument normalizes "\r\n" to just "\n".
26 private static readonly XNamespace WixNamespace = "http://wixtoolset.org/schemas/v4/wxs"; 26 private static readonly XNamespace WixNamespace = "http://wixtoolset.org/schemas/v4/wxs";
27 private static readonly XNamespace WixUtilNamespace = "http://wixtoolset.org/schemas/v4/wxs/util";
27 28
29 private static readonly XName CreateFolderElementName = WixNamespace + "CreateFolder";
28 private static readonly XName CustomTableElementName = WixNamespace + "CustomTable"; 30 private static readonly XName CustomTableElementName = WixNamespace + "CustomTable";
29 private static readonly XName DirectoryElementName = WixNamespace + "Directory"; 31 private static readonly XName DirectoryElementName = WixNamespace + "Directory";
30 private static readonly XName FileElementName = WixNamespace + "File"; 32 private static readonly XName FileElementName = WixNamespace + "File";
@@ -33,6 +35,7 @@ namespace WixToolset.Converters
33 private static readonly XName MspPackageElementName = WixNamespace + "MspPackage"; 35 private static readonly XName MspPackageElementName = WixNamespace + "MspPackage";
34 private static readonly XName MsuPackageElementName = WixNamespace + "MsuPackage"; 36 private static readonly XName MsuPackageElementName = WixNamespace + "MsuPackage";
35 private static readonly XName PayloadElementName = WixNamespace + "Payload"; 37 private static readonly XName PayloadElementName = WixNamespace + "Payload";
38 private static readonly XName UtilPermissionExElementName = WixUtilNamespace + "PermissionEx";
36 private static readonly XName CustomActionElementName = WixNamespace + "CustomAction"; 39 private static readonly XName CustomActionElementName = WixNamespace + "CustomAction";
37 private static readonly XName PropertyElementName = WixNamespace + "Property"; 40 private static readonly XName PropertyElementName = WixNamespace + "Property";
38 private static readonly XName WixElementWithoutNamespaceName = XNamespace.None + "Wix"; 41 private static readonly XName WixElementWithoutNamespaceName = XNamespace.None + "Wix";
@@ -52,7 +55,7 @@ namespace WixToolset.Converters
52 { "http://schemas.microsoft.com/wix/PSExtension", "http://wixtoolset.org/schemas/v4/wxs/powershell" }, 55 { "http://schemas.microsoft.com/wix/PSExtension", "http://wixtoolset.org/schemas/v4/wxs/powershell" },
53 { "http://schemas.microsoft.com/wix/SqlExtension", "http://wixtoolset.org/schemas/v4/wxs/sql" }, 56 { "http://schemas.microsoft.com/wix/SqlExtension", "http://wixtoolset.org/schemas/v4/wxs/sql" },
54 { "http://schemas.microsoft.com/wix/TagExtension", "http://wixtoolset.org/schemas/v4/wxs/tag" }, 57 { "http://schemas.microsoft.com/wix/TagExtension", "http://wixtoolset.org/schemas/v4/wxs/tag" },
55 { "http://schemas.microsoft.com/wix/UtilExtension", "http://wixtoolset.org/schemas/v4/wxs/util" }, 58 { "http://schemas.microsoft.com/wix/UtilExtension", WixUtilNamespace },
56 { "http://schemas.microsoft.com/wix/VSExtension", "http://wixtoolset.org/schemas/v4/wxs/vs" }, 59 { "http://schemas.microsoft.com/wix/VSExtension", "http://wixtoolset.org/schemas/v4/wxs/vs" },
57 { "http://wixtoolset.org/schemas/thmutil/2010", "http://wixtoolset.org/schemas/v4/thmutil" }, 60 { "http://wixtoolset.org/schemas/thmutil/2010", "http://wixtoolset.org/schemas/v4/thmutil" },
58 { "http://schemas.microsoft.com/wix/2009/Lux", "http://wixtoolset.org/schemas/v4/lux" }, 61 { "http://schemas.microsoft.com/wix/2009/Lux", "http://wixtoolset.org/schemas/v4/lux" },
@@ -88,6 +91,7 @@ namespace WixToolset.Converters
88 { Wix3Converter.MsuPackageElementName, this.ConvertSuppressSignatureValidation }, 91 { Wix3Converter.MsuPackageElementName, this.ConvertSuppressSignatureValidation },
89 { Wix3Converter.PayloadElementName, this.ConvertSuppressSignatureValidation }, 92 { Wix3Converter.PayloadElementName, this.ConvertSuppressSignatureValidation },
90 { Wix3Converter.CustomActionElementName, this.ConvertCustomActionElement }, 93 { Wix3Converter.CustomActionElementName, this.ConvertCustomActionElement },
94 { Wix3Converter.UtilPermissionExElementName, this.ConvertUtilPermissionExElement },
91 { Wix3Converter.PropertyElementName, this.ConvertPropertyElement }, 95 { Wix3Converter.PropertyElementName, this.ConvertPropertyElement },
92 { Wix3Converter.WixElementWithoutNamespaceName, this.ConvertElementWithoutNamespace }, 96 { Wix3Converter.WixElementWithoutNamespaceName, this.ConvertElementWithoutNamespace },
93 { Wix3Converter.IncludeElementWithoutNamespaceName, this.ConvertElementWithoutNamespace }, 97 { Wix3Converter.IncludeElementWithoutNamespaceName, this.ConvertElementWithoutNamespace },
@@ -417,6 +421,21 @@ namespace WixToolset.Converters
417 } 421 }
418 } 422 }
419 423
424 private void ConvertUtilPermissionExElement(XElement element)
425 {
426 if (null == element.Attribute("Inheritable"))
427 {
428 var inheritable = element.Parent.Name == CreateFolderElementName;
429 if (!inheritable)
430 {
431 if (this.OnError(ConverterTestType.AssignPermissionExInheritable, element, "The PermissionEx Inheritable attribute is being set to 'no' to ensure it remains the same as the v3 default"))
432 {
433 element.Add(new XAttribute("Inheritable", "no"));
434 }
435 }
436 }
437 }
438
420 /// <summary> 439 /// <summary>
421 /// Converts a Wix element. 440 /// Converts a Wix element.
422 /// </summary> 441 /// </summary>
@@ -675,6 +694,11 @@ namespace WixToolset.Converters
675 /// BootstrapperApplicationData attribute is deprecated and replaced with Unreal. 694 /// BootstrapperApplicationData attribute is deprecated and replaced with Unreal.
676 /// </summary> 695 /// </summary>
677 BootstrapperApplicationDataDeprecated, 696 BootstrapperApplicationDataDeprecated,
697
698 /// <summary>
699 /// Inheritable is new and is now defaulted to 'yes' which is a change in behavior for all but children of CreateFolder.
700 /// </summary>
701 AssignPermissionExInheritable,
678 } 702 }
679 } 703 }
680} 704}