diff options
| author | Sean Hall <r.sean.hall@gmail.com> | 2020-06-03 12:28:49 +1000 |
|---|---|---|
| committer | Sean Hall <r.sean.hall@gmail.com> | 2020-06-03 14:24:34 +1000 |
| commit | d5d5e87acf7eadacd757083a4d0272a04962ae9b (patch) | |
| tree | 550aad2409958b684fe0621bd82c60ebeb54ca8d /src/WixToolset.BuildTasks | |
| parent | a04ddca42b2070124c63a61c661e2b96a5bddac2 (diff) | |
| download | wix-d5d5e87acf7eadacd757083a4d0272a04962ae9b.tar.gz wix-d5d5e87acf7eadacd757083a4d0272a04962ae9b.tar.bz2 wix-d5d5e87acf7eadacd757083a4d0272a04962ae9b.zip | |
Delete WixToolset.Tools.Core project.
Diffstat (limited to 'src/WixToolset.BuildTasks')
| -rw-r--r-- | src/WixToolset.BuildTasks/Common.cs | 39 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/ConvertReferences.cs | 1 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs | 3 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/GetCabList.cs | 6 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/GetLooseFileList.cs | 9 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/GlobalSuppressions.cs | 8 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs | 1 | ||||
| -rw-r--r-- | src/WixToolset.BuildTasks/RefreshGeneratedFile.cs | 1 |
8 files changed, 42 insertions, 26 deletions
diff --git a/src/WixToolset.BuildTasks/Common.cs b/src/WixToolset.BuildTasks/Common.cs new file mode 100644 index 00000000..c5b709c2 --- /dev/null +++ b/src/WixToolset.BuildTasks/Common.cs | |||
| @@ -0,0 +1,39 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | namespace WixToolset.BuildTasks | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using System.Text.RegularExpressions; | ||
| 7 | |||
| 8 | /// <summary> | ||
| 9 | /// Common WixTasks utility methods and types. | ||
| 10 | /// </summary> | ||
| 11 | public static class ToolsCommon | ||
| 12 | { | ||
| 13 | /// <summary>Metadata key name to turn off harvesting of project references.</summary> | ||
| 14 | public const string DoNotHarvest = "DoNotHarvest"; | ||
| 15 | |||
| 16 | private static readonly Regex AddPrefix = new Regex(@"^[^a-zA-Z_]", RegexOptions.Compiled); | ||
| 17 | private static readonly Regex IllegalIdentifierCharacters = new Regex(@"[^A-Za-z0-9_\.]|\.{2,}", RegexOptions.Compiled); // non 'words' and assorted valid characters | ||
| 18 | |||
| 19 | /// <summary> | ||
| 20 | /// Return an identifier based on passed file/directory name | ||
| 21 | /// </summary> | ||
| 22 | /// <param name="name">File/directory name to generate identifer from</param> | ||
| 23 | /// <returns>A version of the name that is a legal identifier.</returns> | ||
| 24 | /// <remarks>This is duplicated from WiX's Common class.</remarks> | ||
| 25 | public static string GetIdentifierFromName(string name) | ||
| 26 | { | ||
| 27 | string result = IllegalIdentifierCharacters.Replace(name, "_"); // replace illegal characters with "_". | ||
| 28 | |||
| 29 | // MSI identifiers must begin with an alphabetic character or an | ||
| 30 | // underscore. Prefix all other values with an underscore. | ||
| 31 | if (AddPrefix.IsMatch(name)) | ||
| 32 | { | ||
| 33 | result = String.Concat("_", result); | ||
| 34 | } | ||
| 35 | |||
| 36 | return result; | ||
| 37 | } | ||
| 38 | } | ||
| 39 | } | ||
diff --git a/src/WixToolset.BuildTasks/ConvertReferences.cs b/src/WixToolset.BuildTasks/ConvertReferences.cs index ef50c918..3fdc78d1 100644 --- a/src/WixToolset.BuildTasks/ConvertReferences.cs +++ b/src/WixToolset.BuildTasks/ConvertReferences.cs | |||
| @@ -6,7 +6,6 @@ namespace WixToolset.BuildTasks | |||
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using Microsoft.Build.Framework; | 7 | using Microsoft.Build.Framework; |
| 8 | using Microsoft.Build.Utilities; | 8 | using Microsoft.Build.Utilities; |
| 9 | using WixToolset.Tools.Core; | ||
| 10 | 9 | ||
| 11 | /// <summary> | 10 | /// <summary> |
| 12 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the | 11 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the |
diff --git a/src/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs b/src/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs index c4a5cefe..a5f76618 100644 --- a/src/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs +++ b/src/WixToolset.BuildTasks/GenerateCompileWithObjectPath.cs | |||
| @@ -3,7 +3,6 @@ | |||
| 3 | namespace WixToolset.BuildTasks | 3 | namespace WixToolset.BuildTasks |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | ||
| 7 | using System.Diagnostics.CodeAnalysis; | 6 | using System.Diagnostics.CodeAnalysis; |
| 8 | using System.Globalization; | 7 | using System.Globalization; |
| 9 | using System.IO; | 8 | using System.IO; |
| @@ -136,7 +135,7 @@ namespace WixToolset.BuildTasks | |||
| 136 | // Do not overwrite the ObjectPath metadata if it already was set. | 135 | // Do not overwrite the ObjectPath metadata if it already was set. |
| 137 | if (string.IsNullOrEmpty(this.CompileWithObjectPath[i].GetMetadata("ObjectPath"))) | 136 | if (string.IsNullOrEmpty(this.CompileWithObjectPath[i].GetMetadata("ObjectPath"))) |
| 138 | { | 137 | { |
| 139 | SetObjectPath(this.CompileWithObjectPath[i]); | 138 | this.SetObjectPath(this.CompileWithObjectPath[i]); |
| 140 | } | 139 | } |
| 141 | } | 140 | } |
| 142 | 141 | ||
diff --git a/src/WixToolset.BuildTasks/GetCabList.cs b/src/WixToolset.BuildTasks/GetCabList.cs index e97538af..33fa5b37 100644 --- a/src/WixToolset.BuildTasks/GetCabList.cs +++ b/src/WixToolset.BuildTasks/GetCabList.cs | |||
| @@ -3,16 +3,10 @@ | |||
| 3 | namespace WixToolset.BuildTasks | 3 | namespace WixToolset.BuildTasks |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections; | ||
| 7 | using System.Collections.Generic; | ||
| 8 | using System.Diagnostics; | ||
| 9 | using System.IO; | 6 | using System.IO; |
| 10 | using System.Reflection; | ||
| 11 | using System.Xml; | ||
| 12 | using Microsoft.Build.Framework; | 7 | using Microsoft.Build.Framework; |
| 13 | using Microsoft.Build.Utilities; | 8 | using Microsoft.Build.Utilities; |
| 14 | using WixToolset.Dtf.WindowsInstaller; | 9 | using WixToolset.Dtf.WindowsInstaller; |
| 15 | using Microsoft.Win32; | ||
| 16 | 10 | ||
| 17 | /// <summary> | 11 | /// <summary> |
| 18 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the | 12 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the |
diff --git a/src/WixToolset.BuildTasks/GetLooseFileList.cs b/src/WixToolset.BuildTasks/GetLooseFileList.cs index bd403426..d1eb62c1 100644 --- a/src/WixToolset.BuildTasks/GetLooseFileList.cs +++ b/src/WixToolset.BuildTasks/GetLooseFileList.cs | |||
| @@ -3,16 +3,11 @@ | |||
| 3 | namespace WixToolset.BuildTasks | 3 | namespace WixToolset.BuildTasks |
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections; | ||
| 7 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 8 | using System.Diagnostics; | ||
| 9 | using System.IO; | 7 | using System.IO; |
| 10 | using System.Reflection; | ||
| 11 | using System.Xml; | ||
| 12 | using Microsoft.Build.Framework; | 8 | using Microsoft.Build.Framework; |
| 13 | using Microsoft.Build.Utilities; | 9 | using Microsoft.Build.Utilities; |
| 14 | using WixToolset.Dtf.WindowsInstaller; | 10 | using WixToolset.Dtf.WindowsInstaller; |
| 15 | using Microsoft.Win32; | ||
| 16 | 11 | ||
| 17 | /// <summary> | 12 | /// <summary> |
| 18 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the | 13 | /// This task assigns Culture metadata to files based on the value of the Culture attribute on the |
| @@ -154,7 +149,7 @@ namespace WixToolset.BuildTasks | |||
| 154 | string directoryParent = (string)(directoryRecords[i + 1]); | 149 | string directoryParent = (string)(directoryRecords[i + 1]); |
| 155 | string defaultDir = (string)(directoryRecords[i + 2]); | 150 | string defaultDir = (string)(directoryRecords[i + 2]); |
| 156 | 151 | ||
| 157 | string sourceDir = SourceDirFromDefaultDir(defaultDir); | 152 | string sourceDir = this.SourceDirFromDefaultDir(defaultDir); |
| 158 | 153 | ||
| 159 | DirectoryIdDefaultDir[directoryId] = sourceDir; | 154 | DirectoryIdDefaultDir[directoryId] = sourceDir; |
| 160 | DirectoryIdParent[directoryId] = directoryParent; | 155 | DirectoryIdParent[directoryId] = directoryParent; |
| @@ -206,7 +201,7 @@ namespace WixToolset.BuildTasks | |||
| 206 | for (i = 0; i < fileRecords.Count; i += 3) | 201 | for (i = 0; i < fileRecords.Count; i += 3) |
| 207 | { | 202 | { |
| 208 | string componentId = (string)(fileRecords[i]); | 203 | string componentId = (string)(fileRecords[i]); |
| 209 | string fileName = SourceFileFromFileName((string)(fileRecords[i + 1])); | 204 | string fileName = this.SourceFileFromFileName((string)(fileRecords[i + 1])); |
| 210 | int attributes = (int)(fileRecords[i + 2]); | 205 | int attributes = (int)(fileRecords[i + 2]); |
| 211 | 206 | ||
| 212 | // If the whole database is marked uncompressed, use the directory layout made above | 207 | // If the whole database is marked uncompressed, use the directory layout made above |
diff --git a/src/WixToolset.BuildTasks/GlobalSuppressions.cs b/src/WixToolset.BuildTasks/GlobalSuppressions.cs deleted file mode 100644 index 65c34c13..00000000 --- a/src/WixToolset.BuildTasks/GlobalSuppressions.cs +++ /dev/null | |||
| @@ -1,8 +0,0 @@ | |||
| 1 | // 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. | ||
| 2 | |||
| 3 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1020:AvoidNamespacesWithFewTypes", Scope = "namespace", Target = "WixToolset")] | ||
| 4 | |||
| 5 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Msi", Scope = "namespace", Target = "WixToolset.BuildTasks")] | ||
| 6 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "wix")] | ||
| 7 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1704:IdentifiersShouldBeSpelledCorrectly", MessageId = "Wix")] | ||
| 8 | [assembly: System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Naming", "CA1709:IdentifiersShouldBeCasedCorrectly", MessageId = "wix")] | ||
diff --git a/src/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs b/src/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs index 80305f59..7663e6df 100644 --- a/src/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs +++ b/src/WixToolset.BuildTasks/RefreshBundleGeneratedFile.cs | |||
| @@ -9,7 +9,6 @@ namespace WixToolset.BuildTasks | |||
| 9 | using System.Xml; | 9 | using System.Xml; |
| 10 | using Microsoft.Build.Framework; | 10 | using Microsoft.Build.Framework; |
| 11 | using Microsoft.Build.Utilities; | 11 | using Microsoft.Build.Utilities; |
| 12 | using WixToolset.Tools.Core; | ||
| 13 | 12 | ||
| 14 | /// <summary> | 13 | /// <summary> |
| 15 | /// This task refreshes the generated file for bundle projects. | 14 | /// This task refreshes the generated file for bundle projects. |
diff --git a/src/WixToolset.BuildTasks/RefreshGeneratedFile.cs b/src/WixToolset.BuildTasks/RefreshGeneratedFile.cs index 101b5363..c57e3f0f 100644 --- a/src/WixToolset.BuildTasks/RefreshGeneratedFile.cs +++ b/src/WixToolset.BuildTasks/RefreshGeneratedFile.cs | |||
| @@ -9,7 +9,6 @@ namespace WixToolset.BuildTasks | |||
| 9 | using System.Xml; | 9 | using System.Xml; |
| 10 | using Microsoft.Build.Framework; | 10 | using Microsoft.Build.Framework; |
| 11 | using Microsoft.Build.Utilities; | 11 | using Microsoft.Build.Utilities; |
| 12 | using WixToolset.Tools.Core; | ||
| 13 | 12 | ||
| 14 | /// <summary> | 13 | /// <summary> |
| 15 | /// This task refreshes the generated file that contains ComponentGroupRefs | 14 | /// This task refreshes the generated file that contains ComponentGroupRefs |
