From ec39e9545cd68d53e90d2006548113d01b6832bc Mon Sep 17 00:00:00 2001 From: Hank McCord Date: Thu, 9 Sep 2021 14:10:05 -0400 Subject: Publicize heat extensions, harvesters and mutators --- src/wix/heat/AssemblyHarvester.cs | 2 +- src/wix/heat/DirectoryHarvester.cs | 2 +- src/wix/heat/DllHarvester.cs | 2 +- src/wix/heat/FileHarvester.cs | 2 +- src/wix/heat/IIsFinalizeHarvesterMutator.cs | 2 +- src/wix/heat/IIsHarvesterMutator.cs | 2 +- src/wix/heat/IIsHeatExtension.cs | 2 +- src/wix/heat/IIsWebSiteHarvester.cs | 2 +- src/wix/heat/PayloadHarvester.cs | 2 +- src/wix/heat/PerformanceCategoryHarvester.cs | 8 ++++---- src/wix/heat/RegFileHarvester.cs | 12 ++++++------ src/wix/heat/RegistryHarvester.cs | 4 ++-- src/wix/heat/TypeLibraryHarvester.cs | 2 +- src/wix/heat/UtilFinalizeHarvesterMutator.cs | 8 ++++---- src/wix/heat/UtilHarvesterMutator.cs | 2 +- src/wix/heat/UtilHeatExtension.cs | 6 +++--- src/wix/heat/UtilMutator.cs | 12 ++++++------ src/wix/heat/UtilTransformMutator.cs | 2 +- src/wix/heat/VSHeatExtension.cs | 10 +++++----- src/wix/heat/VSProjectHarvester.cs | 2 +- 20 files changed, 43 insertions(+), 43 deletions(-) diff --git a/src/wix/heat/AssemblyHarvester.cs b/src/wix/heat/AssemblyHarvester.cs index be61f275..37af4840 100644 --- a/src/wix/heat/AssemblyHarvester.cs +++ b/src/wix/heat/AssemblyHarvester.cs @@ -10,7 +10,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring from an assembly file. /// - internal class AssemblyHarvester + public class AssemblyHarvester { /// /// Harvest the registry values written by RegisterAssembly. diff --git a/src/wix/heat/DirectoryHarvester.cs b/src/wix/heat/DirectoryHarvester.cs index 090d67ab..1147c322 100644 --- a/src/wix/heat/DirectoryHarvester.cs +++ b/src/wix/heat/DirectoryHarvester.cs @@ -12,7 +12,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for a directory from the file system. /// - internal class DirectoryHarvester : BaseHarvesterExtension + public class DirectoryHarvester : BaseHarvesterExtension { private FileHarvester fileHarvester; diff --git a/src/wix/heat/DllHarvester.cs b/src/wix/heat/DllHarvester.cs index 723e44ee..0c6cd4fa 100644 --- a/src/wix/heat/DllHarvester.cs +++ b/src/wix/heat/DllHarvester.cs @@ -11,7 +11,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring from a native DLL file. /// - internal class DllHarvester + public class DllHarvester { /// /// Harvest the registry values written by calling DllRegisterServer on the specified file. diff --git a/src/wix/heat/FileHarvester.cs b/src/wix/heat/FileHarvester.cs index 8bb1a155..0c33363b 100644 --- a/src/wix/heat/FileHarvester.cs +++ b/src/wix/heat/FileHarvester.cs @@ -12,7 +12,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for a file from the file system. /// - internal class FileHarvester : BaseHarvesterExtension + public class FileHarvester : BaseHarvesterExtension { private string rootedDirectoryRef; private bool setUniqueIdentifiers; diff --git a/src/wix/heat/IIsFinalizeHarvesterMutator.cs b/src/wix/heat/IIsFinalizeHarvesterMutator.cs index 17d3bef4..765761a2 100644 --- a/src/wix/heat/IIsFinalizeHarvesterMutator.cs +++ b/src/wix/heat/IIsFinalizeHarvesterMutator.cs @@ -13,7 +13,7 @@ namespace WixToolset.Harvesters /// /// The finalize harvester mutator for the WiX Toolset Internet Information Services Extension. /// - internal class IIsFinalizeHarvesterMutator : BaseMutatorExtension + public class IIsFinalizeHarvesterMutator : BaseMutatorExtension { private Hashtable directoryPaths; private Hashtable filePaths; diff --git a/src/wix/heat/IIsHarvesterMutator.cs b/src/wix/heat/IIsHarvesterMutator.cs index 76d94b6a..ac16d224 100644 --- a/src/wix/heat/IIsHarvesterMutator.cs +++ b/src/wix/heat/IIsHarvesterMutator.cs @@ -13,7 +13,7 @@ namespace WixToolset.Harvesters /// /// The harvester mutator for the WiX Toolset Internet Information Services Extension. /// - internal class IIsHarvesterMutator : BaseMutatorExtension + public class IIsHarvesterMutator : BaseMutatorExtension { private ArrayList components; private DirectoryHarvester directoryHarvester; diff --git a/src/wix/heat/IIsHeatExtension.cs b/src/wix/heat/IIsHeatExtension.cs index 94e11a68..8ad87bbc 100644 --- a/src/wix/heat/IIsHeatExtension.cs +++ b/src/wix/heat/IIsHeatExtension.cs @@ -8,7 +8,7 @@ namespace WixToolset.Harvesters /// /// An IIS harvesting extension for the WiX Toolset Harvester application. /// - internal class IIsHeatExtension : BaseHeatExtension + public class IIsHeatExtension : BaseHeatExtension { /// /// Gets the supported command line types for this extension. diff --git a/src/wix/heat/IIsWebSiteHarvester.cs b/src/wix/heat/IIsWebSiteHarvester.cs index 86861b16..e389f554 100644 --- a/src/wix/heat/IIsWebSiteHarvester.cs +++ b/src/wix/heat/IIsWebSiteHarvester.cs @@ -15,7 +15,7 @@ namespace WixToolset.Harvesters /// /// The web site harvester for the WiX Toolset Internet Information Services Extension. /// - internal class IIsWebSiteHarvester : BaseHarvesterExtension + public class IIsWebSiteHarvester : BaseHarvesterExtension { /// /// Harvest a WiX document. diff --git a/src/wix/heat/PayloadHarvester.cs b/src/wix/heat/PayloadHarvester.cs index 4bf625d1..fe7c8297 100644 --- a/src/wix/heat/PayloadHarvester.cs +++ b/src/wix/heat/PayloadHarvester.cs @@ -14,7 +14,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for a payload from the file system. /// - internal class PayloadHarvester : BaseHarvesterExtension + public class PayloadHarvester : BaseHarvesterExtension { private bool setUniqueIdentifiers; private WixBundlePackageType packageType; diff --git a/src/wix/heat/PerformanceCategoryHarvester.cs b/src/wix/heat/PerformanceCategoryHarvester.cs index d9c46001..551e50d7 100644 --- a/src/wix/heat/PerformanceCategoryHarvester.cs +++ b/src/wix/heat/PerformanceCategoryHarvester.cs @@ -14,7 +14,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for a file from the file system. /// - internal class PerformanceCategoryHarvester : BaseHarvesterExtension + public class PerformanceCategoryHarvester : BaseHarvesterExtension { /// /// Harvest a performance category. @@ -71,8 +71,8 @@ namespace WixToolset.Harvesters { perfCategory.MultiInstance = Util.YesNoType.yes; } - - // If it's multi-instance, check if there are any instances and get counters from there; else we get + + // If it's multi-instance, check if there are any instances and get counters from there; else we get // the counters straight up. For multi-instance, GetCounters() fails if there are any instances. If there // are no instances, then GetCounters(instance) can't be called since there is no instance. Instances // will exist for each counter even if only one of the counters was "intialized." @@ -81,7 +81,7 @@ namespace WixToolset.Harvesters PerformanceCounter[] counters = hasInstances ? pcc.GetCounters(instances.First()) : pcc.GetCounters(); - + foreach (PerformanceCounter counter in counters) { Util.PerformanceCounter perfCounter = new Util.PerformanceCounter(); diff --git a/src/wix/heat/RegFileHarvester.cs b/src/wix/heat/RegFileHarvester.cs index a3d181f2..b8b1d44d 100644 --- a/src/wix/heat/RegFileHarvester.cs +++ b/src/wix/heat/RegFileHarvester.cs @@ -14,7 +14,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for a reg file. /// - internal class RegFileHarvester : BaseHarvesterExtension + public class RegFileHarvester : BaseHarvesterExtension { private static readonly string ComponentPrefix = "cmp"; @@ -295,25 +295,25 @@ namespace WixToolset.Harvesters value = parts[1].Substring(4); type = Wix.RegistryValue.TypeType.binary; } - else if (parts[1].StartsWith("dword:")) + else if (parts[1].StartsWith("dword:")) { // dword value = parts[1].Substring(6); type = Wix.RegistryValue.TypeType.integer; } - else if (parts[1].StartsWith("hex(2):")) + else if (parts[1].StartsWith("hex(2):")) { // expandable string value = parts[1].Substring(7); type = Wix.RegistryValue.TypeType.expandable; } - else if (parts[1].StartsWith("hex(7):")) + else if (parts[1].StartsWith("hex(7):")) { // multi-string value = parts[1].Substring(7); type = Wix.RegistryValue.TypeType.multiString; } - else if (parts[1].StartsWith("hex(")) + else if (parts[1].StartsWith("hex(")) { // Give a better error when we find something that isn't supported // by specifying the type that isn't supported. @@ -332,7 +332,7 @@ namespace WixToolset.Harvesters type = 0; return false; } - else if (parts[1].StartsWith("\"")) + else if (parts[1].StartsWith("\"")) { // string value = parts[1].Substring(1, parts[1].Length - 2); diff --git a/src/wix/heat/RegistryHarvester.cs b/src/wix/heat/RegistryHarvester.cs index d416236c..668009eb 100644 --- a/src/wix/heat/RegistryHarvester.cs +++ b/src/wix/heat/RegistryHarvester.cs @@ -16,7 +16,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring from the registry. /// - internal class RegistryHarvester : IDisposable + public class RegistryHarvester : IDisposable { private const string HKCRPathInHKLM = @"Software\Classes"; private string remappedPath; @@ -69,7 +69,7 @@ namespace WixToolset.Harvesters this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS")); this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER")); - // Typelib registration on Windows Vista requires that the key + // Typelib registration on Windows Vista requires that the key // HKLM\Software\Classes exist, so add it to the remapped root Registry.LocalMachine.CreateSubKey(HKCRPathInHKLM); } diff --git a/src/wix/heat/TypeLibraryHarvester.cs b/src/wix/heat/TypeLibraryHarvester.cs index 4a271a35..125f45df 100644 --- a/src/wix/heat/TypeLibraryHarvester.cs +++ b/src/wix/heat/TypeLibraryHarvester.cs @@ -10,7 +10,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring from a type library file. /// - internal class TypeLibraryHarvester + public class TypeLibraryHarvester { /// /// Harvest the registry values written by RegisterTypeLib. diff --git a/src/wix/heat/UtilFinalizeHarvesterMutator.cs b/src/wix/heat/UtilFinalizeHarvesterMutator.cs index 3e9f1ce7..04083bbe 100644 --- a/src/wix/heat/UtilFinalizeHarvesterMutator.cs +++ b/src/wix/heat/UtilFinalizeHarvesterMutator.cs @@ -17,7 +17,7 @@ namespace WixToolset.Harvesters /// /// The finalize harvester mutator for the WiX Toolset Utility Extension. /// - internal class UtilFinalizeHarvesterMutator : BaseMutatorExtension + public class UtilFinalizeHarvesterMutator : BaseMutatorExtension { private ArrayList components; private ArrayList directories; @@ -996,7 +996,7 @@ namespace WixToolset.Harvesters // escape literal $ characters file.Source = file.Source.Replace("$", "$$"); - + if (null != sourceDirSubstitution && file.Source.StartsWith("SourceDir\\", StringComparison.Ordinal)) { file.Source = file.Source.Substring(9).Insert(0, sourceDirSubstitution); @@ -1059,7 +1059,7 @@ namespace WixToolset.Harvesters } } - + ArrayList reversedDirectoryPaths = new ArrayList(); // reverse the indexed directory paths to ensure the longest paths are found first @@ -1090,7 +1090,7 @@ namespace WixToolset.Harvesters } } } - + private static bool IsVb6RegistryValue(Wix.RegistryValue registryValue) { if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root) diff --git a/src/wix/heat/UtilHarvesterMutator.cs b/src/wix/heat/UtilHarvesterMutator.cs index 59fb9a93..e2402880 100644 --- a/src/wix/heat/UtilHarvesterMutator.cs +++ b/src/wix/heat/UtilHarvesterMutator.cs @@ -15,7 +15,7 @@ namespace WixToolset.Harvesters /// /// The WiX Toolset harvester mutator. /// - internal class UtilHarvesterMutator : BaseMutatorExtension + public class UtilHarvesterMutator : BaseMutatorExtension { // Flags for SetErrorMode() native method. private const UInt32 SEM_FAILCRITICALERRORS = 0x0001; diff --git a/src/wix/heat/UtilHeatExtension.cs b/src/wix/heat/UtilHeatExtension.cs index 7296a3b3..5a5935ec 100644 --- a/src/wix/heat/UtilHeatExtension.cs +++ b/src/wix/heat/UtilHeatExtension.cs @@ -15,7 +15,7 @@ namespace WixToolset.Harvesters /// /// A utility heat extension for the WiX Toolset Harvester application. /// - internal class UtilHeatExtension : BaseHeatExtension + public class UtilHeatExtension : BaseHeatExtension { public UtilHeatExtension(IServiceProvider serviceProvider) { @@ -44,7 +44,7 @@ namespace WixToolset.Harvesters new HeatCommandLineOption("-cg ", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"), new HeatCommandLineOption("-dr ", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"), new HeatCommandLineOption("-var ", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine + - "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine + + "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine + "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""), new HeatCommandLineOption("-gg", "generate guids now"), new HeatCommandLineOption("-g1", "generated guids are not in brackets"), @@ -379,7 +379,7 @@ namespace WixToolset.Harvesters { string truncatedCommandSwitch = args[index]; string commandSwitchValue = args[index + 1]; - + //increment the index to the switch value index++; diff --git a/src/wix/heat/UtilMutator.cs b/src/wix/heat/UtilMutator.cs index 3ba3a8eb..46532fbc 100644 --- a/src/wix/heat/UtilMutator.cs +++ b/src/wix/heat/UtilMutator.cs @@ -13,7 +13,7 @@ namespace WixToolset.Harvesters /// /// The template type. /// - internal enum TemplateType + public enum TemplateType { /// /// A fragment template. @@ -34,7 +34,7 @@ namespace WixToolset.Harvesters /// /// The mutator for the WiX Toolset Internet Information Services Extension. /// - internal class UtilMutator : BaseMutatorExtension + public class UtilMutator : BaseMutatorExtension { private ArrayList components; private ArrayList componentGroups; @@ -108,10 +108,10 @@ namespace WixToolset.Harvesters /// /// Gets or sets the option to set the format of guids. - /// D - 32 digits separated by hyphens: - /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx - /// B - 32 digits separated by hyphens, enclosed in brackets: - /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} + /// D - 32 digits separated by hyphens: + /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx + /// B - 32 digits separated by hyphens, enclosed in brackets: + /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx} /// /// Guid format either B or D. public string GuidFormat diff --git a/src/wix/heat/UtilTransformMutator.cs b/src/wix/heat/UtilTransformMutator.cs index f4dda3c5..a4597eb7 100644 --- a/src/wix/heat/UtilTransformMutator.cs +++ b/src/wix/heat/UtilTransformMutator.cs @@ -9,7 +9,7 @@ namespace WixToolset.Harvesters using WixToolset.Harvesters.Data; using WixToolset.Harvesters.Extensibility; - internal class UtilTransformMutator : BaseMutatorExtension + public class UtilTransformMutator : BaseMutatorExtension { private string transform; private int transformSequence; diff --git a/src/wix/heat/VSHeatExtension.cs b/src/wix/heat/VSHeatExtension.cs index 7c0539bf..e628f19b 100644 --- a/src/wix/heat/VSHeatExtension.cs +++ b/src/wix/heat/VSHeatExtension.cs @@ -11,7 +11,7 @@ namespace WixToolset.Harvesters /// /// Defines generated element types. /// - internal enum GenerateType + public enum GenerateType { /// Generate Components. Components, @@ -29,7 +29,7 @@ namespace WixToolset.Harvesters /// /// VS-related extensions for the WiX Toolset Harvester application. /// - internal class VSHeatExtension : BaseHeatExtension + public class VSHeatExtension : BaseHeatExtension { /// /// Gets the supported command line types for this extension. @@ -45,7 +45,7 @@ namespace WixToolset.Harvesters new HeatCommandLineOption("-configuration", "configuration to set when harvesting the project"), new HeatCommandLineOption("-directoryid", "overridden directory id for generated directory elements"), new HeatCommandLineOption("-generate", Environment.NewLine + - " specify what elements to generate, one of:" + Environment.NewLine + + " specify what elements to generate, one of:" + Environment.NewLine + " components, container, payloadgroup, packagegroup" + Environment.NewLine + " (default is components)"), new HeatCommandLineOption("-msbuildbinpath", "msbuild bin directory path"), @@ -94,7 +94,7 @@ namespace WixToolset.Harvesters { throw new WixException(HarvesterErrors.InvalidDirectoryId(args[i])); } - + directoryIds = args[i]; } else if ("-generate" == args[i]) @@ -187,7 +187,7 @@ namespace WixToolset.Harvesters { throw new WixException(HarvesterErrors.InvalidProjectName(args[i])); } - + projectName = args[i]; } else if ("-suid" == args[i]) diff --git a/src/wix/heat/VSProjectHarvester.cs b/src/wix/heat/VSProjectHarvester.cs index 115ee828..7a7ba773 100644 --- a/src/wix/heat/VSProjectHarvester.cs +++ b/src/wix/heat/VSProjectHarvester.cs @@ -19,7 +19,7 @@ namespace WixToolset.Harvesters /// /// Harvest WiX authoring for the outputs of a VS project. /// - internal class VSProjectHarvester : BaseHarvesterExtension + public class VSProjectHarvester : BaseHarvesterExtension { // These format strings are used for generated element identifiers. // {0} = project name -- cgit v1.2.3-55-g6feb