diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs | 30 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpFileToNamespaceTuple.cs | 55 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpFileTuple.cs | 95 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpFilterToNamespaceTuple.cs | 55 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpFilterTuple.cs | 55 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpNamespaceTuple.cs | 63 | ||||
| -rw-r--r-- | src/wixext/Tuples/HelpPluginTuple.cs | 79 | ||||
| -rw-r--r-- | src/wixext/Tuples/VSTupleDefinitions.cs | 59 | ||||
| -rw-r--r-- | src/wixext/VSCompiler.cs | 305 | ||||
| -rw-r--r-- | src/wixext/VSExtensionData.cs | 12 | ||||
| -rw-r--r-- | src/wixext/VSTableDefinitions.cs | 147 | ||||
| -rw-r--r-- | src/wixext/VSWindowsInstallerBackendBinderExtension.cs | 4 |
12 files changed, 755 insertions, 204 deletions
diff --git a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs index a980071e..b8800cee 100644 --- a/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs +++ b/src/test/WixToolsetTest.VisualStudio/VisualStudioExtensionFixture.cs | |||
| @@ -19,21 +19,21 @@ namespace WixToolsetTest.VisualStudio | |||
| 19 | var results = build.BuildAndQuery(Build, "CustomAction"); | 19 | var results = build.BuildAndQuery(Build, "CustomAction"); |
| 20 | Assert.Equal(new[] | 20 | Assert.Equal(new[] |
| 21 | { | 21 | { |
| 22 | "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t0", | 22 | "CustomAction:SetVS2010Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2010_VSIX_INSTALLER_PATH]\t", |
| 23 | "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t0", | 23 | "CustomAction:SetVS2012Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2012_VSIX_INSTALLER_PATH]\t", |
| 24 | "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t0", | 24 | "CustomAction:SetVS2013Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2013_VSIX_INSTALLER_PATH]\t", |
| 25 | "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t0", | 25 | "CustomAction:SetVS2015Vsix\t51\tVS_VSIX_INSTALLER_PATH\t[VS2015_VSIX_INSTALLER_PATH]\t", |
| 26 | "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t0", | 26 | "CustomAction:vimyrEjb_CFhXi3TTLayKNM2w7rvr4\t3122\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\" /admin\t", |
| 27 | "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t0", | 27 | "CustomAction:viuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1074\tVS_VSIX_INSTALLER_PATH\t/q \"[#filzi8nwT8Ta133xcfp7qSIdGdRiC0]\"\t", |
| 28 | "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", | 28 | "CustomAction:vrmyrEjb_CFhXi3TTLayKNM2w7rvr4\t3442\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", |
| 29 | "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", | 29 | "CustomAction:vruFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1394\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", |
| 30 | "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t0", | 30 | "CustomAction:VSFindInstances\t257\tVSCA\tFindInstances\t", |
| 31 | "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t0", | 31 | "CustomAction:vumyrEjb_CFhXi3TTLayKNM2w7rvr4\t3186\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\" /admin\t", |
| 32 | "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t0", | 32 | "CustomAction:vuuFqqe3R3R3Fh7P05ubFRhqQlCBdQ\t1138\tVS_VSIX_INSTALLER_PATH\t/q /u:\"ExampleVsix\"\t", |
| 33 | "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", | 33 | "CustomAction:Vwd2012VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2012_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", |
| 34 | "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", | 34 | "CustomAction:Vwd2013VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2013_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", |
| 35 | "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t0", | 35 | "CustomAction:Vwd2015VsixWhenVSAbsent\t51\tVS_VSIX_INSTALLER_PATH\t[VWD2015_VSIX_INSTALL_ROOT]\\Common7\\IDE\\VSIXInstaller.exe\t", |
| 36 | }, results.OrderBy(s => s).ToArray()); | 36 | }, results); |
| 37 | } | 37 | } |
| 38 | 38 | ||
| 39 | private static void Build(string[] args) | 39 | private static void Build(string[] args) |
diff --git a/src/wixext/Tuples/HelpFileToNamespaceTuple.cs b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs new file mode 100644 index 00000000..f91dacc1 --- /dev/null +++ b/src/wixext/Tuples/HelpFileToNamespaceTuple.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpFileToNamespace = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpFileToNamespace.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpFileRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpFileToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(HelpFileToNamespaceTuple)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.VisualStudio.Tuples | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum HelpFileToNamespaceTupleFields | ||
| 26 | { | ||
| 27 | HelpFileRef, | ||
| 28 | HelpNamespaceRef, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class HelpFileToNamespaceTuple : IntermediateTuple | ||
| 32 | { | ||
| 33 | public HelpFileToNamespaceTuple() : base(VSTupleDefinitions.HelpFileToNamespace, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public HelpFileToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFileToNamespace, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[HelpFileToNamespaceTupleFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string HelpFileRef | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpFileRef].AsString(); | ||
| 46 | set => this.Set((int)HelpFileToNamespaceTupleFields.HelpFileRef, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string HelpNamespaceRef | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)HelpFileToNamespaceTupleFields.HelpNamespaceRef].AsString(); | ||
| 52 | set => this.Set((int)HelpFileToNamespaceTupleFields.HelpNamespaceRef, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/HelpFileTuple.cs b/src/wixext/Tuples/HelpFileTuple.cs new file mode 100644 index 00000000..9ea5e8e3 --- /dev/null +++ b/src/wixext/Tuples/HelpFileTuple.cs | |||
| @@ -0,0 +1,95 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpFile = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpFile.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HelpFileName), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.LangID), IntermediateFieldType.Number), | ||
| 16 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxSFileRef), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxIFileRef), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxQFileRef), IntermediateFieldType.String), | ||
| 19 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.HxRFileRef), IntermediateFieldType.String), | ||
| 20 | new IntermediateFieldDefinition(nameof(HelpFileTupleFields.SamplesFileRef), IntermediateFieldType.String), | ||
| 21 | }, | ||
| 22 | typeof(HelpFileTuple)); | ||
| 23 | } | ||
| 24 | } | ||
| 25 | |||
| 26 | namespace WixToolset.VisualStudio.Tuples | ||
| 27 | { | ||
| 28 | using WixToolset.Data; | ||
| 29 | |||
| 30 | public enum HelpFileTupleFields | ||
| 31 | { | ||
| 32 | HelpFileName, | ||
| 33 | LangID, | ||
| 34 | HxSFileRef, | ||
| 35 | HxIFileRef, | ||
| 36 | HxQFileRef, | ||
| 37 | HxRFileRef, | ||
| 38 | SamplesFileRef, | ||
| 39 | } | ||
| 40 | |||
| 41 | public class HelpFileTuple : IntermediateTuple | ||
| 42 | { | ||
| 43 | public HelpFileTuple() : base(VSTupleDefinitions.HelpFile, null, null) | ||
| 44 | { | ||
| 45 | } | ||
| 46 | |||
| 47 | public HelpFileTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFile, sourceLineNumber, id) | ||
| 48 | { | ||
| 49 | } | ||
| 50 | |||
| 51 | public IntermediateField this[HelpFileTupleFields index] => this.Fields[(int)index]; | ||
| 52 | |||
| 53 | public string HelpFileName | ||
| 54 | { | ||
| 55 | get => this.Fields[(int)HelpFileTupleFields.HelpFileName].AsString(); | ||
| 56 | set => this.Set((int)HelpFileTupleFields.HelpFileName, value); | ||
| 57 | } | ||
| 58 | |||
| 59 | public int LangID | ||
| 60 | { | ||
| 61 | get => this.Fields[(int)HelpFileTupleFields.LangID].AsNumber(); | ||
| 62 | set => this.Set((int)HelpFileTupleFields.LangID, value); | ||
| 63 | } | ||
| 64 | |||
| 65 | public string HxSFileRef | ||
| 66 | { | ||
| 67 | get => this.Fields[(int)HelpFileTupleFields.HxSFileRef].AsString(); | ||
| 68 | set => this.Set((int)HelpFileTupleFields.HxSFileRef, value); | ||
| 69 | } | ||
| 70 | |||
| 71 | public string HxIFileRef | ||
| 72 | { | ||
| 73 | get => this.Fields[(int)HelpFileTupleFields.HxIFileRef].AsString(); | ||
| 74 | set => this.Set((int)HelpFileTupleFields.HxIFileRef, value); | ||
| 75 | } | ||
| 76 | |||
| 77 | public string HxQFileRef | ||
| 78 | { | ||
| 79 | get => this.Fields[(int)HelpFileTupleFields.HxQFileRef].AsString(); | ||
| 80 | set => this.Set((int)HelpFileTupleFields.HxQFileRef, value); | ||
| 81 | } | ||
| 82 | |||
| 83 | public string HxRFileRef | ||
| 84 | { | ||
| 85 | get => this.Fields[(int)HelpFileTupleFields.HxRFileRef].AsString(); | ||
| 86 | set => this.Set((int)HelpFileTupleFields.HxRFileRef, value); | ||
| 87 | } | ||
| 88 | |||
| 89 | public string SamplesFileRef | ||
| 90 | { | ||
| 91 | get => this.Fields[(int)HelpFileTupleFields.SamplesFileRef].AsString(); | ||
| 92 | set => this.Set((int)HelpFileTupleFields.SamplesFileRef, value); | ||
| 93 | } | ||
| 94 | } | ||
| 95 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs new file mode 100644 index 00000000..c6690d47 --- /dev/null +++ b/src/wixext/Tuples/HelpFilterToNamespaceTuple.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpFilterToNamespace = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpFilterToNamespace.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpFilterRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpFilterToNamespaceTupleFields.HelpNamespaceRef), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(HelpFilterToNamespaceTuple)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.VisualStudio.Tuples | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum HelpFilterToNamespaceTupleFields | ||
| 26 | { | ||
| 27 | HelpFilterRef, | ||
| 28 | HelpNamespaceRef, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class HelpFilterToNamespaceTuple : IntermediateTuple | ||
| 32 | { | ||
| 33 | public HelpFilterToNamespaceTuple() : base(VSTupleDefinitions.HelpFilterToNamespace, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public HelpFilterToNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilterToNamespace, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[HelpFilterToNamespaceTupleFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string HelpFilterRef | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpFilterRef].AsString(); | ||
| 46 | set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpFilterRef, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string HelpNamespaceRef | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef].AsString(); | ||
| 52 | set => this.Set((int)HelpFilterToNamespaceTupleFields.HelpNamespaceRef, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/HelpFilterTuple.cs b/src/wixext/Tuples/HelpFilterTuple.cs new file mode 100644 index 00000000..6592defa --- /dev/null +++ b/src/wixext/Tuples/HelpFilterTuple.cs | |||
| @@ -0,0 +1,55 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpFilter = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpFilter.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.Description), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpFilterTupleFields.QueryString), IntermediateFieldType.String), | ||
| 16 | }, | ||
| 17 | typeof(HelpFilterTuple)); | ||
| 18 | } | ||
| 19 | } | ||
| 20 | |||
| 21 | namespace WixToolset.VisualStudio.Tuples | ||
| 22 | { | ||
| 23 | using WixToolset.Data; | ||
| 24 | |||
| 25 | public enum HelpFilterTupleFields | ||
| 26 | { | ||
| 27 | Description, | ||
| 28 | QueryString, | ||
| 29 | } | ||
| 30 | |||
| 31 | public class HelpFilterTuple : IntermediateTuple | ||
| 32 | { | ||
| 33 | public HelpFilterTuple() : base(VSTupleDefinitions.HelpFilter, null, null) | ||
| 34 | { | ||
| 35 | } | ||
| 36 | |||
| 37 | public HelpFilterTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpFilter, sourceLineNumber, id) | ||
| 38 | { | ||
| 39 | } | ||
| 40 | |||
| 41 | public IntermediateField this[HelpFilterTupleFields index] => this.Fields[(int)index]; | ||
| 42 | |||
| 43 | public string Description | ||
| 44 | { | ||
| 45 | get => this.Fields[(int)HelpFilterTupleFields.Description].AsString(); | ||
| 46 | set => this.Set((int)HelpFilterTupleFields.Description, value); | ||
| 47 | } | ||
| 48 | |||
| 49 | public string QueryString | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)HelpFilterTupleFields.QueryString].AsString(); | ||
| 52 | set => this.Set((int)HelpFilterTupleFields.QueryString, value); | ||
| 53 | } | ||
| 54 | } | ||
| 55 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/HelpNamespaceTuple.cs b/src/wixext/Tuples/HelpNamespaceTuple.cs new file mode 100644 index 00000000..69b471fb --- /dev/null +++ b/src/wixext/Tuples/HelpNamespaceTuple.cs | |||
| @@ -0,0 +1,63 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpNamespace = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpNamespace.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.NamespaceName), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.CollectionFileRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(HelpNamespaceTupleFields.Description), IntermediateFieldType.String), | ||
| 17 | }, | ||
| 18 | typeof(HelpNamespaceTuple)); | ||
| 19 | } | ||
| 20 | } | ||
| 21 | |||
| 22 | namespace WixToolset.VisualStudio.Tuples | ||
| 23 | { | ||
| 24 | using WixToolset.Data; | ||
| 25 | |||
| 26 | public enum HelpNamespaceTupleFields | ||
| 27 | { | ||
| 28 | NamespaceName, | ||
| 29 | CollectionFileRef, | ||
| 30 | Description, | ||
| 31 | } | ||
| 32 | |||
| 33 | public class HelpNamespaceTuple : IntermediateTuple | ||
| 34 | { | ||
| 35 | public HelpNamespaceTuple() : base(VSTupleDefinitions.HelpNamespace, null, null) | ||
| 36 | { | ||
| 37 | } | ||
| 38 | |||
| 39 | public HelpNamespaceTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpNamespace, sourceLineNumber, id) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public IntermediateField this[HelpNamespaceTupleFields index] => this.Fields[(int)index]; | ||
| 44 | |||
| 45 | public string NamespaceName | ||
| 46 | { | ||
| 47 | get => this.Fields[(int)HelpNamespaceTupleFields.NamespaceName].AsString(); | ||
| 48 | set => this.Set((int)HelpNamespaceTupleFields.NamespaceName, value); | ||
| 49 | } | ||
| 50 | |||
| 51 | public string CollectionFileRef | ||
| 52 | { | ||
| 53 | get => this.Fields[(int)HelpNamespaceTupleFields.CollectionFileRef].AsString(); | ||
| 54 | set => this.Set((int)HelpNamespaceTupleFields.CollectionFileRef, value); | ||
| 55 | } | ||
| 56 | |||
| 57 | public string Description | ||
| 58 | { | ||
| 59 | get => this.Fields[(int)HelpNamespaceTupleFields.Description].AsString(); | ||
| 60 | set => this.Set((int)HelpNamespaceTupleFields.Description, value); | ||
| 61 | } | ||
| 62 | } | ||
| 63 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/HelpPluginTuple.cs b/src/wixext/Tuples/HelpPluginTuple.cs new file mode 100644 index 00000000..5f146199 --- /dev/null +++ b/src/wixext/Tuples/HelpPluginTuple.cs | |||
| @@ -0,0 +1,79 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using WixToolset.Data; | ||
| 6 | using WixToolset.VisualStudio.Tuples; | ||
| 7 | |||
| 8 | public static partial class VSTupleDefinitions | ||
| 9 | { | ||
| 10 | public static readonly IntermediateTupleDefinition HelpPlugin = new IntermediateTupleDefinition( | ||
| 11 | VSTupleDefinitionType.HelpPlugin.ToString(), | ||
| 12 | new[] | ||
| 13 | { | ||
| 14 | new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HelpNamespaceRef), IntermediateFieldType.String), | ||
| 15 | new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHelpNamespaceRef), IntermediateFieldType.String), | ||
| 16 | new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxTFileRef), IntermediateFieldType.String), | ||
| 17 | new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.HxAFileRef), IntermediateFieldType.String), | ||
| 18 | new IntermediateFieldDefinition(nameof(HelpPluginTupleFields.ParentHxTFileRef), IntermediateFieldType.String), | ||
| 19 | }, | ||
| 20 | typeof(HelpPluginTuple)); | ||
| 21 | } | ||
| 22 | } | ||
| 23 | |||
| 24 | namespace WixToolset.VisualStudio.Tuples | ||
| 25 | { | ||
| 26 | using WixToolset.Data; | ||
| 27 | |||
| 28 | public enum HelpPluginTupleFields | ||
| 29 | { | ||
| 30 | HelpNamespaceRef, | ||
| 31 | ParentHelpNamespaceRef, | ||
| 32 | HxTFileRef, | ||
| 33 | HxAFileRef, | ||
| 34 | ParentHxTFileRef, | ||
| 35 | } | ||
| 36 | |||
| 37 | public class HelpPluginTuple : IntermediateTuple | ||
| 38 | { | ||
| 39 | public HelpPluginTuple() : base(VSTupleDefinitions.HelpPlugin, null, null) | ||
| 40 | { | ||
| 41 | } | ||
| 42 | |||
| 43 | public HelpPluginTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(VSTupleDefinitions.HelpPlugin, sourceLineNumber, id) | ||
| 44 | { | ||
| 45 | } | ||
| 46 | |||
| 47 | public IntermediateField this[HelpPluginTupleFields index] => this.Fields[(int)index]; | ||
| 48 | |||
| 49 | public string HelpNamespaceRef | ||
| 50 | { | ||
| 51 | get => this.Fields[(int)HelpPluginTupleFields.HelpNamespaceRef].AsString(); | ||
| 52 | set => this.Set((int)HelpPluginTupleFields.HelpNamespaceRef, value); | ||
| 53 | } | ||
| 54 | |||
| 55 | public string ParentHelpNamespaceRef | ||
| 56 | { | ||
| 57 | get => this.Fields[(int)HelpPluginTupleFields.ParentHelpNamespaceRef].AsString(); | ||
| 58 | set => this.Set((int)HelpPluginTupleFields.ParentHelpNamespaceRef, value); | ||
| 59 | } | ||
| 60 | |||
| 61 | public string HxTFileRef | ||
| 62 | { | ||
| 63 | get => this.Fields[(int)HelpPluginTupleFields.HxTFileRef].AsString(); | ||
| 64 | set => this.Set((int)HelpPluginTupleFields.HxTFileRef, value); | ||
| 65 | } | ||
| 66 | |||
| 67 | public string HxAFileRef | ||
| 68 | { | ||
| 69 | get => this.Fields[(int)HelpPluginTupleFields.HxAFileRef].AsString(); | ||
| 70 | set => this.Set((int)HelpPluginTupleFields.HxAFileRef, value); | ||
| 71 | } | ||
| 72 | |||
| 73 | public string ParentHxTFileRef | ||
| 74 | { | ||
| 75 | get => this.Fields[(int)HelpPluginTupleFields.ParentHxTFileRef].AsString(); | ||
| 76 | set => this.Set((int)HelpPluginTupleFields.ParentHxTFileRef, value); | ||
| 77 | } | ||
| 78 | } | ||
| 79 | } \ No newline at end of file | ||
diff --git a/src/wixext/Tuples/VSTupleDefinitions.cs b/src/wixext/Tuples/VSTupleDefinitions.cs new file mode 100644 index 00000000..fadcf808 --- /dev/null +++ b/src/wixext/Tuples/VSTupleDefinitions.cs | |||
| @@ -0,0 +1,59 @@ | |||
| 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.VisualStudio | ||
| 4 | { | ||
| 5 | using System; | ||
| 6 | using WixToolset.Data; | ||
| 7 | |||
| 8 | public enum VSTupleDefinitionType | ||
| 9 | { | ||
| 10 | HelpFile, | ||
| 11 | HelpFileToNamespace, | ||
| 12 | HelpFilter, | ||
| 13 | HelpFilterToNamespace, | ||
| 14 | HelpNamespace, | ||
| 15 | HelpPlugin, | ||
| 16 | } | ||
| 17 | |||
| 18 | public static partial class VSTupleDefinitions | ||
| 19 | { | ||
| 20 | public static readonly Version Version = new Version("4.0.0"); | ||
| 21 | |||
| 22 | public static IntermediateTupleDefinition ByName(string name) | ||
| 23 | { | ||
| 24 | if (!Enum.TryParse(name, out VSTupleDefinitionType type)) | ||
| 25 | { | ||
| 26 | return null; | ||
| 27 | } | ||
| 28 | |||
| 29 | return ByType(type); | ||
| 30 | } | ||
| 31 | |||
| 32 | public static IntermediateTupleDefinition ByType(VSTupleDefinitionType type) | ||
| 33 | { | ||
| 34 | switch (type) | ||
| 35 | { | ||
| 36 | case VSTupleDefinitionType.HelpFile: | ||
| 37 | return VSTupleDefinitions.HelpFile; | ||
| 38 | |||
| 39 | case VSTupleDefinitionType.HelpFileToNamespace: | ||
| 40 | return VSTupleDefinitions.HelpFileToNamespace; | ||
| 41 | |||
| 42 | case VSTupleDefinitionType.HelpFilter: | ||
| 43 | return VSTupleDefinitions.HelpFilter; | ||
| 44 | |||
| 45 | case VSTupleDefinitionType.HelpFilterToNamespace: | ||
| 46 | return VSTupleDefinitions.HelpFilterToNamespace; | ||
| 47 | |||
| 48 | case VSTupleDefinitionType.HelpNamespace: | ||
| 49 | return VSTupleDefinitions.HelpNamespace; | ||
| 50 | |||
| 51 | case VSTupleDefinitionType.HelpPlugin: | ||
| 52 | return VSTupleDefinitions.HelpPlugin; | ||
| 53 | |||
| 54 | default: | ||
| 55 | throw new ArgumentOutOfRangeException(nameof(type)); | ||
| 56 | } | ||
| 57 | } | ||
| 58 | } | ||
| 59 | } | ||
diff --git a/src/wixext/VSCompiler.cs b/src/wixext/VSCompiler.cs index ebf7fa59..b9390fea 100644 --- a/src/wixext/VSCompiler.cs +++ b/src/wixext/VSCompiler.cs | |||
| @@ -4,10 +4,13 @@ namespace WixToolset.VisualStudio | |||
| 4 | { | 4 | { |
| 5 | using System; | 5 | using System; |
| 6 | using System.Collections.Generic; | 6 | using System.Collections.Generic; |
| 7 | using System.Globalization; | ||
| 7 | using System.Xml.Linq; | 8 | using System.Xml.Linq; |
| 8 | using WixToolset.Data; | 9 | using WixToolset.Data; |
| 10 | using WixToolset.Data.Tuples; | ||
| 9 | using WixToolset.Data.WindowsInstaller; | 11 | using WixToolset.Data.WindowsInstaller; |
| 10 | using WixToolset.Extensibility; | 12 | using WixToolset.Extensibility; |
| 13 | using WixToolset.VisualStudio.Tuples; | ||
| 11 | 14 | ||
| 12 | /// <summary> | 15 | /// <summary> |
| 13 | /// The compiler for the WiX Toolset Visual Studio Extension. | 16 | /// The compiler for the WiX Toolset Visual Studio Extension. |
| @@ -79,10 +82,10 @@ namespace WixToolset.VisualStudio | |||
| 79 | 82 | ||
| 80 | private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) | 83 | private void ParseHelpCollectionRefElement(Intermediate intermediate, IntermediateSection section, XElement element) |
| 81 | { | 84 | { |
| 82 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 85 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 83 | Identifier id = null; | 86 | Identifier id = null; |
| 84 | 87 | ||
| 85 | foreach (XAttribute attrib in element.Attributes()) | 88 | foreach (var attrib in element.Attributes()) |
| 86 | { | 89 | { |
| 87 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 90 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 88 | { | 91 | { |
| @@ -90,7 +93,7 @@ namespace WixToolset.VisualStudio | |||
| 90 | { | 93 | { |
| 91 | case "Id": | 94 | case "Id": |
| 92 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | 95 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 93 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", id.Id); | 96 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpNamespace, id.Id); |
| 94 | break; | 97 | break; |
| 95 | default: | 98 | default: |
| 96 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 99 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| @@ -108,11 +111,10 @@ namespace WixToolset.VisualStudio | |||
| 108 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | 111 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); |
| 109 | } | 112 | } |
| 110 | 113 | ||
| 111 | foreach (XElement child in element.Elements()) | 114 | foreach (var child in element.Elements()) |
| 112 | { | 115 | { |
| 113 | if (this.Namespace == child.Name.Namespace) | 116 | if (this.Namespace == child.Name.Namespace) |
| 114 | { | 117 | { |
| 115 | SourceLineNumber childSourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(child); | ||
| 116 | switch (child.Name.LocalName) | 118 | switch (child.Name.LocalName) |
| 117 | { | 119 | { |
| 118 | case "HelpFileRef": | 120 | case "HelpFileRef": |
| @@ -132,13 +134,13 @@ namespace WixToolset.VisualStudio | |||
| 132 | 134 | ||
| 133 | private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) | 135 | private void ParseHelpCollectionElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) |
| 134 | { | 136 | { |
| 135 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 137 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 136 | Identifier id = null; | 138 | Identifier id = null; |
| 137 | string description = null; | 139 | string description = null; |
| 138 | string name = null; | 140 | string name = null; |
| 139 | YesNoType suppressCAs = YesNoType.No; | 141 | var suppressCAs = YesNoType.No; |
| 140 | 142 | ||
| 141 | foreach (XAttribute attrib in element.Attributes()) | 143 | foreach (var attrib in element.Attributes()) |
| 142 | { | 144 | { |
| 143 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 145 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 144 | { | 146 | { |
| @@ -169,7 +171,7 @@ namespace WixToolset.VisualStudio | |||
| 169 | 171 | ||
| 170 | if (null == id) | 172 | if (null == id) |
| 171 | { | 173 | { |
| 172 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | 174 | id = this.ParseHelper.CreateIdentifier("vshc", fileId, description, name); |
| 173 | } | 175 | } |
| 174 | 176 | ||
| 175 | if (null == description) | 177 | if (null == description) |
| @@ -182,7 +184,7 @@ namespace WixToolset.VisualStudio | |||
| 182 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); | 184 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Name")); |
| 183 | } | 185 | } |
| 184 | 186 | ||
| 185 | foreach (XElement child in element.Elements()) | 187 | foreach (var child in element.Elements()) |
| 186 | { | 188 | { |
| 187 | if (this.Namespace == child.Name.Namespace) | 189 | if (this.Namespace == child.Name.Namespace) |
| 188 | { | 190 | { |
| @@ -210,31 +212,33 @@ namespace WixToolset.VisualStudio | |||
| 210 | 212 | ||
| 211 | if (!this.Messaging.EncounteredError) | 213 | if (!this.Messaging.EncounteredError) |
| 212 | { | 214 | { |
| 213 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpNamespace", id); | 215 | section.AddTuple(new HelpNamespaceTuple(sourceLineNumbers, id) |
| 214 | row.Set(1, name); | 216 | { |
| 215 | row.Set(2, fileId); | 217 | NamespaceName = name, |
| 216 | row.Set(3, description); | 218 | CollectionFileRef = fileId, |
| 219 | Description = description, | ||
| 220 | }); | ||
| 217 | 221 | ||
| 218 | if (YesNoType.No == suppressCAs) | 222 | if (YesNoType.No == suppressCAs) |
| 219 | { | 223 | { |
| 220 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 224 | this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); |
| 221 | } | 225 | } |
| 222 | } | 226 | } |
| 223 | } | 227 | } |
| 224 | 228 | ||
| 225 | private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) | 229 | private void ParseHelpFileElement(Intermediate intermediate, IntermediateSection section, XElement element, string fileId) |
| 226 | { | 230 | { |
| 227 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 231 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 228 | Identifier id = null; | 232 | Identifier id = null; |
| 229 | string name = null; | 233 | string name = null; |
| 230 | int language = CompilerConstants.IntegerNotSet; | 234 | var language = CompilerConstants.IntegerNotSet; |
| 231 | string hxi = null; | 235 | string hxi = null; |
| 232 | string hxq = null; | 236 | string hxq = null; |
| 233 | string hxr = null; | 237 | string hxr = null; |
| 234 | string samples = null; | 238 | string samples = null; |
| 235 | YesNoType suppressCAs = YesNoType.No; | 239 | var suppressCAs = YesNoType.No; |
| 236 | 240 | ||
| 237 | foreach (XAttribute attrib in element.Attributes()) | 241 | foreach (var attrib in element.Attributes()) |
| 238 | { | 242 | { |
| 239 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 243 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 240 | { | 244 | { |
| @@ -245,11 +249,11 @@ namespace WixToolset.VisualStudio | |||
| 245 | break; | 249 | break; |
| 246 | case "AttributeIndex": | 250 | case "AttributeIndex": |
| 247 | hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 251 | hxr = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 248 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxr); | 252 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxr); |
| 249 | break; | 253 | break; |
| 250 | case "Index": | 254 | case "Index": |
| 251 | hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 255 | hxi = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 252 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxi); | 256 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxi); |
| 253 | break; | 257 | break; |
| 254 | case "Language": | 258 | case "Language": |
| 255 | language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); | 259 | language = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, short.MaxValue); |
| @@ -259,11 +263,11 @@ namespace WixToolset.VisualStudio | |||
| 259 | break; | 263 | break; |
| 260 | case "SampleLocation": | 264 | case "SampleLocation": |
| 261 | samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 265 | samples = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 262 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", samples); | 266 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, samples); |
| 263 | break; | 267 | break; |
| 264 | case "Search": | 268 | case "Search": |
| 265 | hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); | 269 | hxq = this.ParseHelper.GetAttributeIdentifierValue(sourceLineNumbers, attrib); |
| 266 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", hxq); | 270 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, hxq); |
| 267 | break; | 271 | break; |
| 268 | case "SuppressCustomActions": | 272 | case "SuppressCustomActions": |
| 269 | suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); | 273 | suppressCAs = this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib); |
| @@ -281,7 +285,7 @@ namespace WixToolset.VisualStudio | |||
| 281 | 285 | ||
| 282 | if (null == id) | 286 | if (null == id) |
| 283 | { | 287 | { |
| 284 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | 288 | id = this.ParseHelper.CreateIdentifier("vshf", fileId, name, language.ToString(CultureInfo.InvariantCulture.NumberFormat)); |
| 285 | } | 289 | } |
| 286 | 290 | ||
| 287 | if (null == name) | 291 | if (null == name) |
| @@ -299,28 +303,30 @@ namespace WixToolset.VisualStudio | |||
| 299 | 303 | ||
| 300 | if (!this.Messaging.EncounteredError) | 304 | if (!this.Messaging.EncounteredError) |
| 301 | { | 305 | { |
| 302 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFile", id); | 306 | section.AddTuple(new HelpFileTuple(sourceLineNumbers, id) |
| 303 | row.Set(1, name); | 307 | { |
| 304 | row.Set(2, language); | 308 | HelpFileName = name, |
| 305 | row.Set(3, fileId); | 309 | LangID = language, |
| 306 | row.Set(4, hxi); | 310 | HxSFileRef = fileId, |
| 307 | row.Set(5, hxq); | 311 | HxIFileRef = hxi, |
| 308 | row.Set(6, hxr); | 312 | HxQFileRef = hxq, |
| 309 | row.Set(7, samples); | 313 | HxRFileRef = hxr, |
| 314 | SamplesFileRef = samples, | ||
| 315 | }); | ||
| 310 | 316 | ||
| 311 | if (YesNoType.No == suppressCAs) | 317 | if (YesNoType.No == suppressCAs) |
| 312 | { | 318 | { |
| 313 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 319 | this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); |
| 314 | } | 320 | } |
| 315 | } | 321 | } |
| 316 | } | 322 | } |
| 317 | 323 | ||
| 318 | private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) | 324 | private void ParseHelpFileRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) |
| 319 | { | 325 | { |
| 320 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 326 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 321 | Identifier id = null; | 327 | Identifier id = null; |
| 322 | 328 | ||
| 323 | foreach (XAttribute attrib in element.Attributes()) | 329 | foreach (var attrib in element.Attributes()) |
| 324 | { | 330 | { |
| 325 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 331 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 326 | { | 332 | { |
| @@ -328,7 +334,7 @@ namespace WixToolset.VisualStudio | |||
| 328 | { | 334 | { |
| 329 | case "Id": | 335 | case "Id": |
| 330 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | 336 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 331 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFile", id.Id); | 337 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFile, id.Id); |
| 332 | break; | 338 | break; |
| 333 | default: | 339 | default: |
| 334 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 340 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| @@ -350,20 +356,23 @@ namespace WixToolset.VisualStudio | |||
| 350 | 356 | ||
| 351 | if (!this.Messaging.EncounteredError) | 357 | if (!this.Messaging.EncounteredError) |
| 352 | { | 358 | { |
| 353 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFileToNamespace", id); | 359 | section.AddTuple(new HelpFileToNamespaceTuple(sourceLineNumbers, id) |
| 354 | row.Set(1, collectionId.Id); | 360 | { |
| 361 | HelpFileRef = id.Id, | ||
| 362 | HelpNamespaceRef = collectionId.Id, | ||
| 363 | }); | ||
| 355 | } | 364 | } |
| 356 | } | 365 | } |
| 357 | 366 | ||
| 358 | private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) | 367 | private void ParseHelpFilterElement(Intermediate intermediate, IntermediateSection section, XElement element) |
| 359 | { | 368 | { |
| 360 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 369 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 361 | Identifier id = null; | 370 | Identifier id = null; |
| 362 | string filterDefinition = null; | 371 | string filterDefinition = null; |
| 363 | string name = null; | 372 | string name = null; |
| 364 | YesNoType suppressCAs = YesNoType.No; | 373 | var suppressCAs = YesNoType.No; |
| 365 | 374 | ||
| 366 | foreach (XAttribute attrib in element.Attributes()) | 375 | foreach (var attrib in element.Attributes()) |
| 367 | { | 376 | { |
| 368 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 377 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 369 | { | 378 | { |
| @@ -394,7 +403,7 @@ namespace WixToolset.VisualStudio | |||
| 394 | 403 | ||
| 395 | if (null == id) | 404 | if (null == id) |
| 396 | { | 405 | { |
| 397 | this.Messaging.Write(ErrorMessages.ExpectedAttribute(sourceLineNumbers, element.Name.LocalName, "Id")); | 406 | id = this.ParseHelper.CreateIdentifier("hfl", name, filterDefinition); |
| 398 | } | 407 | } |
| 399 | 408 | ||
| 400 | if (null == name) | 409 | if (null == name) |
| @@ -406,23 +415,25 @@ namespace WixToolset.VisualStudio | |||
| 406 | 415 | ||
| 407 | if (!this.Messaging.EncounteredError) | 416 | if (!this.Messaging.EncounteredError) |
| 408 | { | 417 | { |
| 409 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilter", id); | 418 | section.AddTuple(new HelpFilterTuple(sourceLineNumbers, id) |
| 410 | row.Set(1, name); | 419 | { |
| 411 | row.Set(2, filterDefinition); | 420 | Description = name, |
| 421 | QueryString = filterDefinition, | ||
| 422 | }); | ||
| 412 | 423 | ||
| 413 | if (YesNoType.No == suppressCAs) | 424 | if (YesNoType.No == suppressCAs) |
| 414 | { | 425 | { |
| 415 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | 426 | this.AddReferenceToRegisterMicrosoftHelp(section, sourceLineNumbers); |
| 416 | } | 427 | } |
| 417 | } | 428 | } |
| 418 | } | 429 | } |
| 419 | 430 | ||
| 420 | private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) | 431 | private void ParseHelpFilterRefElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier collectionId) |
| 421 | { | 432 | { |
| 422 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 433 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 423 | Identifier id = null; | 434 | Identifier id = null; |
| 424 | 435 | ||
| 425 | foreach (XAttribute attrib in element.Attributes()) | 436 | foreach (var attrib in element.Attributes()) |
| 426 | { | 437 | { |
| 427 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 438 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 428 | { | 439 | { |
| @@ -430,7 +441,7 @@ namespace WixToolset.VisualStudio | |||
| 430 | { | 441 | { |
| 431 | case "Id": | 442 | case "Id": |
| 432 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); | 443 | id = this.ParseHelper.GetAttributeIdentifier(sourceLineNumbers, attrib); |
| 433 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpFilter", id.Id); | 444 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpFilter, id.Id); |
| 434 | break; | 445 | break; |
| 435 | default: | 446 | default: |
| 436 | this.ParseHelper.UnexpectedAttribute(element, attrib); | 447 | this.ParseHelper.UnexpectedAttribute(element, attrib); |
| @@ -452,24 +463,25 @@ namespace WixToolset.VisualStudio | |||
| 452 | 463 | ||
| 453 | if (!this.Messaging.EncounteredError) | 464 | if (!this.Messaging.EncounteredError) |
| 454 | { | 465 | { |
| 455 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpFilterToNamespace", id); | 466 | section.AddTuple(new HelpFilterToNamespaceTuple(sourceLineNumbers, id) |
| 456 | row.Set(1, collectionId.Id); | 467 | { |
| 468 | HelpFilterRef = id.Id, | ||
| 469 | HelpNamespaceRef = collectionId.Id, | ||
| 470 | }); | ||
| 457 | } | 471 | } |
| 458 | } | 472 | } |
| 459 | 473 | ||
| 460 | private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) | 474 | private void ParsePlugCollectionIntoElement(Intermediate intermediate, IntermediateSection section, XElement element, Identifier parentId) |
| 461 | { | 475 | { |
| 462 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 476 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 463 | string hxa = null; | 477 | string hxa = null; |
| 464 | string hxt = null; | 478 | string hxt = null; |
| 465 | string hxtParent = null; | 479 | string hxtParent = null; |
| 466 | string namespaceParent = null; | 480 | string namespaceParent = null; |
| 467 | string feature = null; | 481 | string feature = null; |
| 468 | YesNoType suppressExternalNamespaces = YesNoType.No; | 482 | var suppressExternalNamespaces = YesNoType.No; |
| 469 | bool pluginVS05 = false; | ||
| 470 | bool pluginVS08 = false; | ||
| 471 | 483 | ||
| 472 | foreach (XAttribute attrib in element.Attributes()) | 484 | foreach (var attrib in element.Attributes()) |
| 473 | { | 485 | { |
| 474 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 486 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 475 | { | 487 | { |
| @@ -504,8 +516,8 @@ namespace WixToolset.VisualStudio | |||
| 504 | } | 516 | } |
| 505 | } | 517 | } |
| 506 | 518 | ||
| 507 | pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); | 519 | var pluginVS05 = namespaceParent.Equals("MS_VSIPCC_v80", StringComparison.Ordinal); |
| 508 | pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); | 520 | var pluginVS08 = namespaceParent.Equals("MS.VSIPCC.v90", StringComparison.Ordinal); |
| 509 | 521 | ||
| 510 | if (null == namespaceParent) | 522 | if (null == namespaceParent) |
| 511 | { | 523 | { |
| @@ -521,11 +533,14 @@ namespace WixToolset.VisualStudio | |||
| 521 | 533 | ||
| 522 | if (!this.Messaging.EncounteredError) | 534 | if (!this.Messaging.EncounteredError) |
| 523 | { | 535 | { |
| 524 | var row = this.ParseHelper.CreateRow(section, sourceLineNumbers, "HelpPlugin", parentId); | 536 | section.AddTuple(new HelpPluginTuple(sourceLineNumbers, parentId) |
| 525 | row.Set(1, namespaceParent); | 537 | { |
| 526 | row.Set(2, hxt); | 538 | HelpNamespaceRef = parentId.Id, |
| 527 | row.Set(3, hxa); | 539 | ParentHelpNamespaceRef = namespaceParent, |
| 528 | row.Set(4, hxtParent); | 540 | HxTFileRef = hxt, |
| 541 | HxAFileRef = hxa, | ||
| 542 | ParentHxTFileRef = hxtParent, | ||
| 543 | }); | ||
| 529 | 544 | ||
| 530 | if (pluginVS05) | 545 | if (pluginVS05) |
| 531 | { | 546 | { |
| @@ -535,7 +550,7 @@ namespace WixToolset.VisualStudio | |||
| 535 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, | 550 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, |
| 536 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); | 551 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2005_Namespace_Components", false); |
| 537 | // Reference CustomAction since nothing will happen without it | 552 | // Reference CustomAction since nothing will happen without it |
| 538 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_HxMerge_VSIPCC_VSCC"); | 553 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_HxMerge_VSIPCC_VSCC"); |
| 539 | } | 554 | } |
| 540 | } | 555 | } |
| 541 | else if (pluginVS08) | 556 | else if (pluginVS08) |
| @@ -546,28 +561,28 @@ namespace WixToolset.VisualStudio | |||
| 546 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, | 561 | this.ParseHelper.CreateComplexReference(section, sourceLineNumbers, ComplexReferenceParentType.Feature, feature, String.Empty, |
| 547 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); | 562 | ComplexReferenceChildType.ComponentGroup, "Help2_VS2008_Namespace_Components", false); |
| 548 | // Reference CustomAction since nothing will happen without it | 563 | // Reference CustomAction since nothing will happen without it |
| 549 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); | 564 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_ScheduleExtHelpPlugin_VSCC_VSIPCC"); |
| 550 | } | 565 | } |
| 551 | } | 566 | } |
| 552 | else | 567 | else |
| 553 | { | 568 | { |
| 554 | // Reference the parent namespace to enforce the foreign key relationship | 569 | // Reference the parent namespace to enforce the foreign key relationship |
| 555 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "HelpNamespace", namespaceParent); | 570 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, VSTupleDefinitions.HelpNamespace, namespaceParent); |
| 556 | } | 571 | } |
| 557 | } | 572 | } |
| 558 | } | 573 | } |
| 559 | 574 | ||
| 560 | private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) | 575 | private void ParseVsixPackageElement(Intermediate intermediate, IntermediateSection section, XElement element, string componentId, string fileId) |
| 561 | { | 576 | { |
| 562 | SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); | 577 | var sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(element); |
| 563 | string propertyId = "VS_VSIX_INSTALLER_PATH"; | 578 | var propertyId = "VS_VSIX_INSTALLER_PATH"; |
| 564 | string packageId = null; | 579 | string packageId = null; |
| 565 | YesNoType permanent = YesNoType.NotSet; | 580 | var permanent = YesNoType.NotSet; |
| 566 | string target = null; | 581 | string target = null; |
| 567 | string targetVersion = null; | 582 | string targetVersion = null; |
| 568 | YesNoType vital = YesNoType.NotSet; | 583 | var vital = YesNoType.NotSet; |
| 569 | 584 | ||
| 570 | foreach (XAttribute attrib in element.Attributes()) | 585 | foreach (var attrib in element.Attributes()) |
| 571 | { | 586 | { |
| 572 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) | 587 | if (String.IsNullOrEmpty(attrib.Name.NamespaceName) || this.Namespace == attrib.Name.Namespace) |
| 573 | { | 588 | { |
| @@ -664,98 +679,131 @@ namespace WixToolset.VisualStudio | |||
| 664 | if (!this.Messaging.EncounteredError) | 679 | if (!this.Messaging.EncounteredError) |
| 665 | { | 680 | { |
| 666 | // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. | 681 | // Ensure there is a reference to the AppSearch Property that will find the VsixInstaller.exe. |
| 667 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "Property", propertyId); | 682 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.Property, propertyId); |
| 668 | 683 | ||
| 669 | // Ensure there is a reference to the package file (even if we are a child under it). | 684 | // Ensure there is a reference to the package file (even if we are a child under it). |
| 670 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "File", fileId); | 685 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.File, fileId); |
| 671 | 686 | ||
| 672 | string cmdlinePrefix = "/q "; | 687 | var cmdlinePrefix = "/q "; |
| 673 | 688 | ||
| 674 | if (!String.IsNullOrEmpty(target)) | 689 | if (!String.IsNullOrEmpty(target)) |
| 675 | { | 690 | { |
| 676 | cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); | 691 | cmdlinePrefix = String.Format("{0} /skuName:{1} /skuVersion:{2}", cmdlinePrefix, target, targetVersion); |
| 677 | } | 692 | } |
| 678 | 693 | ||
| 679 | string installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. | 694 | var installAfter = "WriteRegistryValues"; // by default, come after the registry key registration. |
| 680 | int installExtraBits = VSCompiler.MsidbCustomActionTypeInScript; | 695 | |
| 696 | var installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target, targetVersion); | ||
| 697 | var installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target, targetVersion); | ||
| 698 | var installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); | ||
| 699 | var installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); | ||
| 700 | var installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | ||
| 701 | var installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | ||
| 702 | var installPerUserCA = new CustomActionTuple(sourceLineNumbers, installNamePerUser) | ||
| 703 | { | ||
| 704 | ExecutionType = CustomActionExecutionType.Deferred, | ||
| 705 | Impersonate = true, | ||
| 706 | }; | ||
| 707 | var installPerMachineCA = new CustomActionTuple(sourceLineNumbers, installNamePerMachine) | ||
| 708 | { | ||
| 709 | ExecutionType = CustomActionExecutionType.Deferred, | ||
| 710 | Impersonate = false, | ||
| 711 | }; | ||
| 681 | 712 | ||
| 682 | // If the package is not vital, mark the install action as continue. | 713 | // If the package is not vital, mark the install action as continue. |
| 683 | if (vital == YesNoType.No) | 714 | if (vital == YesNoType.No) |
| 684 | { | 715 | { |
| 685 | installExtraBits |= VSCompiler.MsidbCustomActionTypeContinue; | 716 | installPerUserCA.IgnoreResult = true; |
| 717 | installPerMachineCA.IgnoreResult = true; | ||
| 686 | } | 718 | } |
| 687 | else // the package is vital so ensure there is a rollback action scheduled. | 719 | else // the package is vital so ensure there is a rollback action scheduled. |
| 688 | { | 720 | { |
| 689 | Identifier rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 721 | var rollbackNamePerUser = this.ParseHelper.CreateIdentifier("vru", componentId, fileId, "per-user", target, targetVersion); |
| 690 | Identifier rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 722 | var rollbackNamePerMachine = this.ParseHelper.CreateIdentifier("vrm", componentId, fileId, "per-machine", target, targetVersion); |
| 691 | string rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); | 723 | var rollbackCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); |
| 692 | string rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); | 724 | var rollbackCmdLinePerMachine = String.Concat(rollbackCmdLinePerUser, " /admin"); |
| 693 | int rollbackExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeRollback | VSCompiler.MsidbCustomActionTypeInScript; | 725 | var rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. |
| 694 | int rollbackExtraBitsPerMachine = rollbackExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; | 726 | var rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. |
| 695 | string rollbackConditionPerUser = String.Format("NOT ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. | 727 | var rollbackPerUserCA = new CustomActionTuple(sourceLineNumbers, rollbackNamePerUser) |
| 696 | string rollbackConditionPerMachine = String.Format("ALLUSERS AND NOT Installed AND ${0}=2 AND ?{0}>2", componentId); // NOT Installed && Component being installed but not installed already. | 728 | { |
| 729 | ExecutionType = CustomActionExecutionType.Rollback, | ||
| 730 | IgnoreResult = true, | ||
| 731 | Impersonate = true, | ||
| 732 | }; | ||
| 733 | var rollbackPerMachineCA = new CustomActionTuple(sourceLineNumbers, rollbackNamePerMachine) | ||
| 734 | { | ||
| 735 | ExecutionType = CustomActionExecutionType.Rollback, | ||
| 736 | IgnoreResult = true, | ||
| 737 | Impersonate = false, | ||
| 738 | }; | ||
| 697 | 739 | ||
| 698 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackExtraBitsPerUser, rollbackConditionPerUser, null, installAfter); | 740 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerUser, propertyId, rollbackCmdLinePerUser, rollbackPerUserCA, rollbackConditionPerUser, null, installAfter); |
| 699 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackExtraBitsPerMachine, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); | 741 | this.SchedulePropertyExeAction(section, sourceLineNumbers, rollbackNamePerMachine, propertyId, rollbackCmdLinePerMachine, rollbackPerMachineCA, rollbackConditionPerMachine, null, rollbackNamePerUser.Id); |
| 700 | 742 | ||
| 701 | installAfter = rollbackNamePerMachine.Id; | 743 | installAfter = rollbackNamePerMachine.Id; |
| 702 | } | 744 | } |
| 703 | 745 | ||
| 704 | Identifier installNamePerUser = this.ParseHelper.CreateIdentifier("viu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 746 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installPerUserCA, installConditionPerUser, null, installAfter); |
| 705 | Identifier installNamePerMachine = this.ParseHelper.CreateIdentifier("vim", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 747 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installPerMachineCA, installConditionPerMachine, null, installNamePerUser.Id); |
| 706 | string installCmdLinePerUser = String.Format("{0} \"[#{1}]\"", cmdlinePrefix, fileId); | ||
| 707 | string installCmdLinePerMachine = String.Concat(installCmdLinePerUser, " /admin"); | ||
| 708 | string installConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | ||
| 709 | string installConditionPerMachine = String.Format("ALLUSERS AND ${0}=3", componentId); // only execute if the Component being installed. | ||
| 710 | |||
| 711 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerUser, propertyId, installCmdLinePerUser, installExtraBits, installConditionPerUser, null, installAfter); | ||
| 712 | this.SchedulePropertyExeAction(section, sourceLineNumbers, installNamePerMachine, propertyId, installCmdLinePerMachine, installExtraBits | VSCompiler.MsidbCustomActionTypeNoImpersonate, installConditionPerMachine, null, installNamePerUser.Id); | ||
| 713 | 748 | ||
| 714 | // If not permanent, schedule the uninstall custom action. | 749 | // If not permanent, schedule the uninstall custom action. |
| 715 | if (permanent != YesNoType.Yes) | 750 | if (permanent != YesNoType.Yes) |
| 716 | { | 751 | { |
| 717 | Identifier uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); | 752 | var uninstallNamePerUser = this.ParseHelper.CreateIdentifier("vuu", componentId, fileId, "per-user", target ?? String.Empty, targetVersion ?? String.Empty); |
| 718 | Identifier uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); | 753 | var uninstallNamePerMachine = this.ParseHelper.CreateIdentifier("vum", componentId, fileId, "per-machine", target ?? String.Empty, targetVersion ?? String.Empty); |
| 719 | string uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); | 754 | var uninstallCmdLinePerUser = String.Concat(cmdlinePrefix, " /u:\"", packageId, "\""); |
| 720 | string uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); | 755 | var uninstallCmdLinePerMachine = String.Concat(uninstallCmdLinePerUser, " /admin"); |
| 721 | int uninstallExtraBitsPerUser = VSCompiler.MsidbCustomActionTypeContinue | VSCompiler.MsidbCustomActionTypeInScript; | 756 | var uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. |
| 722 | int uninstallExtraBitsPerMachine = uninstallExtraBitsPerUser | VSCompiler.MsidbCustomActionTypeNoImpersonate; | 757 | var uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. |
| 723 | string uninstallConditionPerUser = String.Format("NOT ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. | 758 | var uninstallPerUserCA = new CustomActionTuple(sourceLineNumbers, uninstallNamePerUser) |
| 724 | string uninstallConditionPerMachine = String.Format("ALLUSERS AND ${0}=2 AND ?{0}>2", componentId); // Only execute if component is being uninstalled. | 759 | { |
| 760 | ExecutionType = CustomActionExecutionType.Deferred, | ||
| 761 | IgnoreResult = true, | ||
| 762 | Impersonate = true, | ||
| 763 | }; | ||
| 764 | var uninstallPerMachineCA = new CustomActionTuple(sourceLineNumbers, uninstallNamePerMachine) | ||
| 765 | { | ||
| 766 | ExecutionType = CustomActionExecutionType.Deferred, | ||
| 767 | IgnoreResult = true, | ||
| 768 | Impersonate = false, | ||
| 769 | }; | ||
| 725 | 770 | ||
| 726 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallExtraBitsPerUser, uninstallConditionPerUser, "InstallFinalize", null); | 771 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerUser, propertyId, uninstallCmdLinePerUser, uninstallPerUserCA, uninstallConditionPerUser, "InstallFinalize", null); |
| 727 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallExtraBitsPerMachine, uninstallConditionPerMachine, "InstallFinalize", null); | 772 | this.SchedulePropertyExeAction(section, sourceLineNumbers, uninstallNamePerMachine, propertyId, uninstallCmdLinePerMachine, uninstallPerMachineCA, uninstallConditionPerMachine, "InstallFinalize", null); |
| 728 | } | 773 | } |
| 729 | } | 774 | } |
| 730 | } | 775 | } |
| 731 | 776 | ||
| 732 | private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, int extraBits, string condition, string beforeAction, string afterAction) | 777 | private void SchedulePropertyExeAction(IntermediateSection section, SourceLineNumber sourceLineNumbers, Identifier name, string source, string cmdline, CustomActionTuple caTemplate, string condition, string beforeAction, string afterAction) |
| 733 | { | 778 | { |
| 734 | const string sequence = "InstallExecuteSequence"; | 779 | const SequenceTable sequence = SequenceTable.InstallExecuteSequence; |
| 735 | 780 | ||
| 736 | var actionRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "CustomAction", name); | 781 | caTemplate.SourceType = CustomActionSourceType.Property; |
| 737 | actionRow.Set(1, VSCompiler.MsidbCustomActionTypeProperty | VSCompiler.MsidbCustomActionTypeExe | extraBits); | 782 | caTemplate.Source = source; |
| 738 | actionRow.Set(2, source); | 783 | caTemplate.TargetType = CustomActionTargetType.Exe; |
| 739 | actionRow.Set(3, cmdline); | 784 | caTemplate.Target = cmdline; |
| 740 | 785 | section.AddTuple(caTemplate); | |
| 741 | var sequenceRow = this.ParseHelper.CreateRow(section, sourceLineNumbers, "WixAction", new Identifier(name.Access, sequence, name.Id)); | 786 | |
| 742 | sequenceRow.Set(0, sequence); | 787 | section.AddTuple(new WixActionTuple(sourceLineNumbers, new Identifier(name.Access, sequence, name.Id)) |
| 743 | sequenceRow.Set(1, name.Id); | 788 | { |
| 744 | sequenceRow.Set(2, condition); | 789 | SequenceTable = SequenceTable.InstallExecuteSequence, |
| 745 | // no explicit sequence | 790 | Action = name.Id, |
| 746 | sequenceRow.Set(4, beforeAction); | 791 | Condition = condition, |
| 747 | sequenceRow.Set(5, afterAction); | 792 | // no explicit sequence |
| 748 | sequenceRow.Set(6, 0); // not overridable | 793 | Before = beforeAction, |
| 794 | After = afterAction, | ||
| 795 | Overridable = false, | ||
| 796 | }); | ||
| 749 | 797 | ||
| 750 | if (null != beforeAction) | 798 | if (null != beforeAction) |
| 751 | { | 799 | { |
| 752 | if (WindowsInstallerStandard.IsStandardAction(beforeAction)) | 800 | if (WindowsInstallerStandard.IsStandardAction(beforeAction)) |
| 753 | { | 801 | { |
| 754 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, beforeAction); | 802 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), beforeAction); |
| 755 | } | 803 | } |
| 756 | else | 804 | else |
| 757 | { | 805 | { |
| 758 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", beforeAction); | 806 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, beforeAction); |
| 759 | } | 807 | } |
| 760 | } | 808 | } |
| 761 | 809 | ||
| @@ -763,13 +811,18 @@ namespace WixToolset.VisualStudio | |||
| 763 | { | 811 | { |
| 764 | if (WindowsInstallerStandard.IsStandardAction(afterAction)) | 812 | if (WindowsInstallerStandard.IsStandardAction(afterAction)) |
| 765 | { | 813 | { |
| 766 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "WixAction", sequence, afterAction); | 814 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.WixAction, sequence.ToString(), afterAction); |
| 767 | } | 815 | } |
| 768 | else | 816 | else |
| 769 | { | 817 | { |
| 770 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", afterAction); | 818 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, afterAction); |
| 771 | } | 819 | } |
| 772 | } | 820 | } |
| 773 | } | 821 | } |
| 822 | |||
| 823 | private void AddReferenceToRegisterMicrosoftHelp(IntermediateSection section, SourceLineNumber sourceLineNumbers) | ||
| 824 | { | ||
| 825 | this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, TupleDefinitions.CustomAction, "CA_RegisterMicrosoftHelp.3643236F_FC70_11D3_A536_0090278A1BB8"); | ||
| 826 | } | ||
| 774 | } | 827 | } |
| 775 | } | 828 | } |
diff --git a/src/wixext/VSExtensionData.cs b/src/wixext/VSExtensionData.cs index bc846af0..3d28b625 100644 --- a/src/wixext/VSExtensionData.cs +++ b/src/wixext/VSExtensionData.cs | |||
| @@ -7,6 +7,18 @@ namespace WixToolset.VisualStudio | |||
| 7 | 7 | ||
| 8 | public sealed class VSExtensionData : BaseExtensionData | 8 | public sealed class VSExtensionData : BaseExtensionData |
| 9 | { | 9 | { |
| 10 | /// <summary> | ||
| 11 | /// Gets the default culture. | ||
| 12 | /// </summary> | ||
| 13 | /// <value>The default culture.</value> | ||
| 14 | public override string DefaultCulture => "en-US"; | ||
| 15 | |||
| 16 | public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) | ||
| 17 | { | ||
| 18 | tupleDefinition = VSTupleDefinitions.ByName(name); | ||
| 19 | return tupleDefinition != null; | ||
| 20 | } | ||
| 21 | |||
| 10 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) | 22 | public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) |
| 11 | { | 23 | { |
| 12 | return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); | 24 | return Intermediate.Load(typeof(VSExtensionData).Assembly, "WixToolset.VisualStudio.vs.wixlib", tupleDefinitions); |
diff --git a/src/wixext/VSTableDefinitions.cs b/src/wixext/VSTableDefinitions.cs index 64634004..f630f138 100644 --- a/src/wixext/VSTableDefinitions.cs +++ b/src/wixext/VSTableDefinitions.cs | |||
| @@ -6,67 +6,92 @@ namespace WixToolset.VisualStudio | |||
| 6 | 6 | ||
| 7 | public static class VSTableDefinitions | 7 | public static class VSTableDefinitions |
| 8 | { | 8 | { |
| 9 | public static readonly TableDefinition[] Tables = new[] { | 9 | public static readonly TableDefinition HelpFile = new TableDefinition( |
| 10 | new TableDefinition( | 10 | "HelpFile", |
| 11 | "HelpFile", | 11 | new[] |
| 12 | new[] | 12 | { |
| 13 | { | 13 | new ColumnDefinition("HelpFileKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required).", modularizeType: ColumnModularizeType.Column), |
| 14 | new ColumnDefinition("HelpFileKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFile Table (required)."), | 14 | new ColumnDefinition("HelpFileName", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), |
| 15 | new ColumnDefinition("HelpFileName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this HelpFile (required)."), | 15 | new ColumnDefinition("LangID", ColumnType.Number, 2, primaryKey: false, nullable: true, ColumnCategory.Language, description: "Language ID for content file (optional)."), |
| 16 | new ColumnDefinition("LangID", ColumnType.Number, 2, false, true, ColumnCategory.Language, description: "Language ID for content file (optional)."), | 16 | new ColumnDefinition("File_HxS", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxS (Title) file (required).", modularizeType: ColumnModularizeType.Column), |
| 17 | new ColumnDefinition("File_HxS", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxS (Title) file (required)."), | 17 | new ColumnDefinition("File_HxI", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxI (Index) file (optional).", modularizeType: ColumnModularizeType.Column), |
| 18 | new ColumnDefinition("File_HxI", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxI (Index) file (required)."), | 18 | new ColumnDefinition("File_HxQ", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxQ (Query) file (optional).", modularizeType: ColumnModularizeType.Column), |
| 19 | new ColumnDefinition("File_HxQ", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxQ (Query) file (required)."), | 19 | new ColumnDefinition("File_HxR", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxR (Attributes) file (optional).", modularizeType: ColumnModularizeType.Column), |
| 20 | new ColumnDefinition("File_HxR", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxR (Attributes) file (required)."), | 20 | new ColumnDefinition("File_Samples", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional).", modularizeType: ColumnModularizeType.Column), |
| 21 | new ColumnDefinition("File_Samples", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for a file that is in the 'root' of the samples directory for this HelpFile (optional)."), | 21 | }, |
| 22 | } | 22 | tupleDefinitionName: VSTupleDefinitions.HelpFile.Name, |
| 23 | ), | 23 | tupleIdIsPrimaryKey: true |
| 24 | new TableDefinition( | 24 | ); |
| 25 | "HelpFileToNamespace", | 25 | |
| 26 | new[] | 26 | public static readonly TableDefinition HelpFileToNamespace = new TableDefinition( |
| 27 | { | 27 | "HelpFileToNamespace", |
| 28 | new ColumnDefinition("HelpFile_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required)."), | 28 | new[] |
| 29 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), | 29 | { |
| 30 | } | 30 | new ColumnDefinition("HelpFile_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFile", keyColumn: 1, description: "Foreign key into HelpFile table (required).", modularizeType: ColumnModularizeType.Column), |
| 31 | ), | 31 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), |
| 32 | new TableDefinition( | 32 | }, |
| 33 | "HelpFilter", | 33 | tupleDefinitionName: VSTupleDefinitions.HelpFileToNamespace.Name, |
| 34 | new[] | 34 | tupleIdIsPrimaryKey: false |
| 35 | { | 35 | ); |
| 36 | new ColumnDefinition("FilterKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required)."), | 36 | |
| 37 | new ColumnDefinition("Description", ColumnType.Localized, 0, false, false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), | 37 | public static readonly TableDefinition HelpFilter = new TableDefinition( |
| 38 | new ColumnDefinition("QueryString", ColumnType.String, 0, false, true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), | 38 | "HelpFilter", |
| 39 | } | 39 | new[] |
| 40 | ), | 40 | { |
| 41 | new TableDefinition( | 41 | new ColumnDefinition("FilterKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpFilter (required).", modularizeType: ColumnModularizeType.Column), |
| 42 | "HelpFilterToNamespace", | 42 | new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Friendly name for Filter (required)."), |
| 43 | new[] | 43 | new ColumnDefinition("QueryString", ColumnType.String, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Query String for Help Filter (optional)."), |
| 44 | { | 44 | }, |
| 45 | new ColumnDefinition("HelpFilter_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required)."), | 45 | tupleDefinitionName: VSTupleDefinitions.HelpFilter.Name, |
| 46 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), | 46 | tupleIdIsPrimaryKey: true |
| 47 | } | 47 | ); |
| 48 | ), | 48 | |
| 49 | new TableDefinition( | 49 | public static readonly TableDefinition HelpFilterToNamespace = new TableDefinition( |
| 50 | "HelpNamespace", | 50 | "HelpFilterToNamespace", |
| 51 | new[] | 51 | new[] |
| 52 | { | 52 | { |
| 53 | new ColumnDefinition("NamespaceKey", ColumnType.String, 72, true, false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), | 53 | new ColumnDefinition("HelpFilter_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpFilter", keyColumn: 1, description: "Foreign key into HelpFilter table (required).", modularizeType: ColumnModularizeType.Column), |
| 54 | new ColumnDefinition("NamespaceName", ColumnType.String, 0, false, false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), | 54 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table (required)."), |
| 55 | new ColumnDefinition("File_Collection", ColumnType.String, 72, false, false, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxC (Collection) file (required)."), | 55 | }, |
| 56 | new ColumnDefinition("Description", ColumnType.Localized, 0, false, true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), | 56 | tupleDefinitionName: VSTupleDefinitions.HelpFilterToNamespace.Name, |
| 57 | } | 57 | tupleIdIsPrimaryKey: false |
| 58 | ), | 58 | ); |
| 59 | new TableDefinition( | 59 | |
| 60 | "HelpPlugin", | 60 | public static readonly TableDefinition HelpNamespace = new TableDefinition( |
| 61 | new[] | 61 | "HelpNamespace", |
| 62 | { | 62 | new[] |
| 63 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."), | 63 | { |
| 64 | new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, true, false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."), | 64 | new ColumnDefinition("NamespaceKey", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, description: "Primary Key for HelpNamespace (required)."), |
| 65 | new ColumnDefinition("File_HxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of child namespace (optional)."), | 65 | new ColumnDefinition("NamespaceName", ColumnType.String, 0, primaryKey: false, nullable: false, ColumnCategory.Text, description: "Internal Microsoft Help ID for this Namespace (required)."), |
| 66 | new ColumnDefinition("File_HxA", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional)."), | 66 | new ColumnDefinition("File_Collection", ColumnType.String, 72, primaryKey: false, nullable: false, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxC (Collection) file (required).", modularizeType: ColumnModularizeType.Column), |
| 67 | new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, false, true, ColumnCategory.Identifier, keyTable:"File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional)."), | 67 | new ColumnDefinition("Description", ColumnType.Localized, 0, primaryKey: false, nullable: true, ColumnCategory.Text, description: "Friendly name for Namespace (optional)."), |
| 68 | } | 68 | }, |
| 69 | ), | 69 | tupleDefinitionName: VSTupleDefinitions.HelpNamespace.Name, |
| 70 | tupleIdIsPrimaryKey: true | ||
| 71 | ); | ||
| 72 | |||
| 73 | public static readonly TableDefinition HelpPlugin = new TableDefinition( | ||
| 74 | "HelpPlugin", | ||
| 75 | new[] | ||
| 76 | { | ||
| 77 | new ColumnDefinition("HelpNamespace_", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the child namespace that will be plugged into the parent namespace (required)."), | ||
| 78 | new ColumnDefinition("HelpNamespace_Parent", ColumnType.String, 72, primaryKey: true, nullable: false, ColumnCategory.Identifier, keyTable: "HelpNamespace", keyColumn: 1, description: "Foreign key into HelpNamespace table for the parent namespace into which the child will be inserted (required)."), | ||
| 79 | new ColumnDefinition("File_HxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), | ||
| 80 | new ColumnDefinition("File_HxA", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxA (Attributes) file of child namespace (optional).", modularizeType: ColumnModularizeType.Column), | ||
| 81 | new ColumnDefinition("File_ParentHxT", ColumnType.String, 72, primaryKey: false, nullable: true, ColumnCategory.Identifier, keyTable: "File", keyColumn: 1, description: "Key for HxT file of parent namespace that now includes the new child namespace (optional).", modularizeType: ColumnModularizeType.Column), | ||
| 82 | }, | ||
| 83 | tupleDefinitionName: VSTupleDefinitions.HelpPlugin.Name, | ||
| 84 | tupleIdIsPrimaryKey: false | ||
| 85 | ); | ||
| 86 | |||
| 87 | public static readonly TableDefinition[] All = new[] | ||
| 88 | { | ||
| 89 | HelpFile, | ||
| 90 | HelpFileToNamespace, | ||
| 91 | HelpFilter, | ||
| 92 | HelpFilterToNamespace, | ||
| 93 | HelpNamespace, | ||
| 94 | HelpPlugin, | ||
| 70 | }; | 95 | }; |
| 71 | } | 96 | } |
| 72 | } | 97 | } |
diff --git a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs index 7a9579ca..825c8ca7 100644 --- a/src/wixext/VSWindowsInstallerBackendBinderExtension.cs +++ b/src/wixext/VSWindowsInstallerBackendBinderExtension.cs | |||
| @@ -1,4 +1,4 @@ | |||
| 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. | 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 | 2 | ||
| 3 | namespace WixToolset.VisualStudio | 3 | namespace WixToolset.VisualStudio |
| 4 | { | 4 | { |
| @@ -8,6 +8,6 @@ namespace WixToolset.VisualStudio | |||
| 8 | 8 | ||
| 9 | public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension | 9 | public class VSWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension |
| 10 | { | 10 | { |
| 11 | public override IEnumerable<TableDefinition> TableDefinitions => VSTableDefinitions.Tables; | 11 | public override IEnumerable<TableDefinition> TableDefinitions => VSTableDefinitions.All; |
| 12 | } | 12 | } |
| 13 | } | 13 | } |
