From db7cf299e0110eefbc9fdc2cd6e873177b443ee7 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Mon, 7 Oct 2019 09:40:42 -0700 Subject: Support Bundle building --- src/WixToolset.Extensibility/Data/IBindContext.cs | 4 ++- .../Data/IResolvedDirectory.cs | 19 +++++++++++++ .../IBurnBackendExtension.cs | 3 +-- .../Services/IBackendHelper.cs | 8 ++++++ .../Services/IPathResolver.cs | 31 ++++++++++++++++++++++ .../Services/IWindowsInstallerBackendHelper.cs | 2 ++ 6 files changed, 64 insertions(+), 3 deletions(-) create mode 100644 src/WixToolset.Extensibility/Data/IResolvedDirectory.cs create mode 100644 src/WixToolset.Extensibility/Services/IPathResolver.cs (limited to 'src') diff --git a/src/WixToolset.Extensibility/Data/IBindContext.cs b/src/WixToolset.Extensibility/Data/IBindContext.cs index 355b1a53..97c7a8f2 100644 --- a/src/WixToolset.Extensibility/Data/IBindContext.cs +++ b/src/WixToolset.Extensibility/Data/IBindContext.cs @@ -1,4 +1,4 @@ -// 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. +// 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.Extensibility.Data { @@ -10,6 +10,8 @@ namespace WixToolset.Extensibility.Data { IServiceProvider ServiceProvider { get; } + string BurnStubPath { get; set; } + int CabbingThreadCount { get; set; } string CabCachePath { get; set; } diff --git a/src/WixToolset.Extensibility/Data/IResolvedDirectory.cs b/src/WixToolset.Extensibility/Data/IResolvedDirectory.cs new file mode 100644 index 00000000..59de6e78 --- /dev/null +++ b/src/WixToolset.Extensibility/Data/IResolvedDirectory.cs @@ -0,0 +1,19 @@ +// 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.Extensibility.Data +{ + /// + /// Used for resolved directory information. + /// + public interface IResolvedDirectory + { + /// The directory parent. + string DirectoryParent { get; set; } + + /// The name of this directory. + string Name { get; set; } + + /// The path of this directory. + string Path { get; set; } + } +} diff --git a/src/WixToolset.Extensibility/IBurnBackendExtension.cs b/src/WixToolset.Extensibility/IBurnBackendExtension.cs index acce700a..64a09e49 100644 --- a/src/WixToolset.Extensibility/IBurnBackendExtension.cs +++ b/src/WixToolset.Extensibility/IBurnBackendExtension.cs @@ -3,7 +3,6 @@ namespace WixToolset.Extensibility { using WixToolset.Data; - using WixToolset.Data.Bind; using WixToolset.Extensibility.Data; public interface IBurnBackendExtension @@ -13,7 +12,7 @@ namespace WixToolset.Extensibility /// void PreBackendBind(IBindContext context); - string ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage); + IResolveFileResult ResolveRelatedFile(string source, string relatedSource, string type, SourceLineNumber sourceLineNumbers, BindStage bindStage); string ResolveUrl(string url, string fallbackUrl, string packageId, string payloadId, string fileName); diff --git a/src/WixToolset.Extensibility/Services/IBackendHelper.cs b/src/WixToolset.Extensibility/Services/IBackendHelper.cs index 0622693d..756d0a97 100644 --- a/src/WixToolset.Extensibility/Services/IBackendHelper.cs +++ b/src/WixToolset.Extensibility/Services/IBackendHelper.cs @@ -27,6 +27,14 @@ namespace WixToolset.Extensibility.Services /// The generated GUID for the given namespace and value. string CreateGuid(Guid namespaceGuid, string value); + /// + /// Creates a resolved directory. + /// + /// Directory parent identifier. + /// Name of directory. + /// Resolved directory. + IResolvedDirectory CreateResolvedDirectory(string directoryParent, string name); + /// /// Creates a tracked file. /// diff --git a/src/WixToolset.Extensibility/Services/IPathResolver.cs b/src/WixToolset.Extensibility/Services/IPathResolver.cs new file mode 100644 index 00000000..e468112f --- /dev/null +++ b/src/WixToolset.Extensibility/Services/IPathResolver.cs @@ -0,0 +1,31 @@ +// 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.Extensibility.Services +{ + using System.Collections.Generic; + using WixToolset.Extensibility.Data; + + public interface IPathResolver + { + /// + /// Get the source path of a directory. + /// + /// All cached directories. + /// Hash table of Component GUID generation seeds indexed by directory id. + /// Directory identifier. + /// Canonicalize the path for standard directories. + /// Source path of a directory. + string GetDirectoryPath(Dictionary directories, Dictionary componentIdGenSeeds, string directory, bool canonicalize); + + /// + /// Gets the source path of a file. + /// + /// All cached directories in . + /// Parent directory identifier. + /// File name (in long|source format). + /// Specifies the package is compressed. + /// Specifies the package uses long file names. + /// Source path of file relative to package directory. + string GetFileSourcePath(Dictionary directories, string directoryId, string fileName, bool compressed, bool useLongName); + } +} diff --git a/src/WixToolset.Extensibility/Services/IWindowsInstallerBackendHelper.cs b/src/WixToolset.Extensibility/Services/IWindowsInstallerBackendHelper.cs index 2de455fd..a783d1a4 100644 --- a/src/WixToolset.Extensibility/Services/IWindowsInstallerBackendHelper.cs +++ b/src/WixToolset.Extensibility/Services/IWindowsInstallerBackendHelper.cs @@ -11,5 +11,7 @@ namespace WixToolset.Extensibility.Services public interface IWindowsInstallerBackendHelper { bool TryAddTupleToOutputMatchingTableDefinitions(IntermediateTuple tuple, Output output, TableDefinition[] tableDefinitions); + + bool TryAddTupleToOutputMatchingTableDefinitions(IntermediateTuple tuple, Output output, TableDefinition[] tableDefinitions, bool columnZeroIsId); } } -- cgit v1.2.3-55-g6feb