From 704139b787d2016e43b6a87dbfc41555dac8326a Mon Sep 17 00:00:00 2001 From: Sean Hall Date: Sat, 2 Feb 2019 17:01:09 -0600 Subject: Integrate into latest v4. --- src/Directory.Build.props | 28 +++++++++ src/Directory.Build.targets | 48 ++++++++++++++++ src/FindLocalWix.props | 8 +++ .../DifxAppExtensionFixture.cs | 36 ++++++++++++ .../TestData/UsingDriver/Package.en-us.wxl | 11 ++++ .../TestData/UsingDriver/Package.wxs | 21 +++++++ .../TestData/UsingDriver/PackageComponents.wxs | 12 ++++ .../TestData/UsingDriver/example.txt | 1 + .../WixToolsetTest.DifxApp.csproj | 38 +++++++++++++ src/wixext/DifxAppCompiler.cs | 66 +++++++++++++--------- src/wixext/DifxAppDecompiler.cs | 4 +- src/wixext/DifxAppExtensionData.cs | 36 +++--------- src/wixext/DifxAppExtensionFactory.cs | 18 ++++++ ...ifxAppWindowsInstallerBackendBinderExtension.cs | 26 +++++++++ src/wixext/Tuples/DifxAppTupleDefinitions.cs | 39 +++++++++++++ src/wixext/Tuples/MsiDriverPackagesTuple.cs | 63 +++++++++++++++++++++ src/wixext/WixDifxAppExtension.csproj | 47 --------------- src/wixext/WixToolset.DifxApp.wixext.csproj | 30 ++++++++++ src/wixext/WixToolset.DifxApp.wixext.targets | 11 ++++ src/wixlib/DIFxAppExtension.wixproj | 30 ---------- src/wixlib/DIFxAppExtension.wxs | 21 ------- src/wixlib/DifxAppExtension_Platform.wxi | 23 ++++++++ src/wixlib/DifxAppExtension_x64.wxs | 8 +++ src/wixlib/DifxAppExtension_x86.wxs | 8 +++ src/wixlib/caSuffix.wxi | 28 +++++++++ src/wixlib/difxapp.wixproj | 39 +++++++++++++ src/wixlib/packages.config | 5 ++ 27 files changed, 552 insertions(+), 153 deletions(-) create mode 100644 src/Directory.Build.props create mode 100644 src/Directory.Build.targets create mode 100644 src/FindLocalWix.props create mode 100644 src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs create mode 100644 src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt create mode 100644 src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj create mode 100644 src/wixext/DifxAppExtensionFactory.cs create mode 100644 src/wixext/DifxAppWindowsInstallerBackendBinderExtension.cs create mode 100644 src/wixext/Tuples/DifxAppTupleDefinitions.cs create mode 100644 src/wixext/Tuples/MsiDriverPackagesTuple.cs delete mode 100644 src/wixext/WixDifxAppExtension.csproj create mode 100644 src/wixext/WixToolset.DifxApp.wixext.csproj create mode 100644 src/wixext/WixToolset.DifxApp.wixext.targets delete mode 100644 src/wixlib/DIFxAppExtension.wixproj delete mode 100644 src/wixlib/DIFxAppExtension.wxs create mode 100644 src/wixlib/DifxAppExtension_Platform.wxi create mode 100644 src/wixlib/DifxAppExtension_x64.wxs create mode 100644 src/wixlib/DifxAppExtension_x86.wxs create mode 100644 src/wixlib/caSuffix.wxi create mode 100644 src/wixlib/difxapp.wixproj create mode 100644 src/wixlib/packages.config (limited to 'src') diff --git a/src/Directory.Build.props b/src/Directory.Build.props new file mode 100644 index 00000000..a22f4470 --- /dev/null +++ b/src/Directory.Build.props @@ -0,0 +1,28 @@ + + + + + + Debug + false + MSB3246 + + $(MSBuildProjectName) + $([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)..\build\)) + $(BaseOutputPath)obj\$(ProjectName)\ + $(BaseOutputPath)$(Configuration)\ + + WiX Toolset Team + WiX Toolset + Copyright (c) .NET Foundation and contributors. All rights reserved. + MS-RL + WiX Toolset + + + + + + diff --git a/src/Directory.Build.targets b/src/Directory.Build.targets new file mode 100644 index 00000000..dac7452a --- /dev/null +++ b/src/Directory.Build.targets @@ -0,0 +1,48 @@ + + + + + + + true + $(SolutionPath) + $(NCrunchOriginalSolutionPath) + + + + + + + $([System.IO.File]::ReadAllText($(TheSolutionPath))) + $([System.IO.Path]::GetDirectoryName( $(TheSolutionPath) )) + (?<="[PackageName]", ")(.*)(?=", ") + + + + + + %(Identity) + $(SolutionFileContent.Contains('\%(Identity).csproj')) + + + + + $(RegexPattern.Replace('[PackageName]','%(PackageName)') ) + $([System.Text.RegularExpressions.Regex]::Match('$(SolutionFileContent)', '%(Pattern)')) + + + + + + + + + + + diff --git a/src/FindLocalWix.props b/src/FindLocalWix.props new file mode 100644 index 00000000..a784e352 --- /dev/null +++ b/src/FindLocalWix.props @@ -0,0 +1,8 @@ + + + + + + $(MSBuildThisFileDirectory)..\..\Tools\build\Debug\net461\wix.targets + + diff --git a/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs b/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs new file mode 100644 index 00000000..dbe257fa --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/DifxAppExtensionFixture.cs @@ -0,0 +1,36 @@ +// 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. + +namespace WixToolsetTest.DifxApp +{ + using System.Linq; + using WixBuildTools.TestSupport; + using WixToolset.Core.TestPackage; + using WixToolset.DifxApp; + using Xunit; + + public class DifxAppExtensionFixture + { + [Fact] + public void CanBuildUsingDriver() + { + var folder = TestData.Get(@"TestData\UsingDriver"); + var build = new Builder(folder, typeof(DifxAppExtensionFactory), new[] { folder }); + + var results = build.BuildAndQuery(Build, "CustomAction"); + Assert.Equal(new[] + { + "CustomAction:MsiCleanupOnSuccess\t1\tDIFxApp.dll\tCleanupOnSuccess\t0", + "CustomAction:MsiInstallDrivers\t3073\tDIFxAppA.dll\tInstallDriverPackages\t0", + "CustomAction:MsiProcessDrivers\t1\tDIFxApp.dll\tProcessDriverPackages\t0", + "CustomAction:MsiRollbackInstall\t3329\tDIFxAppA.dll\tRollbackInstall\t0", + "CustomAction:MsiUninstallDrivers\t3073\tDIFxAppA.dll\tUninstallDriverPackages\t0", + }, results.OrderBy(s => s).ToArray()); + } + + private static void Build(string[] args) + { + var result = WixRunner.Execute(args) + .AssertSuccess(); + } + } +} diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl new file mode 100644 index 00000000..38c12ac1 --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.en-us.wxl @@ -0,0 +1,11 @@ + + + + + + A newer version of [ProductName] is already installed. + MsiPackage + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs new file mode 100644 index 00000000..cdc323ec --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/Package.wxs @@ -0,0 +1,21 @@ + + + + + + + + + + + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs new file mode 100644 index 00000000..9609771a --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/PackageComponents.wxs @@ -0,0 +1,12 @@ + + + + + + + + + + + diff --git a/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt new file mode 100644 index 00000000..1b4ffe8a --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/TestData/UsingDriver/example.txt @@ -0,0 +1 @@ +This is example.txt. \ No newline at end of file diff --git a/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj b/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj new file mode 100644 index 00000000..d2d0de50 --- /dev/null +++ b/src/test/WixToolsetTest.DifxApp/WixToolsetTest.DifxApp.csproj @@ -0,0 +1,38 @@ + + + + + + netcoreapp2.1 + false + + + + NU1701 + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/DifxAppCompiler.cs b/src/wixext/DifxAppCompiler.cs index 63396932..98f36b3f 100644 --- a/src/wixext/DifxAppCompiler.cs +++ b/src/wixext/DifxAppCompiler.cs @@ -1,26 +1,27 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.DifxApp { using System; using System.Collections.Generic; using System.Xml.Linq; using WixToolset.Data; + using WixToolset.DifxApp.Tuples; using WixToolset.Extensibility; /// /// The compiler for the WiX Toolset Driver Install Frameworks for Applications Extension. /// - public sealed class DifxAppCompiler : CompilerExtension + public sealed class DifxAppCompiler : BaseCompilerExtension { private HashSet components; + public override XNamespace Namespace => "http://wixtoolset.org/schemas/v4/wxs/difxapp"; /// /// Instantiate a new DifxAppCompiler. /// public DifxAppCompiler() { - this.Namespace = "http://wixtoolset.org/schemas/v4/wxs/difxapp"; this.components = new HashSet(); } @@ -31,26 +32,27 @@ namespace WixToolset.Extensions /// Parent element of element to process. /// Element to process. /// Extra information about the context in which this element is being parsed. - public override void ParseElement(XElement parentElement, XElement element, IDictionary context) + public override void ParseElement(Intermediate intermediate, IntermediateSection section, XElement parentElement, XElement element, IDictionary context) { switch (parentElement.Name.LocalName) { case "Component": string componentId = context["ComponentId"]; string directoryId = context["DirectoryId"]; + bool componentWin64 = Boolean.Parse(context["Win64"]); switch (element.Name.LocalName) { case "Driver": - this.ParseDriverElement(element, componentId); + this.ParseDriverElement(intermediate, section, element, componentId, componentWin64); break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } break; default: - this.Core.UnexpectedElement(parentElement, element); + this.ParseHelper.UnexpectedElement(parentElement, element); break; } } @@ -60,9 +62,9 @@ namespace WixToolset.Extensions /// /// Element to parse. /// Identifier for parent component. - private void ParseDriverElement(XElement node, string componentId) + private void ParseDriverElement(Intermediate intermediate, IntermediateSection section, XElement node, string componentId, bool win64) { - SourceLineNumber sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node); + SourceLineNumber sourceLineNumbers = this.ParseHelper.GetSourceLineNumbers(node); int attributes = 0; int sequence = CompilerConstants.IntegerNotSet; @@ -71,7 +73,7 @@ namespace WixToolset.Extensions { if (this.components.Contains(componentId)) { - this.Core.OnMessage(WixErrors.TooManyElements(sourceLineNumbers, "Component", node.Name.LocalName, 1)); + this.Messaging.Write(ErrorMessages.TooManyElements(sourceLineNumbers, "Component", node.Name.LocalName, 1)); } else { @@ -86,62 +88,74 @@ namespace WixToolset.Extensions switch (attrib.Name.LocalName) { case "AddRemovePrograms": - if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= 0x4; } break; case "DeleteFiles": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= 0x10; } break; case "ForceInstall": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= 0x1; } break; case "Legacy": - if (YesNoType.Yes == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.Yes == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= 0x8; } break; case "PlugAndPlayPrompt": - if (YesNoType.No == this.Core.GetAttributeYesNoValue(sourceLineNumbers, attrib)) + if (YesNoType.No == this.ParseHelper.GetAttributeYesNoValue(sourceLineNumbers, attrib)) { attributes |= 0x2; } break; case "Sequence": - sequence = this.Core.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); + sequence = this.ParseHelper.GetAttributeIntegerValue(sourceLineNumbers, attrib, 0, int.MaxValue); break; default: - this.Core.UnexpectedAttribute(node, attrib); + this.ParseHelper.UnexpectedAttribute(node, attrib); break; } } else { - this.Core.ParseExtensionAttribute(node, attrib); + this.ParseHelper.ParseExtensionAttribute(this.Context.Extensions, intermediate, section, node, attrib); } } - this.Core.ParseForExtensionElements(node); + this.ParseHelper.ParseForExtensionElements(this.Context.Extensions, intermediate, section, node); - if (!this.Core.EncounteredError) + if (!this.Messaging.EncounteredError) { - Row row = this.Core.CreateRow(sourceLineNumbers, "MsiDriverPackages"); - row[0] = componentId; - row[1] = attributes; - if (CompilerConstants.IntegerNotSet != sequence) + switch (this.Context.Platform) { - row[2] = sequence; + case Platform.X86: + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers"); + break; + case Platform.X64: + this.ParseHelper.CreateSimpleReference(section, sourceLineNumbers, "CustomAction", "MsiProcessDrivers_x64"); + break; + case Platform.IA64: + case Platform.ARM: + this.Messaging.Write(ErrorMessages.UnsupportedPlatformForElement(sourceLineNumbers, this.Context.Platform.ToString(), node.Name.LocalName)); + break; } - this.Core.CreateSimpleReference(sourceLineNumbers, "CustomAction", "MsiProcessDrivers"); + var row = (MsiDriverPackagesTuple)this.ParseHelper.CreateRow(section, sourceLineNumbers, "MsiDriverPackages"); + row.Set(0, componentId); + row.Set(1, attributes); + if (CompilerConstants.IntegerNotSet != sequence) + { + row.Set(2, sequence); + } } } } diff --git a/src/wixext/DifxAppDecompiler.cs b/src/wixext/DifxAppDecompiler.cs index db42b3d0..e41d8b98 100644 --- a/src/wixext/DifxAppDecompiler.cs +++ b/src/wixext/DifxAppDecompiler.cs @@ -1,7 +1,8 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.DifxApp { +#if TODO_CONSIDER_DECOMPILER using System; using System.Collections; using System.Globalization; @@ -93,4 +94,5 @@ namespace WixToolset.Extensions } } } +#endif } diff --git a/src/wixext/DifxAppExtensionData.cs b/src/wixext/DifxAppExtensionData.cs index 266f5ee4..49e1354f 100644 --- a/src/wixext/DifxAppExtensionData.cs +++ b/src/wixext/DifxAppExtensionData.cs @@ -1,43 +1,23 @@ // 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. -namespace WixToolset.Extensions +namespace WixToolset.DifxApp { - using System; - using System.Reflection; using WixToolset.Data; using WixToolset.Extensibility; - /// - /// The WiX Toolset Driver Install Frameworks for Applications Extension. - /// - public sealed class DifxAppExtensionData : ExtensionData + public sealed class DifxAppExtensionData : BaseExtensionData { - private static TableDefinitionCollection tableDefinitions; + public override string DefaultCulture => "en-US"; - /// - /// Gets the optional table definitions for this extension. - /// - /// The optional table definitions for this extension. - public override TableDefinitionCollection TableDefinitions + public override bool TryGetTupleDefinitionByName(string name, out IntermediateTupleDefinition tupleDefinition) { - get - { - return DifxAppExtensionData.GetExtensionTableDefinitions(); - } + tupleDefinition = DifxAppTupleDefinitions.ByName(name); + return tupleDefinition != null; } - /// - /// Internal mechanism to access the extension's table definitions. - /// - /// Extension's table definitions. - internal static TableDefinitionCollection GetExtensionTableDefinitions() + public override Intermediate GetLibrary(ITupleDefinitionCreator tupleDefinitions) { - if (null == DifxAppExtensionData.tableDefinitions) - { - DifxAppExtensionData.tableDefinitions = ExtensionData.LoadTableDefinitionHelper(Assembly.GetExecutingAssembly(), "WixToolset.Extensions.Data.tables.xml"); - } - - return DifxAppExtensionData.tableDefinitions; + return Intermediate.Load(typeof(DifxAppExtensionData).Assembly, "WixToolset.DifxApp.difxapp.wixlib", tupleDefinitions); } } } diff --git a/src/wixext/DifxAppExtensionFactory.cs b/src/wixext/DifxAppExtensionFactory.cs new file mode 100644 index 00000000..4565ce17 --- /dev/null +++ b/src/wixext/DifxAppExtensionFactory.cs @@ -0,0 +1,18 @@ +// 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. + +namespace WixToolset.DifxApp +{ + using System; + using System.Collections.Generic; + using WixToolset.Extensibility; + + public class DifxAppExtensionFactory : BaseExtensionFactory + { + protected override IEnumerable ExtensionTypes => new[] + { + typeof(DifxAppCompiler), + typeof(DifxAppExtensionData), + typeof(DifxAppWindowsInstallerBackendBinderExtension), + }; + } +} diff --git a/src/wixext/DifxAppWindowsInstallerBackendBinderExtension.cs b/src/wixext/DifxAppWindowsInstallerBackendBinderExtension.cs new file mode 100644 index 00000000..4d81c134 --- /dev/null +++ b/src/wixext/DifxAppWindowsInstallerBackendBinderExtension.cs @@ -0,0 +1,26 @@ +// 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. + +namespace WixToolset.DifxApp +{ + using System.Linq; + using System.Xml; + using WixToolset.Data.WindowsInstaller; + using WixToolset.Extensibility; + + public class DifxAppWindowsInstallerBackendBinderExtension : BaseWindowsInstallerBackendBinderExtension + { + private static readonly TableDefinition[] Tables = LoadTables(); + + protected override TableDefinition[] TableDefinitionsForTuples => Tables; + + private static TableDefinition[] LoadTables() + { + using (var resourceStream = typeof(DifxAppWindowsInstallerBackendBinderExtension).Assembly.GetManifestResourceStream("WixToolset.DifxApp.tables.xml")) + using (var reader = XmlReader.Create(resourceStream)) + { + var tables = TableDefinitionCollection.Load(reader); + return tables.ToArray(); + } + } + } +} diff --git a/src/wixext/Tuples/DifxAppTupleDefinitions.cs b/src/wixext/Tuples/DifxAppTupleDefinitions.cs new file mode 100644 index 00000000..37dabb86 --- /dev/null +++ b/src/wixext/Tuples/DifxAppTupleDefinitions.cs @@ -0,0 +1,39 @@ +// 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. + +namespace WixToolset.DifxApp +{ + using System; + using WixToolset.Data; + + public enum DifxAppTupleDefinitionType + { + MsiDriverPackages, + } + + public static partial class DifxAppTupleDefinitions + { + public static readonly Version Version = new Version("4.0.0"); + + public static IntermediateTupleDefinition ByName(string name) + { + if (!Enum.TryParse(name, out DifxAppTupleDefinitionType type)) + { + return null; + } + + return ByType(type); + } + + public static IntermediateTupleDefinition ByType(DifxAppTupleDefinitionType type) + { + switch (type) + { + case DifxAppTupleDefinitionType.MsiDriverPackages: + return DifxAppTupleDefinitions.MsiDriverPackages; + + default: + throw new ArgumentOutOfRangeException(nameof(type)); + } + } + } +} diff --git a/src/wixext/Tuples/MsiDriverPackagesTuple.cs b/src/wixext/Tuples/MsiDriverPackagesTuple.cs new file mode 100644 index 00000000..aecc7e77 --- /dev/null +++ b/src/wixext/Tuples/MsiDriverPackagesTuple.cs @@ -0,0 +1,63 @@ +// 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. + +namespace WixToolset.DifxApp +{ + using WixToolset.Data; + using WixToolset.DifxApp.Tuples; + + public static partial class DifxAppTupleDefinitions + { + public static readonly IntermediateTupleDefinition MsiDriverPackages = new IntermediateTupleDefinition( + DifxAppTupleDefinitionType.MsiDriverPackages.ToString(), + new[] + { + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Component), IntermediateFieldType.String), + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Flags), IntermediateFieldType.Number), + new IntermediateFieldDefinition(nameof(MsiDriverPackagesTupleFields.Sequence), IntermediateFieldType.Number), + }, + typeof(MsiDriverPackagesTuple)); + } +} + +namespace WixToolset.DifxApp.Tuples +{ + using WixToolset.Data; + + public enum MsiDriverPackagesTupleFields + { + Component, + Flags, + Sequence, + } + + public class MsiDriverPackagesTuple : IntermediateTuple + { + public MsiDriverPackagesTuple() : base(DifxAppTupleDefinitions.MsiDriverPackages, null, null) + { + } + + public MsiDriverPackagesTuple(SourceLineNumber sourceLineNumber, Identifier id = null) : base(DifxAppTupleDefinitions.MsiDriverPackages, sourceLineNumber, id) + { + } + + public IntermediateField this[MsiDriverPackagesTupleFields index] => this.Fields[(int)index]; + + public string Component + { + get => this.Fields[(int)MsiDriverPackagesTupleFields.Component].AsString(); + set => this.Set((int)MsiDriverPackagesTupleFields.Component, value); + } + + public int Flags + { + get => this.Fields[(int)MsiDriverPackagesTupleFields.Flags].AsNumber(); + set => this.Set((int)MsiDriverPackagesTupleFields.Flags, value); + } + + public int Sequence + { + get => this.Fields[(int)MsiDriverPackagesTupleFields.Sequence].AsNumber(); + set => this.Set((int)MsiDriverPackagesTupleFields.Sequence, value); + } + } +} \ No newline at end of file diff --git a/src/wixext/WixDifxAppExtension.csproj b/src/wixext/WixDifxAppExtension.csproj deleted file mode 100644 index 5e85c675..00000000 --- a/src/wixext/WixDifxAppExtension.csproj +++ /dev/null @@ -1,47 +0,0 @@ - - - - - - - {2256EFD7-E678-4485-818D-986D590068BE} - WixDifxAppExtension - Library - WixToolset.Extensions - - - - - - - - $(RootNamespace).Data.tables.xml - - - $(RootNamespace).Xsd.difxapp.xsd - PreserveNewest - - - Designer - WixToolset.Data.Serialize - WixToolset.Extensions.Serialize.DifxApp - - - - - - - - - - - Platform=x86 - false - - - Platform=x64 - false - - - - diff --git a/src/wixext/WixToolset.DifxApp.wixext.csproj b/src/wixext/WixToolset.DifxApp.wixext.csproj new file mode 100644 index 00000000..5717b42a --- /dev/null +++ b/src/wixext/WixToolset.DifxApp.wixext.csproj @@ -0,0 +1,30 @@ + + + + + + netstandard2.0 + WixToolset.DifxApp + WiX Toolset DIFxApp Extension + WiX Toolset DIFxApp Extension + true + build + + + + + + + + + + + + + + + + + + + diff --git a/src/wixext/WixToolset.DifxApp.wixext.targets b/src/wixext/WixToolset.DifxApp.wixext.targets new file mode 100644 index 00000000..b01d4116 --- /dev/null +++ b/src/wixext/WixToolset.DifxApp.wixext.targets @@ -0,0 +1,11 @@ + + + + + + $(MSBuildThisFileDirectory)..\tools\WixToolset.DifxApp.wixext.dll + + + + + diff --git a/src/wixlib/DIFxAppExtension.wixproj b/src/wixlib/DIFxAppExtension.wixproj deleted file mode 100644 index f4a7eb74..00000000 --- a/src/wixlib/DIFxAppExtension.wixproj +++ /dev/null @@ -1,30 +0,0 @@ - - - - - - - {5066EB93-D8F7-4FAE-B687-024D7A81BD95} - difxapp_$(Platform) - Library - true - true - en-us - - - - - - - $(DefineConstants); - DIFxAppDll=$(ProjectDir)$(Platform)\DIFxApp.dll; - DIFxAppADll=$(ProjectDir)$(Platform)\DIFxAppA.dll; - - - - - - - - - diff --git a/src/wixlib/DIFxAppExtension.wxs b/src/wixlib/DIFxAppExtension.wxs deleted file mode 100644 index 44b0ce2c..00000000 --- a/src/wixlib/DIFxAppExtension.wxs +++ /dev/null @@ -1,21 +0,0 @@ - - - - - - - - VersionNT > 400 - VersionNT > 400 - - - - - - - - - - - - diff --git a/src/wixlib/DifxAppExtension_Platform.wxi b/src/wixlib/DifxAppExtension_Platform.wxi new file mode 100644 index 00000000..7583f7ea --- /dev/null +++ b/src/wixlib/DifxAppExtension_Platform.wxi @@ -0,0 +1,23 @@ + + + + + + + + + + VersionNT > 400 + VersionNT > 400 + + + + + + + + + + + + diff --git a/src/wixlib/DifxAppExtension_x64.wxs b/src/wixlib/DifxAppExtension_x64.wxs new file mode 100644 index 00000000..3c534363 --- /dev/null +++ b/src/wixlib/DifxAppExtension_x64.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/DifxAppExtension_x86.wxs b/src/wixlib/DifxAppExtension_x86.wxs new file mode 100644 index 00000000..d352a272 --- /dev/null +++ b/src/wixlib/DifxAppExtension_x86.wxs @@ -0,0 +1,8 @@ + + + + + + + + diff --git a/src/wixlib/caSuffix.wxi b/src/wixlib/caSuffix.wxi new file mode 100644 index 00000000..a56a2393 --- /dev/null +++ b/src/wixlib/caSuffix.wxi @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/wixlib/difxapp.wixproj b/src/wixlib/difxapp.wixproj new file mode 100644 index 00000000..9b414afd --- /dev/null +++ b/src/wixlib/difxapp.wixproj @@ -0,0 +1,39 @@ + + + + + + + {5066EB93-D8F7-4FAE-B687-024D7A81BD95} + difxapp + Library + true + true + en-us + + + + + + + + + + + + + + + + + + + + + This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. + + + + + + diff --git a/src/wixlib/packages.config b/src/wixlib/packages.config new file mode 100644 index 00000000..7964daed --- /dev/null +++ b/src/wixlib/packages.config @@ -0,0 +1,5 @@ + + + + + \ No newline at end of file -- cgit v1.2.3-55-g6feb