@joebigelow / wix / commits / ec39e954

Publicize heat extensions, harvesters and mutators

Hank McCord committed Sep 9, 2021 at 14:10 UTC ec39e9545cd68d53e90d2006548113d01b6832bc
20 files changed +43 -43
src/wix/heat/AssemblyHarvester.cs
+1 -1
@@ -10,7 +10,7 @@ namespace WixToolset.Harvesters
10 /// <summary>
11 /// Harvest WiX authoring from an assembly file.
12 /// </summary>
13 - internal class AssemblyHarvester
13 + public class AssemblyHarvester
14 {
15 /// <summary>
16 /// Harvest the registry values written by RegisterAssembly.
src/wix/heat/DirectoryHarvester.cs
+1 -1
@@ -12,7 +12,7 @@ namespace WixToolset.Harvesters
12 /// <summary>
13 /// Harvest WiX authoring for a directory from the file system.
14 /// </summary>
15 - internal class DirectoryHarvester : BaseHarvesterExtension
15 + public class DirectoryHarvester : BaseHarvesterExtension
16 {
17 private FileHarvester fileHarvester;
18
src/wix/heat/DllHarvester.cs
+1 -1
@@ -11,7 +11,7 @@ namespace WixToolset.Harvesters
11 /// <summary>
12 /// Harvest WiX authoring from a native DLL file.
13 /// </summary>
14 - internal class DllHarvester
14 + public class DllHarvester
15 {
16 /// <summary>
17 /// Harvest the registry values written by calling DllRegisterServer on the specified file.
src/wix/heat/FileHarvester.cs
+1 -1
@@ -12,7 +12,7 @@ namespace WixToolset.Harvesters
12 /// <summary>
13 /// Harvest WiX authoring for a file from the file system.
14 /// </summary>
15 - internal class FileHarvester : BaseHarvesterExtension
15 + public class FileHarvester : BaseHarvesterExtension
16 {
17 private string rootedDirectoryRef;
18 private bool setUniqueIdentifiers;
src/wix/heat/IIsFinalizeHarvesterMutator.cs
+1 -1
@@ -13,7 +13,7 @@ namespace WixToolset.Harvesters
13 /// <summary>
14 /// The finalize harvester mutator for the WiX Toolset Internet Information Services Extension.
15 /// </summary>
16 - internal class IIsFinalizeHarvesterMutator : BaseMutatorExtension
16 + public class IIsFinalizeHarvesterMutator : BaseMutatorExtension
17 {
18 private Hashtable directoryPaths;
19 private Hashtable filePaths;
src/wix/heat/IIsHarvesterMutator.cs
+1 -1
@@ -13,7 +13,7 @@ namespace WixToolset.Harvesters
13 /// <summary>
14 /// The harvester mutator for the WiX Toolset Internet Information Services Extension.
15 /// </summary>
16 - internal class IIsHarvesterMutator : BaseMutatorExtension
16 + public class IIsHarvesterMutator : BaseMutatorExtension
17 {
18 private ArrayList components;
19 private DirectoryHarvester directoryHarvester;
src/wix/heat/IIsHeatExtension.cs
+1 -1
@@ -8,7 +8,7 @@ namespace WixToolset.Harvesters
8 /// <summary>
9 /// An IIS harvesting extension for the WiX Toolset Harvester application.
10 /// </summary>
11 - internal class IIsHeatExtension : BaseHeatExtension
11 + public class IIsHeatExtension : BaseHeatExtension
12 {
13 /// <summary>
14 /// Gets the supported command line types for this extension.
src/wix/heat/IIsWebSiteHarvester.cs
+1 -1
@@ -15,7 +15,7 @@ namespace WixToolset.Harvesters
15 /// <summary>
16 /// The web site harvester for the WiX Toolset Internet Information Services Extension.
17 /// </summary>
18 - internal class IIsWebSiteHarvester : BaseHarvesterExtension
18 + public class IIsWebSiteHarvester : BaseHarvesterExtension
19 {
20 /// <summary>
21 /// Harvest a WiX document.
src/wix/heat/PayloadHarvester.cs
+1 -1
@@ -14,7 +14,7 @@ namespace WixToolset.Harvesters
14 /// <summary>
15 /// Harvest WiX authoring for a payload from the file system.
16 /// </summary>
17 - internal class PayloadHarvester : BaseHarvesterExtension
17 + public class PayloadHarvester : BaseHarvesterExtension
18 {
19 private bool setUniqueIdentifiers;
20 private WixBundlePackageType packageType;
src/wix/heat/PerformanceCategoryHarvester.cs
+4 -4
@@ -14,7 +14,7 @@ namespace WixToolset.Harvesters
14 /// <summary>
15 /// Harvest WiX authoring for a file from the file system.
16 /// </summary>
17 - internal class PerformanceCategoryHarvester : BaseHarvesterExtension
17 + public class PerformanceCategoryHarvester : BaseHarvesterExtension
18 {
19 /// <summary>
20 /// Harvest a performance category.
@@ -71,8 +71,8 @@ namespace WixToolset.Harvesters
71 {
72 perfCategory.MultiInstance = Util.YesNoType.yes;
73 }
74 -
75 - // If it's multi-instance, check if there are any instances and get counters from there; else we get
74 +
75 + // If it's multi-instance, check if there are any instances and get counters from there; else we get
76 // the counters straight up. For multi-instance, GetCounters() fails if there are any instances. If there
77 // are no instances, then GetCounters(instance) can't be called since there is no instance. Instances
78 // will exist for each counter even if only one of the counters was "intialized."
@@ -81,7 +81,7 @@ namespace WixToolset.Harvesters
81 PerformanceCounter[] counters = hasInstances
82 ? pcc.GetCounters(instances.First())
83 : pcc.GetCounters();
84 -
84 +
85 foreach (PerformanceCounter counter in counters)
86 {
87 Util.PerformanceCounter perfCounter = new Util.PerformanceCounter();
src/wix/heat/RegFileHarvester.cs
+6 -6
@@ -14,7 +14,7 @@ namespace WixToolset.Harvesters
14 /// <summary>
15 /// Harvest WiX authoring for a reg file.
16 /// </summary>
17 - internal class RegFileHarvester : BaseHarvesterExtension
17 + public class RegFileHarvester : BaseHarvesterExtension
18 {
19 private static readonly string ComponentPrefix = "cmp";
20
@@ -295,25 +295,25 @@ namespace WixToolset.Harvesters
295 value = parts[1].Substring(4);
296 type = Wix.RegistryValue.TypeType.binary;
297 }
298 - else if (parts[1].StartsWith("dword:"))
298 + else if (parts[1].StartsWith("dword:"))
299 {
300 // dword
301 value = parts[1].Substring(6);
302 type = Wix.RegistryValue.TypeType.integer;
303 }
304 - else if (parts[1].StartsWith("hex(2):"))
304 + else if (parts[1].StartsWith("hex(2):"))
305 {
306 // expandable string
307 value = parts[1].Substring(7);
308 type = Wix.RegistryValue.TypeType.expandable;
309 }
310 - else if (parts[1].StartsWith("hex(7):"))
310 + else if (parts[1].StartsWith("hex(7):"))
311 {
312 // multi-string
313 value = parts[1].Substring(7);
314 type = Wix.RegistryValue.TypeType.multiString;
315 }
316 - else if (parts[1].StartsWith("hex("))
316 + else if (parts[1].StartsWith("hex("))
317 {
318 // Give a better error when we find something that isn't supported
319 // by specifying the type that isn't supported.
@@ -332,7 +332,7 @@ namespace WixToolset.Harvesters
332 type = 0;
333 return false;
334 }
335 - else if (parts[1].StartsWith("\""))
335 + else if (parts[1].StartsWith("\""))
336 {
337 // string
338 value = parts[1].Substring(1, parts[1].Length - 2);
src/wix/heat/RegistryHarvester.cs
+2 -2
@@ -16,7 +16,7 @@ namespace WixToolset.Harvesters
16 /// <summary>
17 /// Harvest WiX authoring from the registry.
18 /// </summary>
19 - internal class RegistryHarvester : IDisposable
19 + public class RegistryHarvester : IDisposable
20 {
21 private const string HKCRPathInHKLM = @"Software\Classes";
22 private string remappedPath;
@@ -69,7 +69,7 @@ namespace WixToolset.Harvesters
69 this.RemapRegistryKey(NativeMethods.HkeyUsers, String.Concat(this.remappedPath, @"\\HKEY_USERS"));
70 this.RemapRegistryKey(NativeMethods.HkeyCurrentUser, String.Concat(this.remappedPath, @"\\HKEY_CURRENT_USER"));
71
72 - // Typelib registration on Windows Vista requires that the key
72 + // Typelib registration on Windows Vista requires that the key
73 // HKLM\Software\Classes exist, so add it to the remapped root
74 Registry.LocalMachine.CreateSubKey(HKCRPathInHKLM);
75 }
src/wix/heat/TypeLibraryHarvester.cs
+1 -1
@@ -10,7 +10,7 @@ namespace WixToolset.Harvesters
10 /// <summary>
11 /// Harvest WiX authoring from a type library file.
12 /// </summary>
13 - internal class TypeLibraryHarvester
13 + public class TypeLibraryHarvester
14 {
15 /// <summary>
16 /// Harvest the registry values written by RegisterTypeLib.
src/wix/heat/UtilFinalizeHarvesterMutator.cs
+4 -4
@@ -17,7 +17,7 @@ namespace WixToolset.Harvesters
17 /// <summary>
18 /// The finalize harvester mutator for the WiX Toolset Utility Extension.
19 /// </summary>
20 - internal class UtilFinalizeHarvesterMutator : BaseMutatorExtension
20 + public class UtilFinalizeHarvesterMutator : BaseMutatorExtension
21 {
22 private ArrayList components;
23 private ArrayList directories;
@@ -996,7 +996,7 @@ namespace WixToolset.Harvesters
996
997 // escape literal $ characters
998 file.Source = file.Source.Replace("$", "$$");
999 -
999 +
1000 if (null != sourceDirSubstitution && file.Source.StartsWith("SourceDir\\", StringComparison.Ordinal))
1001 {
1002 file.Source = file.Source.Substring(9).Insert(0, sourceDirSubstitution);
@@ -1059,7 +1059,7 @@ namespace WixToolset.Harvesters
1059 }
1060 }
1061
1062 -
1062 +
1063 ArrayList reversedDirectoryPaths = new ArrayList();
1064
1065 // reverse the indexed directory paths to ensure the longest paths are found first
@@ -1090,7 +1090,7 @@ namespace WixToolset.Harvesters
1090 }
1091 }
1092 }
1093 -
1093 +
1094 private static bool IsVb6RegistryValue(Wix.RegistryValue registryValue)
1095 {
1096 if (Wix.RegistryValue.ActionType.write == registryValue.Action && Wix.RegistryRootType.HKCR == registryValue.Root)
src/wix/heat/UtilHarvesterMutator.cs
+1 -1
@@ -15,7 +15,7 @@ namespace WixToolset.Harvesters
15 /// <summary>
16 /// The WiX Toolset harvester mutator.
17 /// </summary>
18 - internal class UtilHarvesterMutator : BaseMutatorExtension
18 + public class UtilHarvesterMutator : BaseMutatorExtension
19 {
20 // Flags for SetErrorMode() native method.
21 private const UInt32 SEM_FAILCRITICALERRORS = 0x0001;
src/wix/heat/UtilHeatExtension.cs
+3 -3
@@ -15,7 +15,7 @@ namespace WixToolset.Harvesters
15 /// <summary>
16 /// A utility heat extension for the WiX Toolset Harvester application.
17 /// </summary>
18 - internal class UtilHeatExtension : BaseHeatExtension
18 + public class UtilHeatExtension : BaseHeatExtension
19 {
20 public UtilHeatExtension(IServiceProvider serviceProvider)
21 {
@@ -44,7 +44,7 @@ namespace WixToolset.Harvesters
44 new HeatCommandLineOption("-cg <ComponentGroupName>", "component group name (cannot contain spaces e.g -cg MyComponentGroup)"),
45 new HeatCommandLineOption("-dr <DirectoryName>", "directory reference to root directories (cannot contain spaces e.g. -dr MyAppDirRef)"),
46 new HeatCommandLineOption("-var <VariableName>", "substitute File/@Source=\"SourceDir\" with a preprocessor or a wix variable" + Environment.NewLine +
47 - "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine +
47 + "(e.g. -var var.MySource will become File/@Source=\"$(var.MySource)\\myfile.txt\" and " + Environment.NewLine +
48 "-var wix.MySource will become File/@Source=\"!(wix.MySource)\\myfile.txt\""),
49 new HeatCommandLineOption("-gg", "generate guids now"),
50 new HeatCommandLineOption("-g1", "generated guids are not in brackets"),
@@ -379,7 +379,7 @@ namespace WixToolset.Harvesters
379 {
380 string truncatedCommandSwitch = args[index];
381 string commandSwitchValue = args[index + 1];
382 -
382 +
383 //increment the index to the switch value
384 index++;
385
src/wix/heat/UtilMutator.cs
+6 -6
@@ -13,7 +13,7 @@ namespace WixToolset.Harvesters
13 /// <summary>
14 /// The template type.
15 /// </summary>
16 - internal enum TemplateType
16 + public enum TemplateType
17 {
18 /// <summary>
19 /// A fragment template.
@@ -34,7 +34,7 @@ namespace WixToolset.Harvesters
34 /// <summary>
35 /// The mutator for the WiX Toolset Internet Information Services Extension.
36 /// </summary>
37 - internal class UtilMutator : BaseMutatorExtension
37 + public class UtilMutator : BaseMutatorExtension
38 {
39 private ArrayList components;
40 private ArrayList componentGroups;
@@ -108,10 +108,10 @@ namespace WixToolset.Harvesters
108
109 /// <summary>
110 /// Gets or sets the option to set the format of guids.
111 - /// D - 32 digits separated by hyphens:
112 - /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
113 - /// B - 32 digits separated by hyphens, enclosed in brackets:
114 - /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
111 + /// D - 32 digits separated by hyphens:
112 + /// xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx
113 + /// B - 32 digits separated by hyphens, enclosed in brackets:
114 + /// {xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}
115 /// </summary>
116 /// <value>Guid format either B or D.</value>
117 public string GuidFormat
src/wix/heat/UtilTransformMutator.cs
+1 -1
@@ -9,7 +9,7 @@ namespace WixToolset.Harvesters
9 using WixToolset.Harvesters.Data;
10 using WixToolset.Harvesters.Extensibility;
11
12 - internal class UtilTransformMutator : BaseMutatorExtension
12 + public class UtilTransformMutator : BaseMutatorExtension
13 {
14 private string transform;
15 private int transformSequence;
src/wix/heat/VSHeatExtension.cs
+5 -5
@@ -11,7 +11,7 @@ namespace WixToolset.Harvesters
11 /// <summary>
12 /// Defines generated element types.
13 /// </summary>
14 - internal enum GenerateType
14 + public enum GenerateType
15 {
16 /// <summary>Generate Components.</summary>
17 Components,
@@ -29,7 +29,7 @@ namespace WixToolset.Harvesters
29 /// <summary>
30 /// VS-related extensions for the WiX Toolset Harvester application.
31 /// </summary>
32 - internal class VSHeatExtension : BaseHeatExtension
32 + public class VSHeatExtension : BaseHeatExtension
33 {
34 /// <summary>
35 /// Gets the supported command line types for this extension.
@@ -45,7 +45,7 @@ namespace WixToolset.Harvesters
45 new HeatCommandLineOption("-configuration", "configuration to set when harvesting the project"),
46 new HeatCommandLineOption("-directoryid", "overridden directory id for generated directory elements"),
47 new HeatCommandLineOption("-generate", Environment.NewLine +
48 - " specify what elements to generate, one of:" + Environment.NewLine +
48 + " specify what elements to generate, one of:" + Environment.NewLine +
49 " components, container, payloadgroup, packagegroup" + Environment.NewLine +
50 " (default is components)"),
51 new HeatCommandLineOption("-msbuildbinpath", "msbuild bin directory path"),
@@ -94,7 +94,7 @@ namespace WixToolset.Harvesters
94 {
95 throw new WixException(HarvesterErrors.InvalidDirectoryId(args[i]));
96 }
97 -
97 +
98 directoryIds = args[i];
99 }
100 else if ("-generate" == args[i])
@@ -187,7 +187,7 @@ namespace WixToolset.Harvesters
187 {
188 throw new WixException(HarvesterErrors.InvalidProjectName(args[i]));
189 }
190 -
190 +
191 projectName = args[i];
192 }
193 else if ("-suid" == args[i])
src/wix/heat/VSProjectHarvester.cs
+1 -1
@@ -19,7 +19,7 @@ namespace WixToolset.Harvesters
19 /// <summary>
20 /// Harvest WiX authoring for the outputs of a VS project.
21 /// </summary>
22 - internal class VSProjectHarvester : BaseHarvesterExtension
22 + public class VSProjectHarvester : BaseHarvesterExtension
23 {
24 // These format strings are used for generated element identifiers.
25 // {0} = project name