diff options
author | Rob Mensching <rob@firegiant.com> | 2017-11-11 01:40:34 -0800 |
---|---|---|
committer | Rob Mensching <rob@firegiant.com> | 2017-11-11 01:40:34 -0800 |
commit | 414bf166e07703056ad186fa8ec23a4119dd9993 (patch) | |
tree | 960aa302bcc3b7d80db3f2cdd87462251790f091 | |
parent | 69b15d96cebdbb7201b1849b4f62786633d70b8d (diff) | |
download | wix-414bf166e07703056ad186fa8ec23a4119dd9993.tar.gz wix-414bf166e07703056ad186fa8ec23a4119dd9993.tar.bz2 wix-414bf166e07703056ad186fa8ec23a4119dd9993.zip |
Additional IR updates
-rw-r--r-- | src/WixToolset.Data/FileStructure.cs | 2 | ||||
-rw-r--r-- | src/WixToolset.Data/Identifier.cs | 27 | ||||
-rw-r--r-- | src/WixToolset.Data/IntermediateTuple.cs | 21 | ||||
-rw-r--r-- | src/WixToolset.Data/Json/JsonObjectExtensions.cs | 5 | ||||
-rw-r--r-- | src/WixToolset.Data/SourceLineNumber.cs | 33 | ||||
-rw-r--r-- | src/WixToolset.Data/Tuples/WixFileTuple.cs | 2 | ||||
-rw-r--r-- | src/WixToolset.Data/Tuples/WixMergeTuple.cs | 6 | ||||
-rw-r--r-- | src/WixToolset.Data/Tuples/WixPatchIdTuple.cs | 6 | ||||
-rw-r--r-- | src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs | 8 | ||||
-rw-r--r-- | src/WixToolset.Data/WindowsInstallerStandard.cs | 506 |
10 files changed, 600 insertions, 16 deletions
diff --git a/src/WixToolset.Data/FileStructure.cs b/src/WixToolset.Data/FileStructure.cs index 9ad9405a..722125d8 100644 --- a/src/WixToolset.Data/FileStructure.cs +++ b/src/WixToolset.Data/FileStructure.cs | |||
@@ -61,7 +61,7 @@ namespace WixToolset.Data | |||
61 | { | 61 | { |
62 | fs.WriteType(writer, fileFormat); | 62 | fs.WriteType(writer, fileFormat); |
63 | 63 | ||
64 | fs.WriteEmbeddedFiles(writer, embedFilePaths.ToArray()); | 64 | fs.WriteEmbeddedFiles(writer, embedFilePaths?.ToArray() ?? Array.Empty<string>()); |
65 | 65 | ||
66 | // Remember the data stream offset, which is right after the embedded files have been written. | 66 | // Remember the data stream offset, which is right after the embedded files have been written. |
67 | fs.dataStreamOffset = stream.Position; | 67 | fs.dataStreamOffset = stream.Position; |
diff --git a/src/WixToolset.Data/Identifier.cs b/src/WixToolset.Data/Identifier.cs index 38b12989..84c80081 100644 --- a/src/WixToolset.Data/Identifier.cs +++ b/src/WixToolset.Data/Identifier.cs | |||
@@ -4,9 +4,10 @@ namespace WixToolset.Data | |||
4 | { | 4 | { |
5 | using System; | 5 | using System; |
6 | using System.Diagnostics; | 6 | using System.Diagnostics; |
7 | using SimpleJson; | ||
7 | 8 | ||
8 | /// <summary> | 9 | /// <summary> |
9 | /// Class to define the identifier and access for a row. | 10 | /// Class to define the identifier and access for a tuple. |
10 | /// </summary> | 11 | /// </summary> |
11 | [DebuggerDisplay("{Access} {Id,nq}")] | 12 | [DebuggerDisplay("{Access} {Id,nq}")] |
12 | public class Identifier | 13 | public class Identifier |
@@ -26,13 +27,33 @@ namespace WixToolset.Data | |||
26 | } | 27 | } |
27 | 28 | ||
28 | /// <summary> | 29 | /// <summary> |
29 | /// Access modifier for a row. | 30 | /// Access modifier for a tuple. |
30 | /// </summary> | 31 | /// </summary> |
31 | public AccessModifier Access { get; } | 32 | public AccessModifier Access { get; } |
32 | 33 | ||
33 | /// <summary> | 34 | /// <summary> |
34 | /// Identifier for the row. | 35 | /// Identifier for the tuple. |
35 | /// </summary> | 36 | /// </summary> |
36 | public string Id { get; } | 37 | public string Id { get; } |
38 | |||
39 | internal static Identifier Deserialize(JsonObject jsonObject) | ||
40 | { | ||
41 | var id = jsonObject.GetValueOrDefault<string>("id"); | ||
42 | var accessValue = jsonObject.GetValueOrDefault<string>("access"); | ||
43 | Enum.TryParse(accessValue, true, out AccessModifier access); | ||
44 | |||
45 | return new Identifier(id, access); | ||
46 | } | ||
47 | |||
48 | internal JsonObject Serialize() | ||
49 | { | ||
50 | var jsonObject = new JsonObject | ||
51 | { | ||
52 | { "id", this.Id }, | ||
53 | { "access", this.Access.ToString().ToLowerInvariant() } | ||
54 | }; | ||
55 | |||
56 | return jsonObject; | ||
57 | } | ||
37 | } | 58 | } |
38 | } | 59 | } |
diff --git a/src/WixToolset.Data/IntermediateTuple.cs b/src/WixToolset.Data/IntermediateTuple.cs index 36cee2aa..0f1e5965 100644 --- a/src/WixToolset.Data/IntermediateTuple.cs +++ b/src/WixToolset.Data/IntermediateTuple.cs | |||
@@ -30,12 +30,17 @@ namespace WixToolset.Data | |||
30 | 30 | ||
31 | internal static IntermediateTuple Deserialize(ITupleDefinitionCreator creator, JsonObject jsonObject) | 31 | internal static IntermediateTuple Deserialize(ITupleDefinitionCreator creator, JsonObject jsonObject) |
32 | { | 32 | { |
33 | var definitionName = jsonObject.GetValueOrDefault<string>("def"); | 33 | var definitionName = jsonObject.GetValueOrDefault<string>("type"); |
34 | var idJson = jsonObject.GetValueOrDefault<JsonObject>("id"); | ||
35 | var sourceLineNumbersJson = jsonObject.GetValueOrDefault<JsonObject>("ln"); | ||
34 | var fieldsJson = jsonObject.GetValueOrDefault<JsonArray>("fields"); | 36 | var fieldsJson = jsonObject.GetValueOrDefault<JsonArray>("fields"); |
35 | 37 | ||
36 | creator.TryGetTupleDefinitionByName(definitionName, out var definition); // TODO: this isn't sufficient. | 38 | creator.TryGetTupleDefinitionByName(definitionName, out var definition); // TODO: this isn't sufficient. |
37 | var tuple = definition.CreateTuple(); | 39 | var tuple = definition.CreateTuple(); |
38 | 40 | ||
41 | tuple.Id = (idJson == null) ? null : Identifier.Deserialize(idJson); | ||
42 | tuple.SourceLineNumbers = (sourceLineNumbersJson == null) ? null : SourceLineNumber.Deserialize(sourceLineNumbersJson); | ||
43 | |||
39 | for (var i = 0; i < fieldsJson.Count; ++i) | 44 | for (var i = 0; i < fieldsJson.Count; ++i) |
40 | { | 45 | { |
41 | if (tuple.Fields.Length > i && fieldsJson[i] is JsonObject fieldJson) | 46 | if (tuple.Fields.Length > i && fieldsJson[i] is JsonObject fieldJson) |
@@ -51,9 +56,21 @@ namespace WixToolset.Data | |||
51 | { | 56 | { |
52 | var jsonObject = new JsonObject | 57 | var jsonObject = new JsonObject |
53 | { | 58 | { |
54 | { "def", this.Definition.Name } | 59 | { "type", this.Definition.Name } |
55 | }; | 60 | }; |
56 | 61 | ||
62 | var idJson = this.Id?.Serialize(); | ||
63 | if (idJson != null) | ||
64 | { | ||
65 | jsonObject.Add("id", idJson); | ||
66 | } | ||
67 | |||
68 | var lnJson = this.SourceLineNumbers?.Serialize(); | ||
69 | if (lnJson != null) | ||
70 | { | ||
71 | jsonObject.Add("ln", lnJson); | ||
72 | } | ||
73 | |||
57 | var fieldsJson = new JsonArray(this.Fields.Length); | 74 | var fieldsJson = new JsonArray(this.Fields.Length); |
58 | 75 | ||
59 | foreach (var field in this.Fields) | 76 | foreach (var field in this.Fields) |
diff --git a/src/WixToolset.Data/Json/JsonObjectExtensions.cs b/src/WixToolset.Data/Json/JsonObjectExtensions.cs index 091d90f4..296a7ab6 100644 --- a/src/WixToolset.Data/Json/JsonObjectExtensions.cs +++ b/src/WixToolset.Data/Json/JsonObjectExtensions.cs | |||
@@ -12,6 +12,11 @@ namespace WixToolset.Data | |||
12 | return jsonObject.TryGetValue(key, out var value) ? Convert.ToInt32(value) : defaultValue; | 12 | return jsonObject.TryGetValue(key, out var value) ? Convert.ToInt32(value) : defaultValue; |
13 | } | 13 | } |
14 | 14 | ||
15 | public static int? GetValueOrDefault(this JsonObject jsonObject, string key, int? defaultValue) | ||
16 | { | ||
17 | return jsonObject.TryGetValue(key, out var value) ? Convert.ToInt32(value) : defaultValue; | ||
18 | } | ||
19 | |||
15 | public static T GetValueOrDefault<T>(this JsonObject jsonObject, string key, T defaultValue = default(T)) where T : class | 20 | public static T GetValueOrDefault<T>(this JsonObject jsonObject, string key, T defaultValue = default(T)) where T : class |
16 | { | 21 | { |
17 | return jsonObject.TryGetValue(key, out var value) ? value as T: defaultValue; | 22 | return jsonObject.TryGetValue(key, out var value) ? value as T: defaultValue; |
diff --git a/src/WixToolset.Data/SourceLineNumber.cs b/src/WixToolset.Data/SourceLineNumber.cs index 87a36132..742f6e9d 100644 --- a/src/WixToolset.Data/SourceLineNumber.cs +++ b/src/WixToolset.Data/SourceLineNumber.cs | |||
@@ -7,6 +7,7 @@ namespace WixToolset.Data | |||
7 | using System.Text; | 7 | using System.Text; |
8 | using System.Xml; | 8 | using System.Xml; |
9 | using System.Xml.Linq; | 9 | using System.Xml.Linq; |
10 | using SimpleJson; | ||
10 | 11 | ||
11 | /// <summary> | 12 | /// <summary> |
12 | /// Represents file name and line number for source file | 13 | /// Represents file name and line number for source file |
@@ -62,6 +63,38 @@ namespace WixToolset.Data | |||
62 | } | 63 | } |
63 | } | 64 | } |
64 | 65 | ||
66 | internal static SourceLineNumber Deserialize(JsonObject jsonObject) | ||
67 | { | ||
68 | var fileName = jsonObject.GetValueOrDefault<string>("file"); | ||
69 | var lineNumber = jsonObject.GetValueOrDefault("line", null); | ||
70 | |||
71 | var parentJson = jsonObject.GetValueOrDefault<JsonObject>("parent"); | ||
72 | var parent = (parentJson == null) ? null : SourceLineNumber.Deserialize(parentJson); | ||
73 | |||
74 | return new SourceLineNumber(fileName) | ||
75 | { | ||
76 | LineNumber = lineNumber, | ||
77 | Parent = parent | ||
78 | }; | ||
79 | } | ||
80 | |||
81 | internal JsonObject Serialize() | ||
82 | { | ||
83 | var jsonObject = new JsonObject | ||
84 | { | ||
85 | { "file", this.FileName }, | ||
86 | { "line", this.LineNumber } | ||
87 | }; | ||
88 | |||
89 | if (this.Parent != null) | ||
90 | { | ||
91 | var parentJson = this.Parent.Serialize(); | ||
92 | jsonObject.Add("parent", parentJson); | ||
93 | } | ||
94 | |||
95 | return jsonObject; | ||
96 | } | ||
97 | |||
65 | /// <summary> | 98 | /// <summary> |
66 | /// Creates a source line number from an encoded string. | 99 | /// Creates a source line number from an encoded string. |
67 | /// </summary> | 100 | /// </summary> |
diff --git a/src/WixToolset.Data/Tuples/WixFileTuple.cs b/src/WixToolset.Data/Tuples/WixFileTuple.cs index 5ffc5d7f..88dc4c82 100644 --- a/src/WixToolset.Data/Tuples/WixFileTuple.cs +++ b/src/WixToolset.Data/Tuples/WixFileTuple.cs | |||
@@ -133,7 +133,7 @@ namespace WixToolset.Data.Tuples | |||
133 | 133 | ||
134 | public string Source | 134 | public string Source |
135 | { | 135 | { |
136 | get => (string)this.Fields[(int)WixFileTupleFields.Source]?.Value; | 136 | get => this.Fields[(int)WixFileTupleFields.Source].AsPath()?.Path; |
137 | set => this.Set((int)WixFileTupleFields.Source, value); | 137 | set => this.Set((int)WixFileTupleFields.Source, value); |
138 | } | 138 | } |
139 | 139 | ||
diff --git a/src/WixToolset.Data/Tuples/WixMergeTuple.cs b/src/WixToolset.Data/Tuples/WixMergeTuple.cs index 602acc0e..8f44e6a4 100644 --- a/src/WixToolset.Data/Tuples/WixMergeTuple.cs +++ b/src/WixToolset.Data/Tuples/WixMergeTuple.cs | |||
@@ -15,7 +15,7 @@ namespace WixToolset.Data | |||
15 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Directory_), IntermediateFieldType.String), | 15 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Directory_), IntermediateFieldType.String), |
16 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.SourceFile), IntermediateFieldType.Path), | 16 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.SourceFile), IntermediateFieldType.Path), |
17 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.DiskId), IntermediateFieldType.Number), | 17 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.DiskId), IntermediateFieldType.Number), |
18 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FileCompression), IntermediateFieldType.Number), | 18 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.FileCompression), IntermediateFieldType.Bool), |
19 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.ConfigurationData), IntermediateFieldType.String), | 19 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.ConfigurationData), IntermediateFieldType.String), |
20 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Feature_), IntermediateFieldType.String), | 20 | new IntermediateFieldDefinition(nameof(WixMergeTupleFields.Feature_), IntermediateFieldType.String), |
21 | }, | 21 | }, |
@@ -79,9 +79,9 @@ namespace WixToolset.Data.Tuples | |||
79 | set => this.Set((int)WixMergeTupleFields.DiskId, value); | 79 | set => this.Set((int)WixMergeTupleFields.DiskId, value); |
80 | } | 80 | } |
81 | 81 | ||
82 | public int FileCompression | 82 | public bool? FileCompression |
83 | { | 83 | { |
84 | get => (int)this.Fields[(int)WixMergeTupleFields.FileCompression]?.Value; | 84 | get => (bool?)this.Fields[(int)WixMergeTupleFields.FileCompression]?.Value; |
85 | set => this.Set((int)WixMergeTupleFields.FileCompression, value); | 85 | set => this.Set((int)WixMergeTupleFields.FileCompression, value); |
86 | } | 86 | } |
87 | 87 | ||
diff --git a/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs index 81b9573d..f589a9fc 100644 --- a/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs +++ b/src/WixToolset.Data/Tuples/WixPatchIdTuple.cs | |||
@@ -12,7 +12,7 @@ namespace WixToolset.Data | |||
12 | { | 12 | { |
13 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ProductCode), IntermediateFieldType.String), | 13 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ProductCode), IntermediateFieldType.String), |
14 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ClientPatchId), IntermediateFieldType.String), | 14 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ClientPatchId), IntermediateFieldType.String), |
15 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Number), | 15 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles), IntermediateFieldType.Bool), |
16 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), | 16 | new IntermediateFieldDefinition(nameof(WixPatchIdTupleFields.ApiPatchingSymbolFlags), IntermediateFieldType.Number), |
17 | }, | 17 | }, |
18 | typeof(WixPatchIdTuple)); | 18 | typeof(WixPatchIdTuple)); |
@@ -53,9 +53,9 @@ namespace WixToolset.Data.Tuples | |||
53 | set => this.Set((int)WixPatchIdTupleFields.ClientPatchId, value); | 53 | set => this.Set((int)WixPatchIdTupleFields.ClientPatchId, value); |
54 | } | 54 | } |
55 | 55 | ||
56 | public int OptimizePatchSizeForLargeFiles | 56 | public bool OptimizePatchSizeForLargeFiles |
57 | { | 57 | { |
58 | get => (int)this.Fields[(int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles]?.Value; | 58 | get => (bool)this.Fields[(int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles]?.Value; |
59 | set => this.Set((int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles, value); | 59 | set => this.Set((int)WixPatchIdTupleFields.OptimizePatchSizeForLargeFiles, value); |
60 | } | 60 | } |
61 | 61 | ||
diff --git a/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs b/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs index ad8b443e..11131f2e 100644 --- a/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs +++ b/src/WixToolset.Data/Tuples/WixSuppressActionTuple.cs | |||
@@ -19,6 +19,8 @@ namespace WixToolset.Data | |||
19 | 19 | ||
20 | namespace WixToolset.Data.Tuples | 20 | namespace WixToolset.Data.Tuples |
21 | { | 21 | { |
22 | using System; | ||
23 | |||
22 | public enum WixSuppressActionTupleFields | 24 | public enum WixSuppressActionTupleFields |
23 | { | 25 | { |
24 | SequenceTable, | 26 | SequenceTable, |
@@ -37,10 +39,10 @@ namespace WixToolset.Data.Tuples | |||
37 | 39 | ||
38 | public IntermediateField this[WixSuppressActionTupleFields index] => this.Fields[(int)index]; | 40 | public IntermediateField this[WixSuppressActionTupleFields index] => this.Fields[(int)index]; |
39 | 41 | ||
40 | public string SequenceTable | 42 | public SequenceTable SequenceTable |
41 | { | 43 | { |
42 | get => (string)this.Fields[(int)WixSuppressActionTupleFields.SequenceTable]?.Value; | 44 | get => (SequenceTable)Enum.Parse(typeof(SequenceTable), (string)this.Fields[(int)WixSuppressActionTupleFields.SequenceTable]?.Value); |
43 | set => this.Set((int)WixSuppressActionTupleFields.SequenceTable, value); | 45 | set => this.Set((int)WixSuppressActionTupleFields.SequenceTable, value.ToString()); |
44 | } | 46 | } |
45 | 47 | ||
46 | public string Action | 48 | public string Action |
diff --git a/src/WixToolset.Data/WindowsInstallerStandard.cs b/src/WixToolset.Data/WindowsInstallerStandard.cs new file mode 100644 index 00000000..b8d24b62 --- /dev/null +++ b/src/WixToolset.Data/WindowsInstallerStandard.cs | |||
@@ -0,0 +1,506 @@ | |||
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.Data | ||
4 | { | ||
5 | using System.Collections.Generic; | ||
6 | using WixToolset.Data.Tuples; | ||
7 | |||
8 | public class WindowsInstallerStandard | ||
9 | { | ||
10 | private static readonly HashSet<string> standardActionNames = new HashSet<string> | ||
11 | { | ||
12 | "AllocateRegistrySpace", | ||
13 | "AppSearch", | ||
14 | "BindImage", | ||
15 | "CCPSearch", | ||
16 | "CostFinalize", | ||
17 | "CostInitialize", | ||
18 | "CreateFolders", | ||
19 | "CreateShortcuts", | ||
20 | "DeleteServices", | ||
21 | "DisableRollback", | ||
22 | "DuplicateFiles", | ||
23 | "ExecuteAction", | ||
24 | "FileCost", | ||
25 | "FindRelatedProducts", | ||
26 | "ForceReboot", | ||
27 | "InstallAdminPackage", | ||
28 | "InstallExecute", | ||
29 | "InstallExecuteAgain", | ||
30 | "InstallFiles", | ||
31 | "InstallFinalize", | ||
32 | "InstallInitialize", | ||
33 | "InstallODBC", | ||
34 | "InstallServices", | ||
35 | "InstallSFPCatalogFile", | ||
36 | "InstallValidate", | ||
37 | "IsolateComponents", | ||
38 | "LaunchConditions", | ||
39 | "MigrateFeatureStates", | ||
40 | "MoveFiles", | ||
41 | "MsiConfigureServices", | ||
42 | "MsiPublishAssemblies", | ||
43 | "MsiUnpublishAssemblies", | ||
44 | "PatchFiles", | ||
45 | "ProcessComponents", | ||
46 | "PublishComponents", | ||
47 | "PublishFeatures", | ||
48 | "PublishProduct", | ||
49 | "RegisterClassInfo", | ||
50 | "RegisterComPlus", | ||
51 | "RegisterExtensionInfo", | ||
52 | "RegisterFonts", | ||
53 | "RegisterMIMEInfo", | ||
54 | "RegisterProduct", | ||
55 | "RegisterProgIdInfo", | ||
56 | "RegisterTypeLibraries", | ||
57 | "RegisterUser", | ||
58 | "RemoveDuplicateFiles", | ||
59 | "RemoveEnvironmentStrings", | ||
60 | "RemoveExistingProducts", | ||
61 | "RemoveFiles", | ||
62 | "RemoveFolders", | ||
63 | "RemoveIniValues", | ||
64 | "RemoveODBC", | ||
65 | "RemoveRegistryValues", | ||
66 | "RemoveShortcuts", | ||
67 | "ResolveSource", | ||
68 | "RMCCPSearch", | ||
69 | "ScheduleReboot", | ||
70 | "SelfRegModules", | ||
71 | "SelfUnregModules", | ||
72 | "SetODBCFolders", | ||
73 | "StartServices", | ||
74 | "StopServices", | ||
75 | "UnpublishComponents", | ||
76 | "UnpublishFeatures", | ||
77 | "UnregisterClassInfo", | ||
78 | "UnregisterComPlus", | ||
79 | "UnregisterExtensionInfo", | ||
80 | "UnregisterFonts", | ||
81 | "UnregisterMIMEInfo", | ||
82 | "UnregisterProgIdInfo", | ||
83 | "UnregisterTypeLibraries", | ||
84 | "ValidateProductID", | ||
85 | "WriteEnvironmentStrings", | ||
86 | "WriteIniValues", | ||
87 | "WriteRegistryValues", | ||
88 | }; | ||
89 | |||
90 | private static readonly WixActionTuple[] standardActions = new[] | ||
91 | { | ||
92 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
93 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
94 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallInitialize", AccessModifier.Public)) { Action="InstallInitialize", Sequence=1500, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
95 | |||
96 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecute", AccessModifier.Public)) { Action="InstallExecute", Sequence=6500, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, | ||
97 | |||
98 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallExecuteAgain", AccessModifier.Public)) { Action="InstallExecuteAgain", Sequence=6550, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, | ||
99 | |||
100 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
101 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
102 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallFinalize", AccessModifier.Public)) { Action="InstallFinalize", Sequence=6600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
103 | |||
104 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallFiles", AccessModifier.Public)) { Action="InstallFiles", Sequence=4000, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
105 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallFiles", AccessModifier.Public)) { Action="InstallFiles", Sequence=4000, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
106 | |||
107 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallAdminPackage", AccessModifier.Public)) { Action="InstallAdminPackage", Sequence=3900, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
108 | |||
109 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
110 | new WixActionTuple(null, new Identifier("AdminUISequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.AdminUISequence }, | ||
111 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
112 | new WixActionTuple(null, new Identifier("InstallUISequence/FileCost", AccessModifier.Public)) { Action="FileCost", Sequence=900, SequenceTable=SequenceTable.InstallUISequence }, | ||
113 | |||
114 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
115 | new WixActionTuple(null, new Identifier("AdminUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdminUISequence }, | ||
116 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
117 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
118 | new WixActionTuple(null, new Identifier("InstallUISequence/CostInitialize", AccessModifier.Public)) { Action="CostInitialize", Sequence=800, SequenceTable=SequenceTable.InstallUISequence }, | ||
119 | |||
120 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
121 | new WixActionTuple(null, new Identifier("AdminUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdminUISequence }, | ||
122 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
123 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
124 | new WixActionTuple(null, new Identifier("InstallUISequence/CostFinalize", AccessModifier.Public)) { Action="CostFinalize", Sequence=1000, SequenceTable=SequenceTable.InstallUISequence }, | ||
125 | |||
126 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
127 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
128 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallValidate", AccessModifier.Public)) { Action="InstallValidate", Sequence=1400, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
129 | |||
130 | new WixActionTuple(null, new Identifier("AdminUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.AdminUISequence }, | ||
131 | new WixActionTuple(null, new Identifier("InstallUISequence/ExecuteAction", AccessModifier.Public)) { Action="ExecuteAction", Sequence=1300, SequenceTable=SequenceTable.InstallUISequence }, | ||
132 | |||
133 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
134 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/CreateShortcuts", AccessModifier.Public)) { Action="CreateShortcuts", Sequence=4500, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
135 | |||
136 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
137 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiPublishAssemblies", AccessModifier.Public)) { Action="MsiPublishAssemblies", Sequence=6250, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
138 | |||
139 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishComponents", AccessModifier.Public)) { Action="PublishComponents", Sequence=6200, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
140 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishComponents", AccessModifier.Public)) { Action="PublishComponents", Sequence=6200, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
141 | |||
142 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishFeatures", AccessModifier.Public)) { Action="PublishFeatures", Sequence=6300, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
143 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishFeatures", AccessModifier.Public)) { Action="PublishFeatures", Sequence=6300, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
144 | |||
145 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/PublishProduct", AccessModifier.Public)) { Action="PublishProduct", Sequence=6400, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
146 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/PublishProduct", AccessModifier.Public)) { Action="PublishProduct", Sequence=6400, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
147 | |||
148 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterClassInfo", AccessModifier.Public)) { Action="RegisterClassInfo", Sequence=4600, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
149 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterClassInfo", AccessModifier.Public)) { Action="RegisterClassInfo", Sequence=4600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
150 | |||
151 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterExtensionInfo", AccessModifier.Public)) { Action="RegisterExtensionInfo", Sequence=4700, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
152 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterExtensionInfo", AccessModifier.Public)) { Action="RegisterExtensionInfo", Sequence=4700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
153 | |||
154 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterMIMEInfo", AccessModifier.Public)) { Action="RegisterMIMEInfo", Sequence=4900, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
155 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterMIMEInfo", AccessModifier.Public)) { Action="RegisterMIMEInfo", Sequence=4900, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
156 | |||
157 | new WixActionTuple(null, new Identifier("AdvtExecuteSequence/RegisterProgIdInfo", AccessModifier.Public)) { Action="RegisterProgIdInfo", Sequence=4800, SequenceTable=SequenceTable.AdvtExecuteSequence }, | ||
158 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterProgIdInfo", AccessModifier.Public)) { Action="RegisterProgIdInfo", Sequence=4800, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
159 | |||
160 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/AllocateRegistrySpace", AccessModifier.Public)) { Action="AllocateRegistrySpace", Sequence=1550, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
161 | |||
162 | new WixActionTuple(null, new Identifier("InstallUISequence/AppSearch", AccessModifier.Public)) { Action="AppSearch", Sequence=50, SequenceTable=SequenceTable.InstallUISequence }, | ||
163 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/AppSearch", AccessModifier.Public)) { Action="AppSearch", Sequence=50, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
164 | |||
165 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/BindImage", AccessModifier.Public)) { Action="BindImage", Sequence=4300, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
166 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/CreateFolders", AccessModifier.Public)) { Action="CreateFolders", Sequence=3700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
167 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/DuplicateFiles", AccessModifier.Public)) { Action="DuplicateFiles", Sequence=4210, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
168 | |||
169 | new WixActionTuple(null, new Identifier("InstallUISequence/FindRelatedProducts", AccessModifier.Public)) { Action="FindRelatedProducts", Sequence=25, SequenceTable=SequenceTable.InstallUISequence }, | ||
170 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/FindRelatedProducts", AccessModifier.Public)) { Action="FindRelatedProducts", Sequence=25, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
171 | |||
172 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallODBC", AccessModifier.Public)) { Action="InstallODBC", Sequence=5400, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
173 | |||
174 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/InstallServices", AccessModifier.Public)) { Action="InstallServices", Sequence=5800, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" }, | ||
175 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiConfigureServices", AccessModifier.Public)) { Action="MsiConfigureServices", Sequence=5850, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT>=600" }, | ||
176 | |||
177 | new WixActionTuple(null, new Identifier("InstallUISequence/IsolateComponents", AccessModifier.Public)) { Action="IsolateComponents", Sequence=950, SequenceTable=SequenceTable.InstallUISequence }, | ||
178 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/IsolateComponents", AccessModifier.Public)) { Action="IsolateComponents", Sequence=950, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
179 | |||
180 | new WixActionTuple(null, new Identifier("AdminUISequence/LaunchConditions", AccessModifier.Public)) { Action="LaunchConditions", Sequence=100, SequenceTable=SequenceTable.AdminUISequence }, | ||
181 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/LaunchConditions", AccessModifier.Public)) { Action="LaunchConditions", Sequence=100, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
182 | new WixActionTuple(null, new Identifier("InstallUISequence/LaunchConditions", AccessModifier.Public)) { Action="LaunchConditions", Sequence=100, SequenceTable=SequenceTable.InstallUISequence }, | ||
183 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/LaunchConditions", AccessModifier.Public)) { Action="LaunchConditions", Sequence=100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
184 | |||
185 | new WixActionTuple(null, new Identifier("InstallUISequence/MigrateFeatureStates", AccessModifier.Public)) { Action="MigrateFeatureStates", Sequence=1200, SequenceTable=SequenceTable.InstallUISequence }, | ||
186 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/MigrateFeatureStates", AccessModifier.Public)) { Action="MigrateFeatureStates", Sequence=1200, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
187 | |||
188 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/MoveFiles", AccessModifier.Public)) { Action="MoveFiles", Sequence=3800, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
189 | |||
190 | new WixActionTuple(null, new Identifier("AdminExecuteSequence/PatchFiles", AccessModifier.Public)) { Action="PatchFiles", Sequence=4090, SequenceTable=SequenceTable.AdminExecuteSequence }, | ||
191 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/PatchFiles", AccessModifier.Public)) { Action="PatchFiles", Sequence=4090, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
192 | |||
193 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/ProcessComponents", AccessModifier.Public)) { Action="ProcessComponents", Sequence=1600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
194 | |||
195 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterComPlus", AccessModifier.Public)) { Action="RegisterComPlus", Sequence=5700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
196 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterFonts", AccessModifier.Public)) { Action="RegisterFonts", Sequence=5300, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
197 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterProduct", AccessModifier.Public)) { Action="RegisterProduct", Sequence=6100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
198 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterTypeLibraries", AccessModifier.Public)) { Action="RegisterTypeLibraries", Sequence=5500, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
199 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RegisterUser", AccessModifier.Public)) { Action="RegisterUser", Sequence=6000, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
200 | |||
201 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveDuplicateFiles", AccessModifier.Public)) { Action="RemoveDuplicateFiles", Sequence=3400, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
202 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveEnvironmentStrings", AccessModifier.Public)) { Action="RemoveEnvironmentStrings", Sequence=3300, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
203 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveFiles", AccessModifier.Public)) { Action="RemoveFiles", Sequence=3500, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
204 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveFolders", AccessModifier.Public)) { Action="RemoveFolders", Sequence=3600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
205 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveIniValues", AccessModifier.Public)) { Action="RemoveIniValues", Sequence=3100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
206 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveODBC", AccessModifier.Public)) { Action="RemoveODBC", Sequence=2400, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
207 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveRegistryValues", AccessModifier.Public)) { Action="RemoveRegistryValues", Sequence=2600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
208 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RemoveShortcuts", AccessModifier.Public)) { Action="RemoveShortcuts", Sequence=3200, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
209 | |||
210 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/SelfRegModules", AccessModifier.Public)) { Action="SelfRegModules", Sequence=5600, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
211 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/SelfUnregModules", AccessModifier.Public)) { Action="SelfUnregModules", Sequence=2200, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
212 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/SetODBCFolders", AccessModifier.Public)) { Action="SetODBCFolders", Sequence=1100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
213 | |||
214 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/CCPSearch", AccessModifier.Public)) { Action="CCPSearch", Sequence=500, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, | ||
215 | new WixActionTuple(null, new Identifier("InstallUISequence/CCPSearch", AccessModifier.Public)) { Action="CCPSearch", Sequence=500, SequenceTable=SequenceTable.InstallUISequence, Condition="NOT Installed" }, | ||
216 | |||
217 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/DeleteServices", AccessModifier.Public)) { Action="DeleteServices", Sequence=2000, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" }, | ||
218 | |||
219 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/RMCCPSearch", AccessModifier.Public)) { Action="RMCCPSearch", Sequence=600, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="NOT Installed" }, | ||
220 | new WixActionTuple(null, new Identifier("InstallUISequence/RMCCPSearch", AccessModifier.Public)) { Action="RMCCPSearch", Sequence=600, SequenceTable=SequenceTable.InstallUISequence, Condition="NOT Installed" }, | ||
221 | |||
222 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/StartServices", AccessModifier.Public)) { Action="StartServices", Sequence=5900, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" }, | ||
223 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/StopServices", AccessModifier.Public)) { Action="StopServices", Sequence=1900, SequenceTable=SequenceTable.InstallExecuteSequence, Condition="VersionNT" }, | ||
224 | |||
225 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/MsiUnpublishAssemblies", AccessModifier.Public)) { Action="MsiUnpublishAssemblies", Sequence=1750, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
226 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnpublishComponents", AccessModifier.Public)) { Action="UnpublishComponents", Sequence=1700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
227 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnpublishFeatures", AccessModifier.Public)) { Action="UnpublishFeatures", Sequence=1800, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
228 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterClassInfo", AccessModifier.Public)) { Action="UnregisterClassInfo", Sequence=2700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
229 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterComPlus", AccessModifier.Public)) { Action="UnregisterComPlus", Sequence=2100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
230 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterExtensionInfo", AccessModifier.Public)) { Action="UnregisterExtensionInfo", Sequence=2800, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
231 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterFonts", AccessModifier.Public)) { Action="UnregisterFonts", Sequence=2500, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
232 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterMIMEInfo", AccessModifier.Public)) { Action="UnregisterMIMEInfo", Sequence=3000, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
233 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterProgIdInfo", AccessModifier.Public)) { Action="UnregisterProgIdInfo", Sequence=2900, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
234 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/UnregisterTypeLibraries", AccessModifier.Public)) { Action="UnregisterTypeLibraries", Sequence=2300, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
235 | |||
236 | new WixActionTuple(null, new Identifier("InstallUISequence/ValidateProductID", AccessModifier.Public)) { Action="ValidateProductID", Sequence=700, SequenceTable=SequenceTable.InstallUISequence }, | ||
237 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/ValidateProductID", AccessModifier.Public)) { Action="ValidateProductID", Sequence=700, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
238 | |||
239 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteEnvironmentStrings", AccessModifier.Public)) { Action="WriteEnvironmentStrings", Sequence=5200, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
240 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteIniValues", AccessModifier.Public)) { Action="WriteIniValues", Sequence=5100, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
241 | new WixActionTuple(null, new Identifier("InstallExecuteSequence/WriteRegistryValues", AccessModifier.Public)) { Action="WriteRegistryValues", Sequence=5000, SequenceTable=SequenceTable.InstallExecuteSequence }, | ||
242 | }; | ||
243 | |||
244 | private static readonly HashSet<string> standardDirectories = new HashSet<string> | ||
245 | { | ||
246 | "TARGETDIR", | ||
247 | "AdminToolsFolder", | ||
248 | "AppDataFolder", | ||
249 | "CommonAppDataFolder", | ||
250 | "CommonFilesFolder", | ||
251 | "DesktopFolder", | ||
252 | "FavoritesFolder", | ||
253 | "FontsFolder", | ||
254 | "LocalAppDataFolder", | ||
255 | "MyPicturesFolder", | ||
256 | "PersonalFolder", | ||
257 | "ProgramFilesFolder", | ||
258 | "ProgramMenuFolder", | ||
259 | "SendToFolder", | ||
260 | "StartMenuFolder", | ||
261 | "StartupFolder", | ||
262 | "System16Folder", | ||
263 | "SystemFolder", | ||
264 | "TempFolder", | ||
265 | "TemplateFolder", | ||
266 | "WindowsFolder", | ||
267 | "CommonFiles64Folder", | ||
268 | "ProgramFiles64Folder", | ||
269 | "System64Folder", | ||
270 | "NetHoodFolder", | ||
271 | "PrintHoodFolder", | ||
272 | "RecentFolder", | ||
273 | "WindowsVolume", | ||
274 | }; | ||
275 | |||
276 | /// <summary> | ||
277 | /// References: | ||
278 | /// Title: Property Reference [Windows Installer]: | ||
279 | /// URL: http://msdn.microsoft.com/library/en-us/msi/setup/property_reference.asp | ||
280 | /// </summary> | ||
281 | private static readonly HashSet<string> standardProperties = new HashSet<string> | ||
282 | { | ||
283 | "~", // REG_MULTI_SZ/NULL marker | ||
284 | "ACTION", | ||
285 | "ADDDEFAULT", | ||
286 | "ADDLOCAL", | ||
287 | "ADDDSOURCE", | ||
288 | "AdminProperties", | ||
289 | "AdminUser", | ||
290 | "ADVERTISE", | ||
291 | "AFTERREBOOT", | ||
292 | "AllowProductCodeMismatches", | ||
293 | "AllowProductVersionMajorMismatches", | ||
294 | "ALLUSERS", | ||
295 | "Alpha", | ||
296 | "ApiPatchingSymbolFlags", | ||
297 | "ARPAUTHORIZEDCDFPREFIX", | ||
298 | "ARPCOMMENTS", | ||
299 | "ARPCONTACT", | ||
300 | "ARPHELPLINK", | ||
301 | "ARPHELPTELEPHONE", | ||
302 | "ARPINSTALLLOCATION", | ||
303 | "ARPNOMODIFY", | ||
304 | "ARPNOREMOVE", | ||
305 | "ARPNOREPAIR", | ||
306 | "ARPPRODUCTIONICON", | ||
307 | "ARPREADME", | ||
308 | "ARPSIZE", | ||
309 | "ARPSYSTEMCOMPONENT", | ||
310 | "ARPULRINFOABOUT", | ||
311 | "ARPURLUPDATEINFO", | ||
312 | "AVAILABLEFREEREG", | ||
313 | "BorderSize", | ||
314 | "BorderTop", | ||
315 | "CaptionHeight", | ||
316 | "CCP_DRIVE", | ||
317 | "ColorBits", | ||
318 | "COMPADDLOCAL", | ||
319 | "COMPADDSOURCE", | ||
320 | "COMPANYNAME", | ||
321 | "ComputerName", | ||
322 | "CostingComplete", | ||
323 | "Date", | ||
324 | "DefaultUIFont", | ||
325 | "DISABLEADVTSHORTCUTS", | ||
326 | "DISABLEMEDIA", | ||
327 | "DISABLEROLLBACK", | ||
328 | "DiskPrompt", | ||
329 | "DontRemoveTempFolderWhenFinished", | ||
330 | "EnableUserControl", | ||
331 | "EXECUTEACTION", | ||
332 | "EXECUTEMODE", | ||
333 | "FASTOEM", | ||
334 | "FILEADDDEFAULT", | ||
335 | "FILEADDLOCAL", | ||
336 | "FILEADDSOURCE", | ||
337 | "IncludeWholeFilesOnly", | ||
338 | "Installed", | ||
339 | "INSTALLLEVEL", | ||
340 | "Intel", | ||
341 | "Intel64", | ||
342 | "IsAdminPackage", | ||
343 | "LeftUnit", | ||
344 | "LIMITUI", | ||
345 | "ListOfPatchGUIDsToReplace", | ||
346 | "ListOfTargetProductCode", | ||
347 | "LOGACTION", | ||
348 | "LogonUser", | ||
349 | "Manufacturer", | ||
350 | "MEDIAPACKAGEPATH", | ||
351 | "MediaSourceDir", | ||
352 | "MinimumRequiredMsiVersion", | ||
353 | "MsiAMD64", | ||
354 | "MSIAPRSETTINGSIDENTIFIER", | ||
355 | "MSICHECKCRCS", | ||
356 | "MSIDISABLERMRESTART", | ||
357 | "MSIENFORCEUPGRADECOMPONENTRULES", | ||
358 | "MSIFASTINSTALL", | ||
359 | "MsiFileToUseToCreatePatchTables", | ||
360 | "MsiHiddenProperties", | ||
361 | "MSIINSTALLPERUSER", | ||
362 | "MSIINSTANCEGUID", | ||
363 | "MsiLogFileLocation", | ||
364 | "MsiLogging", | ||
365 | "MsiNetAssemblySupport", | ||
366 | "MSINEWINSTANCE", | ||
367 | "MSINODISABLEMEDIA", | ||
368 | "MsiNTProductType", | ||
369 | "MsiNTSuiteBackOffice", | ||
370 | "MsiNTSuiteDataCenter", | ||
371 | "MsiNTSuiteEnterprise", | ||
372 | "MsiNTSuiteSmallBusiness", | ||
373 | "MsiNTSuiteSmallBusinessRestricted", | ||
374 | "MsiNTSuiteWebServer", | ||
375 | "MsiNTSuitePersonal", | ||
376 | "MsiPatchRemovalList", | ||
377 | "MSIPATCHREMOVE", | ||
378 | "MSIRESTARTMANAGERCONTROL", | ||
379 | "MsiRestartManagerSessionKey", | ||
380 | "MSIRMSHUTDOWN", | ||
381 | "MsiRunningElevated", | ||
382 | "MsiUIHideCancel", | ||
383 | "MsiUIProgressOnly", | ||
384 | "MsiUISourceResOnly", | ||
385 | "MsiSystemRebootPending", | ||
386 | "MsiWin32AssemblySupport", | ||
387 | "NOCOMPANYNAME", | ||
388 | "NOUSERNAME", | ||
389 | "OLEAdvtSupport", | ||
390 | "OptimizePatchSizeForLargeFiles", | ||
391 | "OriginalDatabase", | ||
392 | "OutOfDiskSpace", | ||
393 | "OutOfNoRbDiskSpace", | ||
394 | "ParentOriginalDatabase", | ||
395 | "ParentProductCode", | ||
396 | "PATCH", | ||
397 | "PATCH_CACHE_DIR", | ||
398 | "PATCH_CACHE_ENABLED", | ||
399 | "PatchGUID", | ||
400 | "PATCHNEWPACKAGECODE", | ||
401 | "PATCHNEWSUMMARYCOMMENTS", | ||
402 | "PATCHNEWSUMMARYSUBJECT", | ||
403 | "PatchOutputPath", | ||
404 | "PatchSourceList", | ||
405 | "PhysicalMemory", | ||
406 | "PIDKEY", | ||
407 | "PIDTemplate", | ||
408 | "Preselected", | ||
409 | "PRIMARYFOLDER", | ||
410 | "PrimaryVolumePath", | ||
411 | "PrimaryVolumeSpaceAvailable", | ||
412 | "PrimaryVolumeSpaceRemaining", | ||
413 | "PrimaryVolumeSpaceRequired", | ||
414 | "Privileged", | ||
415 | "ProductCode", | ||
416 | "ProductID", | ||
417 | "ProductLanguage", | ||
418 | "ProductName", | ||
419 | "ProductState", | ||
420 | "ProductVersion", | ||
421 | "PROMPTROLLBACKCOST", | ||
422 | "REBOOT", | ||
423 | "REBOOTPROMPT", | ||
424 | "RedirectedDllSupport", | ||
425 | "REINSTALL", | ||
426 | "REINSTALLMODE", | ||
427 | "RemoveAdminTS", | ||
428 | "REMOVE", | ||
429 | "ReplacedInUseFiles", | ||
430 | "RestrictedUserControl", | ||
431 | "RESUME", | ||
432 | "RollbackDisabled", | ||
433 | "ROOTDRIVE", | ||
434 | "ScreenX", | ||
435 | "ScreenY", | ||
436 | "SecureCustomProperties", | ||
437 | "ServicePackLevel", | ||
438 | "ServicePackLevelMinor", | ||
439 | "SEQUENCE", | ||
440 | "SharedWindows", | ||
441 | "ShellAdvtSupport", | ||
442 | "SHORTFILENAMES", | ||
443 | "SourceDir", | ||
444 | "SOURCELIST", | ||
445 | "SystemLanguageID", | ||
446 | "TARGETDIR", | ||
447 | "TerminalServer", | ||
448 | "TextHeight", | ||
449 | "Time", | ||
450 | "TRANSFORMS", | ||
451 | "TRANSFORMSATSOURCE", | ||
452 | "TRANSFORMSSECURE", | ||
453 | "TTCSupport", | ||
454 | "UILevel", | ||
455 | "UpdateStarted", | ||
456 | "UpgradeCode", | ||
457 | "UPGRADINGPRODUCTCODE", | ||
458 | "UserLanguageID", | ||
459 | "USERNAME", | ||
460 | "UserSID", | ||
461 | "Version9X", | ||
462 | "VersionDatabase", | ||
463 | "VersionMsi", | ||
464 | "VersionNT", | ||
465 | "VersionNT64", | ||
466 | "VirtualMemory", | ||
467 | "WindowsBuild", | ||
468 | "WindowsVolume", | ||
469 | }; | ||
470 | |||
471 | /// <summary> | ||
472 | /// Find out if an action is a standard action. | ||
473 | /// </summary> | ||
474 | /// <param name="actionName">Name of the action.</param> | ||
475 | /// <returns>true if the action is standard, false otherwise.</returns> | ||
476 | public static bool IsStandardAction(string actionName) | ||
477 | { | ||
478 | return standardActionNames.Contains(actionName); | ||
479 | } | ||
480 | |||
481 | /// <summary> | ||
482 | /// Array of standard actions. | ||
483 | /// </summary> | ||
484 | public static WixActionTuple[] StandardActions() => standardActions; | ||
485 | |||
486 | /// <summary> | ||
487 | /// Find out if a directory is a standard directory. | ||
488 | /// </summary> | ||
489 | /// <param name="directoryName">Name of the directory.</param> | ||
490 | /// <returns>true if the directory is standard, false otherwise.</returns> | ||
491 | public static bool IsStandardDirectory(string directoryName) | ||
492 | { | ||
493 | return standardDirectories.Contains(directoryName); | ||
494 | } | ||
495 | |||
496 | /// <summary> | ||
497 | /// Find out if a property is a standard property. | ||
498 | /// </summary> | ||
499 | /// <param name="propertyName">Name of the property.</param> | ||
500 | /// <returns>true if a property is standard, false otherwise.</returns> | ||
501 | public static bool IsStandardProperty(string propertyName) | ||
502 | { | ||
503 | return standardProperties.Contains(propertyName); | ||
504 | } | ||
505 | } | ||
506 | } | ||