Enable XML doc.
This commit is contained in:
Родитель
4e9b8c43ec
Коммит
0e71bdd637
|
@ -8,6 +8,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.WindowsInst
|
|||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.Burn", "src\WixToolset.Core.Burn\WixToolset.Core.Burn.csproj", "{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolset.Core.ExtensionCache", "src\WixToolset.Core.ExtensionCache\WixToolset.Core.ExtensionCache.csproj", "{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}"
|
||||
EndProject
|
||||
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Test", "Test", "{1284331E-BC6C-426D-AAAF-140C0174F875}"
|
||||
EndProject
|
||||
Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "Example.Extension", "src\test\Example.Extension\Example.Extension.csproj", "{C66C2503-C671-4230-8B48-1D93A8532A28}"
|
||||
|
@ -66,6 +68,18 @@ Global
|
|||
{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x64.Build.0 = Release|Any CPU
|
||||
{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{BC19D30D-C1B6-46DF-95B3-8EDF688E0FEC}.Release|x86.Build.0 = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x64.Build.0 = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.ActiveCfg = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Debug|x86.Build.0 = Debug|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.ActiveCfg = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|Any CPU.Build.0 = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.ActiveCfg = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x64.Build.0 = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.ActiveCfg = Release|Any CPU
|
||||
{A1F0DF11-87FB-4BBC-B53B-83F2CE66604A}.Release|x86.Build.0 = Release|Any CPU
|
||||
{C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
|
||||
{C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|Any CPU.Build.0 = Debug|Any CPU
|
||||
{C66C2503-C671-4230-8B48-1D93A8532A28}.Debug|x64.ActiveCfg = Debug|Any CPU
|
||||
|
|
|
@ -8,5 +8,6 @@
|
|||
<CheckForOverflowUnderflow>true</CheckForOverflowUnderflow>
|
||||
<SignAssembly>true</SignAssembly>
|
||||
<AssemblyOriginatorKeyFile>$([System.IO.Path]::GetFullPath($(MSBuildThisFileDirectory)wix.snk))</AssemblyOriginatorKeyFile>
|
||||
<NBGV_EmitThisAssemblyClass>false</NBGV_EmitThisAssemblyClass>
|
||||
</PropertyGroup>
|
||||
</Project>
|
||||
|
|
|
@ -9,6 +9,11 @@
|
|||
See the original here: https://github.com/dotnet/sdk/issues/1151#issuecomment-385133284
|
||||
-->
|
||||
<Project>
|
||||
<PropertyGroup>
|
||||
<CreateDocumentation Condition=" '$(CreateDocumentationFile)'!='true' ">false</CreateDocumentation>
|
||||
<DocumentationFile Condition=" '$(CreateDocumentationFile)'=='true' ">$(OutputPath)\$(AssemblyName).xml</DocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<ReplacePackageReferences>true</ReplacePackageReferences>
|
||||
<TheSolutionPath Condition=" '$(NCrunch)'=='' ">$(SolutionPath)</TheSolutionPath>
|
||||
|
@ -45,4 +50,7 @@
|
|||
|
||||
</When>
|
||||
</Choose>
|
||||
|
||||
<Import Project="Wix.Build.targets" Condition=" Exists('Wix.Build.targets') And '$(MSBuildProjectExtension)'=='.wixproj' " />
|
||||
<Import Project="Custom.Build.targets" Condition=" Exists('Custom.Build.targets') " />
|
||||
</Project>
|
||||
|
|
|
@ -9,7 +9,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Common functionality for Burn PE Writer & Reader for the WiX toolset.
|
||||
/// Common functionality for Burn PE Writer & Reader for the WiX toolset.
|
||||
/// </summary>
|
||||
/// <remarks>This class encapsulates common functionality related to
|
||||
/// bundled/chained setup packages.</remarks>
|
||||
|
@ -107,8 +107,8 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// <summary>
|
||||
/// Creates a BurnCommon for re-writing a PE file.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="fileExe">File to modify in-place.</param>
|
||||
/// <param name="bundleGuid">GUID for the bundle.</param>
|
||||
public BurnCommon(IMessaging messaging, string fileExe)
|
||||
{
|
||||
this.messaging = messaging;
|
||||
|
|
|
@ -32,6 +32,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// <summary>
|
||||
/// Creates a BurnReader for reading a PE file.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="fileExe">File to read.</param>
|
||||
private BurnReader(IMessaging messaging, string fileExe)
|
||||
: base(messaging, fileExe)
|
||||
|
@ -58,6 +59,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// <summary>
|
||||
/// Opens a Burn reader.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="fileExe">Path to file.</param>
|
||||
/// <returns>Burn reader.</returns>
|
||||
public static BurnReader Open(IMessaging messaging, string fileExe)
|
||||
|
@ -77,6 +79,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// Gets the UX container from the exe and extracts its contents to the output directory.
|
||||
/// </summary>
|
||||
/// <param name="outputDirectory">Directory to write extracted files to.</param>
|
||||
/// <param name="tempDirectory">Scratch directory.</param>
|
||||
/// <returns>True if successful, false otherwise</returns>
|
||||
public bool ExtractUXContainer(string outputDirectory, string tempDirectory)
|
||||
{
|
||||
|
@ -157,6 +160,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// Gets the attached container from the exe and extracts its contents to the output directory.
|
||||
/// </summary>
|
||||
/// <param name="outputDirectory">Directory to write extracted files to.</param>
|
||||
/// <param name="tempDirectory">Scratch directory.</param>
|
||||
/// <returns>True if successful, false otherwise</returns>
|
||||
public bool ExtractAttachedContainer(string outputDirectory, string tempDirectory)
|
||||
{
|
||||
|
|
|
@ -29,8 +29,8 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// <summary>
|
||||
/// Creates a BurnWriter for re-writing a PE file.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="fileExe">File to modify in-place.</param>
|
||||
/// <param name="bundleGuid">GUID for the bundle.</param>
|
||||
private BurnWriter(IMessaging messaging, string fileExe)
|
||||
: base(messaging, fileExe)
|
||||
{
|
||||
|
@ -39,6 +39,7 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// <summary>
|
||||
/// Opens a Burn writer.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="fileExe">Path to file.</param>
|
||||
/// <returns>Burn writer.</returns>
|
||||
public static BurnWriter Open(IMessaging messaging, string fileExe)
|
||||
|
@ -197,7 +198,9 @@ namespace WixToolset.Core.Burn.Bundles
|
|||
/// Appends a container to the exe and updates the ".wixburn" section data to point to it.
|
||||
/// </summary>
|
||||
/// <param name="containerStream">File stream to append to the current exe.</param>
|
||||
/// <param name="containerSize">Size of the container.</param>
|
||||
/// <param name="burnSectionOffsetSize">Offset of size field for this container in ".wixburn" section data.</param>
|
||||
/// <param name="burnSectionCount">Number of Burn sections.</param>
|
||||
/// <returns>true if the container data is successfully appended; false otherwise</returns>
|
||||
private bool AppendContainer(Stream containerStream, UInt32 containerSize, UInt32 burnSectionOffsetSize, UInt32 burnSectionCount)
|
||||
{
|
||||
|
|
|
@ -7,18 +7,18 @@ namespace WixToolset.Core.Burn
|
|||
using WixToolset.Data.WindowsInstaller;
|
||||
|
||||
/// <summary>
|
||||
/// A list of rows indexed by their primary key. Unlike a <see cref="RowDictionary"/>
|
||||
/// A list of rows indexed by their primary key. Unlike a RowDictionary
|
||||
/// this indexed list will track rows in their added order and will allow rows with
|
||||
/// duplicate keys to be added to the list, although only the first row will be indexed.
|
||||
/// </summary>
|
||||
public sealed class RowIndexedList<T> : IList<T> where T : Row
|
||||
internal sealed class RowIndexedList<T> : IList<T> where T : Row
|
||||
{
|
||||
private Dictionary<string, T> index;
|
||||
private List<T> rows;
|
||||
private List<T> duplicates;
|
||||
|
||||
/// <summary>
|
||||
/// Creates an empty <see cref="RowIndexedList"/>.
|
||||
/// Creates an empty <see cref="RowIndexedList{T}"/>.
|
||||
/// </summary>
|
||||
public RowIndexedList()
|
||||
{
|
||||
|
@ -28,7 +28,7 @@ namespace WixToolset.Core.Burn
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
|
||||
/// Creates and populates a <see cref="RowIndexedList{T}"/> with the rows from the given enumerator.
|
||||
/// </summary>
|
||||
/// <param name="rows">Rows to index.</param>
|
||||
public RowIndexedList(IEnumerable<T> rows)
|
||||
|
@ -41,7 +41,7 @@ namespace WixToolset.Core.Burn
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
|
||||
/// Creates and populates a <see cref="RowIndexedList{T}"/> with the rows from the given <see cref="Table"/>.
|
||||
/// </summary>
|
||||
/// <param name="table">The table to index.</param>
|
||||
/// <remarks>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<Title>WiX Toolset Core Burn</Title>
|
||||
<DebugType>embedded</DebugType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<CreateDocumentationFile>true</CreateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -28,8 +29,8 @@
|
|||
<PackageReference Include="System.Security.Permissions" Version="4.6.0" />
|
||||
<PackageReference Include="WixToolset.Burn" Version="4.0.*" />
|
||||
<PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
|
||||
<PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" NoWarn="NU1701" />
|
||||
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />
|
||||
<PackageReference Include="WixToolset.Dtf.Resources" Version="4.0.*" />
|
||||
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -7,8 +7,16 @@ namespace WixToolset.Core.Burn
|
|||
using WixToolset.Core.Burn.ExtensibilityServices;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Extensions methods for adding Burn services.
|
||||
/// </summary>
|
||||
public static class WixToolsetCoreServiceProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds Burn Services.
|
||||
/// </summary>
|
||||
/// <param name="coreProvider"></param>
|
||||
/// <returns></returns>
|
||||
public static IWixToolsetCoreServiceProvider AddBundleBackend(this IWixToolsetCoreServiceProvider coreProvider)
|
||||
{
|
||||
AddServices(coreProvider);
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<Title>WiX Toolset Extension Cache</Title>
|
||||
<DebugType>embedded</DebugType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<CreateDocumentationFile>true</CreateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -6,8 +6,16 @@ namespace WixToolset.Core.ExtensionCache
|
|||
using System.Collections.Generic;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Extensions methods for adding ExtensionCache services.
|
||||
/// </summary>
|
||||
public static class WixToolsetCoreServiceProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds ExtensionCache services.
|
||||
/// </summary>
|
||||
/// <param name="coreProvider"></param>
|
||||
/// <returns></returns>
|
||||
public static IWixToolsetCoreServiceProvider AddExtensionCacheManager(this IWixToolsetCoreServiceProvider coreProvider)
|
||||
{
|
||||
var extensionManager = coreProvider.GetService<IExtensionManager>();
|
||||
|
|
|
@ -7,8 +7,19 @@ namespace WixToolset.Core.TestPackage
|
|||
using WixToolset.Core.Burn.Bundles;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Class to extract bundle contents for testing.
|
||||
/// </summary>
|
||||
public class BundleExtractor
|
||||
{
|
||||
/// <summary>
|
||||
/// Extracts the BA container.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="bundleFilePath">Path to the bundle.</param>
|
||||
/// <param name="destinationFolderPath">Path to extract to.</param>
|
||||
/// <param name="tempFolderPath">Temp path for extraction.</param>
|
||||
/// <returns></returns>
|
||||
public static ExtractBAContainerResult ExtractBAContainer(IMessaging messaging, string bundleFilePath, string destinationFolderPath, string tempFolderPath)
|
||||
{
|
||||
var result = new ExtractBAContainerResult();
|
||||
|
@ -33,6 +44,12 @@ namespace WixToolset.Core.TestPackage
|
|||
return result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="XmlNamespaceManager"/> for BootstrapperApplicationData.xml with the given prefix assigned to the root namespace.
|
||||
/// </summary>
|
||||
/// <param name="document"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlNamespaceManager GetBADataNamespaceManager(XmlDocument document, string prefix)
|
||||
{
|
||||
var namespaceManager = new XmlNamespaceManager(document.NameTable);
|
||||
|
@ -40,6 +57,12 @@ namespace WixToolset.Core.TestPackage
|
|||
return namespaceManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="XmlNamespaceManager"/> for BundleExtensionData.xml with the given prefix assigned to the root namespace.
|
||||
/// </summary>
|
||||
/// <param name="document"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlNamespaceManager GetBundleExtensionDataNamespaceManager(XmlDocument document, string prefix)
|
||||
{
|
||||
var namespaceManager = new XmlNamespaceManager(document.NameTable);
|
||||
|
@ -47,6 +70,12 @@ namespace WixToolset.Core.TestPackage
|
|||
return namespaceManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Gets an <see cref="XmlNamespaceManager"/> for the Burn manifest.xml with the given prefix assigned to the root namespace.
|
||||
/// </summary>
|
||||
/// <param name="document"></param>
|
||||
/// <param name="prefix"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlNamespaceManager GetBurnNamespaceManager(XmlDocument document, string prefix)
|
||||
{
|
||||
var namespaceManager = new XmlNamespaceManager(document.NameTable);
|
||||
|
@ -54,6 +83,11 @@ namespace WixToolset.Core.TestPackage
|
|||
return namespaceManager;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
|
||||
/// </summary>
|
||||
/// <param name="baFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlDocument LoadBAData(string baFolderPath)
|
||||
{
|
||||
var document = new XmlDocument();
|
||||
|
@ -61,6 +95,11 @@ namespace WixToolset.Core.TestPackage
|
|||
return document;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
|
||||
/// </summary>
|
||||
/// <param name="baFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlDocument LoadBundleExtensionData(string baFolderPath)
|
||||
{
|
||||
var document = new XmlDocument();
|
||||
|
@ -68,6 +107,11 @@ namespace WixToolset.Core.TestPackage
|
|||
return document;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Loads an XmlDocument with the BootstrapperApplicationData.xml from the given folder that contains the contents of the BA container.
|
||||
/// </summary>
|
||||
/// <param name="baFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
public static XmlDocument LoadBurnManifest(string baFolderPath)
|
||||
{
|
||||
var document = new XmlDocument();
|
||||
|
|
|
@ -6,22 +6,61 @@ namespace WixToolset.Core.TestPackage
|
|||
using System.Xml;
|
||||
using Xunit;
|
||||
|
||||
/// <summary>
|
||||
/// The result of extracting the BA container.
|
||||
/// </summary>
|
||||
public class ExtractBAContainerResult
|
||||
{
|
||||
/// <summary>
|
||||
/// <see cref="XmlDocument"/> for BundleExtensionData.xml.
|
||||
/// </summary>
|
||||
public XmlDocument BundleExtensionDataDocument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="XmlNamespaceManager"/> for BundleExtensionData.xml.
|
||||
/// </summary>
|
||||
public XmlNamespaceManager BundleExtensionDataNamespaceManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="XmlDocument"/> for BootstrapperApplicationData.xml.
|
||||
/// </summary>
|
||||
public XmlDocument BADataDocument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="XmlNamespaceManager"/> for BootstrapperApplicationData.xml.
|
||||
/// </summary>
|
||||
public XmlNamespaceManager BADataNamespaceManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="XmlDocument"/> for the Burn manifest.xml.
|
||||
/// </summary>
|
||||
public XmlDocument ManifestDocument { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// <see cref="XmlNamespaceManager"/> for the Burn manifest.xml.
|
||||
/// </summary>
|
||||
public XmlNamespaceManager ManifestNamespaceManager { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Whether extraction succeeded.
|
||||
/// </summary>
|
||||
public bool Success { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public ExtractBAContainerResult AssertSuccess()
|
||||
{
|
||||
Assert.True(this.Success);
|
||||
return this;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the relative path of the BA entry point dll in the given folder.
|
||||
/// </summary>
|
||||
/// <param name="extractedBAContainerFolderPath"></param>
|
||||
/// <returns></returns>
|
||||
public string GetBAFilePath(string extractedBAContainerFolderPath)
|
||||
{
|
||||
var uxPayloads = this.SelectManifestNodes("/burn:BurnManifest/burn:UX/burn:Payload");
|
||||
|
@ -30,6 +69,12 @@ namespace WixToolset.Core.TestPackage
|
|||
return Path.Combine(extractedBAContainerFolderPath, relativeBAPath);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the relative path of the BundleExtension entry point dll in the given folder.
|
||||
/// </summary>
|
||||
/// <param name="extractedBAContainerFolderPath"></param>
|
||||
/// <param name="extensionId"></param>
|
||||
/// <returns></returns>
|
||||
public string GetBundleExtensionFilePath(string extractedBAContainerFolderPath, string extensionId)
|
||||
{
|
||||
var uxPayloads = this.SelectManifestNodes($"/burn:BurnManifest/burn:UX/burn:Payload[@Id='{extensionId}']");
|
||||
|
|
|
@ -5,24 +5,51 @@ using WixToolset.Extensibility.Services;
|
|||
|
||||
namespace WixToolset.Core.TestPackage
|
||||
{
|
||||
/// <summary>
|
||||
/// An <see cref="IMessageListener"/> that simply stores all the messages.
|
||||
/// </summary>
|
||||
public sealed class TestMessageListener : IMessageListener
|
||||
{
|
||||
/// <summary>
|
||||
/// All messages that have been received.
|
||||
/// </summary>
|
||||
public List<Message> Messages { get; } = new List<Message>();
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string ShortAppName => "TEST";
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public string LongAppName => "Test";
|
||||
|
||||
/// <summary>
|
||||
/// Stores the message in <see cref="Messages"/>.
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public void Write(Message message)
|
||||
{
|
||||
this.Messages.Add(message);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Stores the message in <see cref="Messages"/>.
|
||||
/// </summary>
|
||||
/// <param name="message"></param>
|
||||
public void Write(string message)
|
||||
{
|
||||
this.Messages.Add(new Message(null, MessageLevel.Information, 0, message));
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Always returns defaultMessageLevel.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="message"></param>
|
||||
/// <param name="defaultMessageLevel"></param>
|
||||
/// <returns></returns>
|
||||
public MessageLevel CalculateMessageLevel(IMessaging messaging, Message message, MessageLevel defaultMessageLevel) => defaultMessageLevel;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -9,11 +9,19 @@ namespace WixToolset.Core.TestPackage
|
|||
using WixToolset.Core.Burn;
|
||||
using WixToolset.Core.WindowsInstaller;
|
||||
using WixToolset.Data;
|
||||
using WixToolset.Extensibility.Data;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Utility class to emulate wix.exe with standard backends.
|
||||
/// </summary>
|
||||
public static class WixRunner
|
||||
{
|
||||
/// <summary>
|
||||
/// Emulates calling wix.exe with standard backends.
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <param name="messages"></param>
|
||||
/// <returns></returns>
|
||||
public static int Execute(string[] args, out List<Message> messages)
|
||||
{
|
||||
var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
|
||||
|
@ -21,6 +29,11 @@ namespace WixToolset.Core.TestPackage
|
|||
return task.Result;
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Emulates calling wix.exe with standard backends.
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <returns></returns>
|
||||
public static WixRunnerResult Execute(params string[] args)
|
||||
{
|
||||
var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider();
|
||||
|
@ -28,6 +41,13 @@ namespace WixToolset.Core.TestPackage
|
|||
return new WixRunnerResult { ExitCode = exitCode.Result, Messages = messages.ToArray() };
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Emulates calling wix.exe with standard backends.
|
||||
/// </summary>
|
||||
/// <param name="args"></param>
|
||||
/// <param name="coreProvider"></param>
|
||||
/// <param name="messages"></param>
|
||||
/// <returns></returns>
|
||||
public static Task<int> Execute(string[] args, IWixToolsetCoreServiceProvider coreProvider, out List<Message> messages)
|
||||
{
|
||||
coreProvider.AddWindowsInstallerBackend()
|
||||
|
|
|
@ -7,12 +7,25 @@ namespace WixToolset.Core.TestPackage
|
|||
using WixToolset.Data;
|
||||
using Xunit;
|
||||
|
||||
/// <summary>
|
||||
/// The result of an Execute method of <see cref="WixRunner"/>.
|
||||
/// </summary>
|
||||
public class WixRunnerResult
|
||||
{
|
||||
/// <summary>
|
||||
/// ExitCode for the operation.
|
||||
/// </summary>
|
||||
public int ExitCode { get; set; }
|
||||
|
||||
/// <summary>
|
||||
/// Messages from the operation.
|
||||
/// </summary>
|
||||
public Message[] Messages { get; set; }
|
||||
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
/// <returns></returns>
|
||||
public WixRunnerResult AssertSuccess()
|
||||
{
|
||||
Assert.True(0 == this.ExitCode, $"\r\n\r\nWixRunner failed with exit code: {this.ExitCode}\r\n Output: {String.Join("\r\n ", FormatMessages(this.Messages))}\r\n");
|
||||
|
|
|
@ -8,6 +8,7 @@
|
|||
<Description>Internal WiX Toolset Test Package</Description>
|
||||
<DebugType>embedded</DebugType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<CreateDocumentationFile>true</CreateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -7,13 +7,28 @@ namespace WixToolset.Core.TestPackage
|
|||
using System.Text.RegularExpressions;
|
||||
using System.Xml;
|
||||
|
||||
/// <summary>
|
||||
/// Utility class to help compare XML in tests using string comparisons by using single quotes and stripping all namespaces.
|
||||
/// </summary>
|
||||
public static class XmlNodeExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Returns the node's outer XML using single quotes and stripping all namespaces.
|
||||
/// </summary>
|
||||
/// <param name="node"></param>
|
||||
/// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetTestXml(this XmlNode node, Dictionary<string, List<string>> ignoredAttributesByElementName = null)
|
||||
{
|
||||
return node.OuterXml.GetTestXml(ignoredAttributesByElementName);
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Returns the XML using single quotes and stripping all namespaces.
|
||||
/// </summary>
|
||||
/// <param name="xml"></param>
|
||||
/// <param name="ignoredAttributesByElementName">Attributes for which the value should be set to '*'.</param>
|
||||
/// <returns></returns>
|
||||
public static string GetTestXml(this string xml, Dictionary<string, List<string>> ignoredAttributesByElementName = null)
|
||||
{
|
||||
string formattedXml;
|
||||
|
|
|
@ -115,7 +115,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <summary>
|
||||
/// Assign files to cabinets based on MediaTemplate authoring.
|
||||
/// </summary>
|
||||
/// <param name="fileFacades">FileRowCollection</param>
|
||||
private void AutoAssignFiles(List<MediaSymbol> mediaTable, Dictionary<MediaSymbol, List<FileFacade>> filesByCabinetMedia, List<FileFacade> uncompressedFiles)
|
||||
{
|
||||
const int MaxCabIndex = 999;
|
||||
|
@ -295,7 +294,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <summary>
|
||||
/// Adds a symbol to the section with cab name template filled in.
|
||||
/// </summary>
|
||||
/// <param name="mediaTable"></param>
|
||||
/// <param name="mediaTemplateSymbol"></param>
|
||||
/// <param name="cabIndex"></param>
|
||||
/// <returns></returns>
|
||||
private MediaSymbol AddMediaSymbol(WixMediaTemplateSymbol mediaTemplateSymbol, int cabIndex)
|
||||
|
|
|
@ -28,6 +28,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <summary>
|
||||
/// Instantiate a new CabinetBuilder.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="threadCount">number of threads to use</param>
|
||||
/// <param name="newCabNamesCallBackAddress">Address of Binder's callback function for Cabinet Splitting</param>
|
||||
public CabinetBuilder(IMessaging messaging, int threadCount, IntPtr newCabNamesCallBackAddress)
|
||||
|
|
|
@ -13,7 +13,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
using WixToolset.Extensibility.Data;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
public class CabinetResolver
|
||||
internal class CabinetResolver
|
||||
{
|
||||
public CabinetResolver(IWixToolsetServiceProvider serviceProvider, string cabCachePath, IEnumerable<IWindowsInstallerBackendBinderExtension> backendExtensions)
|
||||
{
|
||||
|
|
|
@ -18,7 +18,8 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <param name="cabinetFile">The cabinet file.</param>
|
||||
/// <param name="maxThreshold">Maximum threshold for each cabinet.</param>
|
||||
/// <param name="compressionLevel">The compression level of the cabinet.</param>
|
||||
/// <param name="binderFileManager">The binder file manager.</param>
|
||||
/// <param name="modularizationSuffix">Modularization suffix used when building a Merge Module.</param>
|
||||
/// <!--<param name="binderFileManager">The binder file manager.</param>-->
|
||||
public CabinetWorkItem(IEnumerable<FileFacade> fileFacades, string cabinetFile, int maxThreshold, CompressionLevel compressionLevel, string modularizationSuffix /*, BinderFileManager binderFileManager*/)
|
||||
{
|
||||
this.CabinetFile = cabinetFile;
|
||||
|
@ -52,10 +53,10 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <value>The collection of files in this cabinet.</value>
|
||||
public IEnumerable<FileFacade> FileFacades { get; }
|
||||
|
||||
/// <summary>
|
||||
/// Gets the binder file manager.
|
||||
/// </summary>
|
||||
/// <value>The binder file manager.</value>
|
||||
// <summary>
|
||||
// Gets the binder file manager.
|
||||
// </summary>
|
||||
// <value>The binder file manager.</value>
|
||||
//public BinderFileManager BinderFileManager { get; private set; }
|
||||
|
||||
/// <summary>
|
||||
|
|
|
@ -90,9 +90,6 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
|
||||
public IEnumerable<ITrackedFile> TrackedFiles => this.trackedFiles;
|
||||
|
||||
/// <param name="output">Output to generate image for.</param>
|
||||
/// <param name="layoutDirectory">The directory in which the image should be layed out.</param>
|
||||
/// <param name="compressed">Flag if source image should be compressed.</param>
|
||||
public void Execute()
|
||||
{
|
||||
this.lastCabinetAddedToMediaTable = new Dictionary<string, string>();
|
||||
|
@ -177,6 +174,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <param name="output">Output for the current database.</param>
|
||||
/// <param name="cabinetDir">Directory to create cabinet in.</param>
|
||||
/// <param name="mediaSymbol">Media symbol containing information about the cabinet.</param>
|
||||
/// <param name="compressionLevel">Desired compression level.</param>
|
||||
/// <param name="fileFacades">Collection of files in this cabinet.</param>
|
||||
/// <returns>created CabinetWorkItem object</returns>
|
||||
private CabinetWorkItem CreateCabinetWorkItem(WindowsInstallerData output, string cabinetDir, MediaSymbol mediaSymbol, CompressionLevel compressionLevel, IEnumerable<FileFacade> fileFacades)
|
||||
|
@ -284,7 +282,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// This callback will not be called in case there is no File splitting. i.e. MaximumCabinetSizeForLargeFileSplitting was not authored
|
||||
/// </summary>
|
||||
/// <param name="firstCabName">The name of splitting cabinet without extention e.g. "cab1".</param>
|
||||
/// <param name="newCabName">The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"</param>
|
||||
/// <param name="newCabinetName">The name of the new cabinet that would be formed by splitting e.g. "cab1b.cab"</param>
|
||||
/// <param name="fileToken">The file token of the first file present in the splitting cabinet</param>
|
||||
internal void NewCabNamesCallBack([MarshalAs(UnmanagedType.LPWStr)]string firstCabName, [MarshalAs(UnmanagedType.LPWStr)]string newCabinetName, [MarshalAs(UnmanagedType.LPWStr)]string fileToken)
|
||||
{
|
||||
|
|
|
@ -55,7 +55,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
public List<ITrackedFile> GeneratedTemporaryFiles { get; } = new List<ITrackedFile>();
|
||||
|
||||
/// <summary>
|
||||
/// Whether to use a subdirectory based on the <paramref name="databaseFile"/> file name for intermediate files.
|
||||
/// Whether to use a subdirectory based on the database file name for intermediate files.
|
||||
/// </summary>
|
||||
private bool SuppressAddingValidationRows { get; }
|
||||
|
||||
|
|
|
@ -15,7 +15,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// <summary>
|
||||
/// Creates a transform by diffing two outputs.
|
||||
/// </summary>
|
||||
public sealed class GenerateTransformCommand
|
||||
internal class GenerateTransformCommand
|
||||
{
|
||||
private const char sectionDelimiter = '/';
|
||||
private readonly IMessaging messaging;
|
||||
|
@ -62,10 +62,6 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// <summary>
|
||||
/// Creates a transform by diffing two outputs.
|
||||
/// </summary>
|
||||
/// <param name="targetOutput">The target output.</param>
|
||||
/// <param name="updatedOutput">The updated output.</param>
|
||||
/// <param name="validationFlags"></param>
|
||||
/// <returns>The transform.</returns>
|
||||
public WindowsInstallerData Execute()
|
||||
{
|
||||
var targetOutput = this.TargetOutput;
|
||||
|
|
|
@ -384,7 +384,7 @@ namespace WixToolset.Core.WindowsInstaller.Bind
|
|||
/// <summary>
|
||||
/// Signal a warning if a non-keypath file was changed in a patch without also changing the keypath file of the component.
|
||||
/// </summary>
|
||||
/// <param name="output">The output to validate.</param>
|
||||
/// <param name="transform">The output to validate.</param>
|
||||
private void ValidateFileRowChanges(WindowsInstallerData transform)
|
||||
{
|
||||
var componentTable = transform.Tables["Component"];
|
||||
|
|
|
@ -248,19 +248,20 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
private XElement GetIndexedElement(string table, params string[] primaryKey) => this.IndexedElements[String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey))];
|
||||
|
||||
/// <summary>
|
||||
/// Gets the element corresponding to the primary key of the given table.
|
||||
/// Tries to get the element corresponding to the primary key of the given table.
|
||||
/// </summary>
|
||||
/// <param name="table">The table corresponding to the element.</param>
|
||||
/// <param name="primaryKey">The primary key corresponding to the element.</param>
|
||||
/// <returns>The indexed element.</returns>
|
||||
/// <param name="row">The table corresponding to the element.</param>
|
||||
/// <param name="xElement">The indexed element.</param>
|
||||
/// <returns>Whether the element was found.</returns>
|
||||
private bool TryGetIndexedElement(WixToolset.Data.WindowsInstaller.Row row, out XElement xElement) => this.TryGetIndexedElement(row.TableDefinition.Name, out xElement, row.GetPrimaryKey(DecompilerConstants.PrimaryKeyDelimiter));
|
||||
|
||||
/// <summary>
|
||||
/// Gets the element corresponding to the primary key of the given table.
|
||||
/// Tries to get the element corresponding to the primary key of the given table.
|
||||
/// </summary>
|
||||
/// <param name="table">The table corresponding to the element.</param>
|
||||
/// <param name="xElement">The indexed element.</param>
|
||||
/// <param name="primaryKey">The primary key corresponding to the element.</param>
|
||||
/// <returns>The indexed element.</returns>
|
||||
/// <returns>Whether the element was found.</returns>
|
||||
private bool TryGetIndexedElement(string table, out XElement xElement, params string[] primaryKey) => this.IndexedElements.TryGetValue(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), out xElement);
|
||||
|
||||
/// <summary>
|
||||
|
@ -276,8 +277,9 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// <summary>
|
||||
/// Index an element by its corresponding row.
|
||||
/// </summary>
|
||||
/// <param name="row">The row corresponding to the element.</param>
|
||||
/// <param name="element">The element to index.</param>
|
||||
/// <param name="table"></param>
|
||||
/// <param name="primaryKey"></param>
|
||||
private void IndexElement(XElement element, string table, params string[] primaryKey)
|
||||
{
|
||||
this.IndexedElements.Add(String.Concat(table, ':', String.Join(DecompilerConstants.PrimaryKeyDelimiterString, primaryKey)), element);
|
||||
|
@ -342,7 +344,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// Set the common control attributes in a control element.
|
||||
/// </summary>
|
||||
/// <param name="attributes">The control attributes.</param>
|
||||
/// <param name="control">The control element.</param>
|
||||
/// <param name="xControl">The control element.</param>
|
||||
private static void SetControlAttributes(int attributes, XElement xControl)
|
||||
{
|
||||
if (0 == (attributes & WindowsInstallerConstants.MsidbControlAttributesEnabled))
|
||||
|
@ -2424,6 +2426,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// Initialize decompilation.
|
||||
/// </summary>
|
||||
/// <param name="tables">The collection of all tables.</param>
|
||||
/// <param name="codepage"></param>
|
||||
private void InitializeDecompile(TableIndexedCollection tables, int codepage)
|
||||
{
|
||||
// reset all the state information
|
||||
|
@ -2983,7 +2986,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// <summary>
|
||||
/// Decompile the _SummaryInformation table.
|
||||
/// </summary>
|
||||
/// <param name="table">The table to decompile.</param>
|
||||
/// <param name="tables">The tables to decompile.</param>
|
||||
private void FinalizeSummaryInformationStream(TableIndexedCollection tables)
|
||||
{
|
||||
var table = tables["_SummaryInformation"];
|
||||
|
|
|
@ -177,7 +177,7 @@ namespace WixToolset.Core.WindowsInstaller.Msi
|
|||
/// <summary>
|
||||
/// Class exposing static functions and structs from MSI API.
|
||||
/// </summary>
|
||||
public sealed class MsiInterop
|
||||
internal sealed class MsiInterop
|
||||
{
|
||||
// Patching constants
|
||||
public const int MsiMaxStreamNameLength = 62; // http://msdn2.microsoft.com/library/aa370551.aspx
|
||||
|
|
|
@ -7,13 +7,13 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
using WixToolset.Data.WindowsInstaller;
|
||||
|
||||
/// <summary>
|
||||
/// A dictionary of rows. Unlike the <see cref="RowIndexedCollection"/> this
|
||||
/// A dictionary of rows. Unlike the RowIndexedList this
|
||||
/// will throw when multiple rows with the same key are added.
|
||||
/// </summary>
|
||||
public sealed class RowDictionary<T> : Dictionary<string, T> where T : Row
|
||||
internal sealed class RowDictionary<T> : Dictionary<string, T> where T : Row
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates an empty <see cref="RowDictionary"/>.
|
||||
/// Creates an empty <see cref="RowDictionary{T}"/>.
|
||||
/// </summary>
|
||||
public RowDictionary()
|
||||
: base(StringComparer.InvariantCulture)
|
||||
|
@ -21,9 +21,9 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and populates a <see cref="RowDictionary"/> with the rows from the given enumerator.
|
||||
/// Creates and populates a <see cref="RowDictionary{T}"/> with the rows from the given enumerator.
|
||||
/// </summary>
|
||||
/// <param name="Rows">Rows to add.</param>
|
||||
/// <param name="rows">Rows to add.</param>
|
||||
public RowDictionary(IEnumerable<T> rows)
|
||||
: this()
|
||||
{
|
||||
|
@ -34,7 +34,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Creates and populates a <see cref="RowDictionary"/> with the rows from the given <see cref="Table"/>.
|
||||
/// Creates and populates a <see cref="RowDictionary{T}"/> with the rows from the given <see cref="Table"/>.
|
||||
/// </summary>
|
||||
/// <param name="table">The table to index.</param>
|
||||
/// <remarks>
|
||||
|
|
|
@ -11,7 +11,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Unbinder core of the WiX toolset.
|
||||
/// </summary>
|
||||
public sealed class Unbinder
|
||||
internal sealed class Unbinder
|
||||
{
|
||||
public IEnumerable<IBackendFactory> BackendFactories { get; }
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
/// <summary>
|
||||
/// Runs internal consistency evaluators (ICEs) from cub files against a database.
|
||||
/// </summary>
|
||||
public sealed class Validator
|
||||
internal sealed class Validator
|
||||
{
|
||||
private string actionName;
|
||||
private StringCollection cubeFiles;
|
||||
|
|
|
@ -52,7 +52,7 @@ namespace WixToolset.Extensibility
|
|||
/// Called at the beginning of the validation of a database file.
|
||||
/// </summary>
|
||||
/// <remarks>
|
||||
/// <para>The <see cref="Validator"/> will set
|
||||
/// <para>The Validator will set
|
||||
/// <see cref="DatabaseFile"/> before calling InitializeValidator.</para>
|
||||
/// <para><b>Notes to Inheritors:</b> When overriding
|
||||
/// <b>InitializeValidator</b> in a derived class, be sure to call
|
||||
|
@ -83,7 +83,7 @@ namespace WixToolset.Extensibility
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a message from the <see cref="Validator"/>.
|
||||
/// Logs a message from the Validator.
|
||||
/// </summary>
|
||||
/// <param name="message">A <see cref="String"/> of tab-delmited tokens
|
||||
/// in the validation message.</param>
|
||||
|
@ -93,7 +93,7 @@ namespace WixToolset.Extensibility
|
|||
}
|
||||
|
||||
/// <summary>
|
||||
/// Logs a message from the <see cref="Validator"/>.
|
||||
/// Logs a message from the Validator.
|
||||
/// </summary>
|
||||
/// <param name="message">A <see cref="String"/> of tab-delmited tokens
|
||||
/// in the validation message.</param>
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
<Title>WiX Toolset Core Windows Installer</Title>
|
||||
<DebugType>embedded</DebugType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<CreateDocumentationFile>true</CreateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
@ -17,7 +18,7 @@
|
|||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="WixToolset.Core.Native" Version="4.0.*" />
|
||||
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" NoWarn="NU1701" />
|
||||
<PackageReference Include="WixToolset.Dtf.WindowsInstaller" Version="4.0.*" />
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -7,8 +7,16 @@ namespace WixToolset.Core.WindowsInstaller
|
|||
using WixToolset.Core.WindowsInstaller.ExtensibilityServices;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Extensions methods for adding WindowsInstaller services.
|
||||
/// </summary>
|
||||
public static class WixToolsetCoreServiceProviderExtensions
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds WindowsInstaller services.
|
||||
/// </summary>
|
||||
/// <param name="coreProvider"></param>
|
||||
/// <returns></returns>
|
||||
public static IWixToolsetCoreServiceProvider AddWindowsInstallerBackend(this IWixToolsetCoreServiceProvider coreProvider)
|
||||
{
|
||||
AddServices(coreProvider);
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind
|
|||
using WixToolset.Extensibility.Data;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
|
||||
public class ExtractEmbeddedFilesCommand
|
||||
{
|
||||
public ExtractEmbeddedFilesCommand(IBackendHelper backendHelper, IEnumerable<IExpectedExtractFile> embeddedFiles)
|
||||
|
|
|
@ -9,6 +9,7 @@ namespace WixToolset.Core.Bind
|
|||
using WixToolset.Data.WindowsInstaller;
|
||||
using WixToolset.Data.WindowsInstaller.Rows;
|
||||
|
||||
#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
|
||||
public class FileFacade
|
||||
{
|
||||
public FileFacade(FileSymbol file, AssemblySymbol assembly)
|
||||
|
|
|
@ -67,7 +67,7 @@ namespace WixToolset.Core.Bind
|
|||
/// Resolves the source path of a file using binder extensions.
|
||||
/// </summary>
|
||||
/// <param name="source">Original source value.</param>
|
||||
/// <param name="type">Optional type of source file being resolved.</param>
|
||||
/// <param name="symbolDefinition">Optional type of source file being resolved.</param>
|
||||
/// <param name="sourceLineNumbers">Optional source line of source file being resolved.</param>
|
||||
/// <param name="bindStage">The binding stage used to determine what collection of bind paths will be used</param>
|
||||
/// <param name="alreadyCheckedPaths">Optional collection of paths already checked.</param>
|
||||
|
|
|
@ -10,6 +10,7 @@ namespace WixToolset.Core.Bind
|
|||
using WixToolset.Extensibility.Data;
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
#pragma warning disable 1591 // TODO: this shouldn't be public, need interface in Extensibility
|
||||
/// <summary>
|
||||
/// Resolves the fields which had variables that needed to be resolved after the file information
|
||||
/// was loaded.
|
||||
|
@ -19,6 +20,7 @@ namespace WixToolset.Core.Bind
|
|||
/// <summary>
|
||||
/// Resolve delayed fields.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="delayedFields">The fields which had resolution delayed.</param>
|
||||
/// <param name="variableCache">The file information to use when resolving variables.</param>
|
||||
public ResolveDelayedFieldsCommand(IMessaging messaging, IEnumerable<IDelayedField> delayedFields, Dictionary<string, string> variableCache)
|
||||
|
|
|
@ -192,7 +192,6 @@ namespace WixToolset.Core.CommandLine
|
|||
/// or DirectoryInfo.GetFiles. The only way to get this directory path is manually since
|
||||
/// Path.GetDirectoryName does not support ".." in the path.
|
||||
/// </remarks>
|
||||
/// <exception cref="WixFileNotFoundException">Throws WixFileNotFoundException if no file matching the pattern can be found.</exception>
|
||||
private string[] GetFiles(string searchPath, string fileType)
|
||||
{
|
||||
if (null == searchPath)
|
||||
|
|
|
@ -21,9 +21,21 @@ namespace WixToolset.Core
|
|||
public static class Common
|
||||
{
|
||||
// TODO: Find a place to put all of these so they doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const string UpgradeDetectedProperty = "WIX_UPGRADE_DETECTED";
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const string UpgradePreventedCondition = "NOT WIX_UPGRADE_DETECTED";
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const string DowngradeDetectedProperty = "WIX_DOWNGRADE_DETECTED";
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public const string DowngradePreventedCondition = "NOT WIX_DOWNGRADE_DETECTED";
|
||||
|
||||
//-------------------------------------------------------------------------------------------------
|
||||
|
@ -51,6 +63,9 @@ namespace WixToolset.Core
|
|||
// GENERIC_WRITE (0x40000000L)
|
||||
// GENERIC_READ (0x80000000L)
|
||||
// TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly string[] GenericPermissions = { "GenericAll", "GenericExecute", "GenericWrite", "GenericRead" };
|
||||
|
||||
// Standard Access Rights (per WinNT.h)
|
||||
|
@ -61,6 +76,9 @@ namespace WixToolset.Core
|
|||
// WRITE_OWNER (0x00080000L)
|
||||
// SYNCHRONIZE (0x00100000L)
|
||||
// TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly string[] StandardPermissions = { "Delete", "ReadPermission", "ChangePermission", "TakeOwnership", "Synchronize" };
|
||||
|
||||
// Object-Specific Access Rights
|
||||
|
@ -77,11 +95,17 @@ namespace WixToolset.Core
|
|||
// FILE_READ_ATTRIBUTES ( 0x0080 )
|
||||
// FILE_WRITE_ATTRIBUTES ( 0x0100 )
|
||||
// TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly string[] FolderPermissions = { "Read", "CreateFile", "CreateChild", "ReadExtendedAttributes", "WriteExtendedAttributes", "Traverse", "DeleteChild", "ReadAttributes", "WriteAttributes" };
|
||||
|
||||
// Registry Access Rights (per TODO)
|
||||
// ----------------------
|
||||
// TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly string[] RegistryPermissions = { "Read", "Write", "CreateSubkeys", "EnumerateSubkeys", "Notify", "CreateLink" };
|
||||
|
||||
// File Access Rights (per WinNT.h)
|
||||
|
@ -99,6 +123,9 @@ namespace WixToolset.Core
|
|||
// STANDARD_RIGHTS_REQUIRED (0x000F0000L)
|
||||
// FILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | SYNCHRONIZE | 0x1FF)
|
||||
// TODO: Find a place to put this that it doesn't have to be public and exposed by WixToolset.Core.dll
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
public static readonly string[] FilePermissions = { "Read", "Write", "Append", "ReadExtendedAttributes", "WriteExtendedAttributes", "Execute", "FileAllRights", "ReadAttributes", "WriteAttributes" };
|
||||
|
||||
internal static readonly char[] IllegalLongFilenameCharacters = new[] { '\\', '/', '?', '*', '|', '>', '<', ':', '\"' }; // illegal: \ / ? | > < : / * "
|
||||
|
@ -596,10 +623,10 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Get an attribute value.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute containing the value to get.</param>
|
||||
/// <param name="emptyRule">A rule for the contents of the value. If the contents do not follow the rule, an error is thrown.</param>
|
||||
/// <param name="messageHandler">A delegate that receives error messages.</param>
|
||||
/// <returns>The attribute's value.</returns>
|
||||
internal static string GetAttributeValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, EmptyRule emptyRule)
|
||||
{
|
||||
|
@ -641,9 +668,9 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Get an identifier attribute value and displays an error for an illegal identifier value.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute containing the value to get.</param>
|
||||
/// <param name="messageHandler">A delegate that receives error messages.</param>
|
||||
/// <returns>The attribute's identifier value or a special value if an error occurred.</returns>
|
||||
internal static string GetAttributeIdentifierValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
|
||||
{
|
||||
|
@ -676,11 +703,11 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Get an integer attribute value and displays an error for an illegal integer value.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute containing the value to get.</param>
|
||||
/// <param name="minimum">The minimum legal value.</param>
|
||||
/// <param name="maximum">The maximum legal value.</param>
|
||||
/// <param name="messageHandler">A delegate that receives error messages.</param>
|
||||
/// <returns>The attribute's integer value or a special value if an error occurred during conversion.</returns>
|
||||
public static int GetAttributeIntegerValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute, int minimum, int maximum)
|
||||
{
|
||||
|
@ -715,9 +742,9 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Gets a yes/no value and displays an error for an illegal yes/no value.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute containing the value to get.</param>
|
||||
/// <param name="messageHandler">A delegate that receives error messages.</param>
|
||||
/// <returns>The attribute's YesNoType value.</returns>
|
||||
internal static YesNoType GetAttributeYesNoValue(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
|
||||
{
|
||||
|
@ -833,6 +860,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Display an unexpected attribute error.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute.</param>
|
||||
public static void UnexpectedAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute attribute)
|
||||
|
@ -848,6 +876,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Display an unsupported extension attribute error.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="extensionAttribute">The extension attribute.</param>
|
||||
internal static void UnsupportedExtensionAttribute(IMessaging messaging, SourceLineNumber sourceLineNumbers, XAttribute extensionAttribute)
|
||||
|
|
|
@ -886,7 +886,7 @@ namespace WixToolset.Core
|
|||
/// Parses an instance element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="componentId">Identifier of instance property.</param>
|
||||
/// <param name="propertyId">Identifier of instance property.</param>
|
||||
private void ParseInstanceElement(XElement node, string propertyId)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -1641,6 +1641,7 @@ namespace WixToolset.Core
|
|||
/// Parses a product search element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="propertyId"></param>
|
||||
/// <returns>Signature for search element.</returns>
|
||||
private void ParseProductSearchElement(XElement node, string propertyId)
|
||||
{
|
||||
|
@ -2570,6 +2571,8 @@ namespace WixToolset.Core
|
|||
/// Parses a component group element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType"></param>
|
||||
/// <param name="parentId"></param>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
private void ParseComponentGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
|
||||
{
|
||||
|
@ -5024,6 +5027,8 @@ namespace WixToolset.Core
|
|||
/// Parses a feature group element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType"></param>
|
||||
/// <param name="parentId"></param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
private void ParseFeatureGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
|
||||
{
|
||||
|
@ -5477,6 +5482,7 @@ namespace WixToolset.Core
|
|||
/// <param name="sourcePath">Default source path of parent directory.</param>
|
||||
/// <param name="possibleKeyPath">This will be set with the possible keyPath for the parent component.</param>
|
||||
/// <param name="win64Component">true if the component is 64-bit.</param>
|
||||
/// <param name="componentGuid"></param>
|
||||
/// <returns>Yes if this element was marked as the parent component's key path, No if explicitly marked as not being a key path, or NotSet otherwise.</returns>
|
||||
[SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
private YesNoType ParseFileElement(XElement node, string componentId, string directoryId, int diskId, string sourcePath, out string possibleKeyPath, bool win64Component, string componentGuid)
|
||||
|
@ -6934,7 +6940,7 @@ namespace WixToolset.Core
|
|||
/// Parses a MajorUpgrade element.
|
||||
/// </summary>
|
||||
/// <param name="node">The element to parse.</param>
|
||||
/// <param name="parentElement">The parent element.</param>
|
||||
/// <param name="contextValues">The current context.</param>
|
||||
private void ParseMajorUpgradeElement(XElement node, IDictionary<string, string> contextValues)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
|
|
@ -127,6 +127,8 @@ namespace WixToolset.Core
|
|||
/// Constructor for all compiler core.
|
||||
/// </summary>
|
||||
/// <param name="intermediate">The Intermediate object representing compiled source document.</param>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="parseHelper"></param>
|
||||
/// <param name="extensions">The WiX extensions collection.</param>
|
||||
internal CompilerCore(Intermediate intermediate, IMessaging messaging, IParseHelper parseHelper, Dictionary<XNamespace, ICompilerExtension> extensions)
|
||||
{
|
||||
|
@ -531,7 +533,7 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
/// <param name="sourceLineNumbers">Source line information about the owner element.</param>
|
||||
/// <param name="attribute">The attribute containing the value to get.</param>
|
||||
/// <param name="onlyAscii">Whether to allow Unicode (UCS) or UTF code pages.</param>
|
||||
/// <param name="onlyAnsi">Whether to allow Unicode (UCS) or UTF code pages.</param>
|
||||
/// <returns>A valid code page integer value or variable expression.</returns>
|
||||
[SuppressMessage("Microsoft.Design", "CA1059:MembersShouldNotExposeCertainConcreteTypes")]
|
||||
public string GetAttributeLocalizableCodePageValue(SourceLineNumber sourceLineNumbers, XAttribute attribute, bool onlyAnsi = false)
|
||||
|
@ -892,7 +894,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Create an identifier based on passed file name
|
||||
/// </summary>
|
||||
/// <param name="name">File name to generate identifer from</param>
|
||||
/// <param name="filename">File name to generate identifer from</param>
|
||||
/// <returns></returns>
|
||||
public Identifier CreateIdentifierFromFilename(string filename)
|
||||
{
|
||||
|
@ -935,7 +937,7 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
/// <param name="parentElement">Element containing element to be parsed.</param>
|
||||
/// <param name="element">Element to be parsed.</param>
|
||||
/// <param name="contextValues">Extra information about the context in which this element is being parsed.</param>
|
||||
/// <param name="context">Extra information about the context in which this element is being parsed.</param>
|
||||
public IComponentKeyPath ParsePossibleKeyPathExtensionElement(XElement parentElement, XElement element, IDictionary<string, string> context)
|
||||
{
|
||||
return this.parseHelper.ParsePossibleKeyPathExtensionElement(this.extensions.Values, this.intermediate, this.ActiveSection, parentElement, element, context);
|
||||
|
@ -1017,6 +1019,7 @@ namespace WixToolset.Core
|
|||
/// <param name="id">Unique identifier for the section.</param>
|
||||
/// <param name="type">Type of section to create.</param>
|
||||
/// <param name="codepage">Codepage for the resulting database for this ection.</param>
|
||||
/// <param name="compilationId"></param>
|
||||
/// <returns>New section.</returns>
|
||||
internal IntermediateSection CreateActiveSection(string id, SectionType type, int codepage, string compilationId)
|
||||
{
|
||||
|
@ -1034,6 +1037,7 @@ namespace WixToolset.Core
|
|||
/// <param name="id">Unique identifier for the section.</param>
|
||||
/// <param name="type">Type of section to create.</param>
|
||||
/// <param name="codepage">Codepage for the resulting database for this ection.</param>
|
||||
/// <param name="compilationId"></param>
|
||||
/// <returns>New section.</returns>
|
||||
internal IntermediateSection CreateSection(string id, SectionType type, int codepage, string compilationId)
|
||||
{
|
||||
|
|
|
@ -770,8 +770,10 @@ namespace WixToolset.Core
|
|||
/// Parses a package element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="productAuthor">Default package author.</param>
|
||||
/// <param name="moduleId">The module guid - this is necessary until Module/@Guid is removed.</param>
|
||||
/// <param name="isCodepageSet"></param>
|
||||
/// <param name="isPackageNameSet"></param>
|
||||
/// <param name="isKeywordsSet"></param>
|
||||
/// <param name="isPackageAuthorSet"></param>
|
||||
private void ParseSummaryInformationElement(XElement node, ref bool isCodepageSet, ref bool isPackageNameSet, ref bool isKeywordsSet, ref bool isPackageAuthorSet)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -3433,6 +3435,7 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="componentId">Identifier of parent component.</param>
|
||||
/// <param name="win64Component"></param>
|
||||
private void ParseServiceInstallElement(XElement node, string componentId, bool win64Component)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -4266,6 +4269,7 @@ namespace WixToolset.Core
|
|||
/// Parses a shortcut property element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="shortcutId"></param>
|
||||
private void ParseShortcutPropertyElement(XElement node, string shortcutId)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
|
|
@ -436,6 +436,7 @@ namespace WixToolset.Core
|
|||
/// Parse a Container element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="fileSystemSafeBundleName"></param>
|
||||
private string ParseLogElement(XElement node, string fileSystemSafeBundleName)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -706,6 +707,8 @@ namespace WixToolset.Core
|
|||
/// Parse the BoostrapperApplication element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
private Identifier ParseBootstrapperApplicationDllElement(XElement node, ComplexReferenceChildType previousType, Identifier previousId)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -1308,6 +1311,8 @@ namespace WixToolset.Core
|
|||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element. (BA or PayloadGroup)</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
private Identifier ParsePayloadElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId)
|
||||
{
|
||||
Debug.Assert(ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
|
||||
|
@ -1345,6 +1350,10 @@ namespace WixToolset.Core
|
|||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element.</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
/// <param name="required"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <returns>Whether SourceFile was specified.</returns>
|
||||
private bool ParsePayloadElementContent(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, bool required, out Identifier id)
|
||||
{
|
||||
|
@ -1519,9 +1528,21 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Creates the row for a Payload.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="sourceLineNumbers"></param>
|
||||
/// <param name="id"></param>
|
||||
/// <param name="name"></param>
|
||||
/// <param name="sourceFile"></param>
|
||||
/// <param name="downloadUrl"></param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
/// <param name="compressed"></param>
|
||||
/// <param name="enableSignatureVerification"></param>
|
||||
/// <param name="displayName"></param>
|
||||
/// <param name="description"></param>
|
||||
/// <param name="remotePayload"></param>
|
||||
/// <returns></returns>
|
||||
private WixBundlePayloadSymbol CreatePayloadRow(SourceLineNumber sourceLineNumbers, Identifier id, string name, string sourceFile, string downloadUrl, ComplexReferenceParentType parentType,
|
||||
Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId, YesNoDefaultType compressed, YesNoType enableSignatureVerification, string displayName, string description,
|
||||
RemotePayload remotePayload)
|
||||
|
@ -1640,6 +1661,8 @@ namespace WixToolset.Core
|
|||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element (BA or PayloadGroup).</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
private Identifier ParsePayloadGroupRefElement(XElement node, ComplexReferenceParentType parentType, Identifier parentId, ComplexReferenceChildType previousType, Identifier previousId)
|
||||
{
|
||||
Debug.Assert(ComplexReferenceParentType.Layout == parentType || ComplexReferenceParentType.PayloadGroup == parentType || ComplexReferenceParentType.Package == parentType || ComplexReferenceParentType.Container == parentType);
|
||||
|
@ -2513,6 +2536,7 @@ namespace WixToolset.Core
|
|||
/// Parse CommandLine element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse</param>
|
||||
/// <param name="packageId">Parent packageId</param>
|
||||
private void ParseCommandLineElement(XElement node, string packageId)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -2661,7 +2685,7 @@ namespace WixToolset.Core
|
|||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element (Unknown or PackageGroup).</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <returns>Identifier for package group element.</rereturns>
|
||||
/// <returns>Identifier for package group element.</returns>
|
||||
private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId)
|
||||
{
|
||||
return this.ParsePackageGroupRefElement(node, parentType, parentId, ComplexReferenceChildType.Unknown, null);
|
||||
|
@ -2673,9 +2697,9 @@ namespace WixToolset.Core
|
|||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of parent element (Unknown or PackageGroup).</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <param name="parentType">ComplexReferenceParentType of previous element (Unknown, Package, or PackageGroup).</param>
|
||||
/// <param name="parentId">Identifier of parent element.</param>
|
||||
/// <returns>Identifier for package group element.</rereturns>
|
||||
/// <param name="previousType"></param>
|
||||
/// <param name="previousId"></param>
|
||||
/// <returns>Identifier for package group element.</returns>
|
||||
private string ParsePackageGroupRefElement(XElement node, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType previousType, string previousId)
|
||||
{
|
||||
Debug.Assert(ComplexReferenceParentType.Unknown == parentType || ComplexReferenceParentType.PackageGroup == parentType || ComplexReferenceParentType.Container == parentType);
|
||||
|
@ -2740,6 +2764,7 @@ namespace WixToolset.Core
|
|||
/// <param name="sourceLineNumbers">Source line numbers.</param>
|
||||
/// <param name="id">Identifier for the rollback boundary.</param>
|
||||
/// <param name="vital">Indicates whether the rollback boundary is vital or not.</param>
|
||||
/// <param name="transaction">Indicates whether the rollback boundary will use an MSI transaction.</param>
|
||||
/// <param name="parentType">Type of parent group.</param>
|
||||
/// <param name="parentId">Identifier of parent group.</param>
|
||||
/// <param name="previousType">Type of previous item, if any.</param>
|
||||
|
|
|
@ -335,7 +335,6 @@ namespace WixToolset.Core
|
|||
/// Parses a embedded UI resource element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentId">Identifier of parent EmbeddedUI element.</param>
|
||||
private void ParseEmbeddedUIResourceElement(XElement node)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
|
|
@ -319,6 +319,8 @@ namespace WixToolset.Core
|
|||
/// Parses a PatchFamily element.
|
||||
/// </summary>
|
||||
/// <param name="node">The element to parse.</param>
|
||||
/// <param name="parentType"></param>
|
||||
/// <param name="parentId"></param>
|
||||
private void ParsePatchFamilyElement(XElement node, ComplexReferenceParentType parentType, string parentId)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
@ -444,6 +446,8 @@ namespace WixToolset.Core
|
|||
/// Parses a PatchFamilyGroup element.
|
||||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="parentType"></param>
|
||||
/// <param name="parentId"></param>
|
||||
[System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Performance", "CA1800:DoNotCastUnnecessarily")]
|
||||
private void ParsePatchFamilyGroupElement(XElement node, ComplexReferenceParentType parentType, string parentId)
|
||||
{
|
||||
|
|
|
@ -1049,12 +1049,11 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="dialog">Identifier for parent dialog.</param>
|
||||
/// <param name="table">Table control belongs in.</param>
|
||||
/// <param name="symbolType">Table control belongs in.</param>
|
||||
/// <param name="lastTabSymbol">Last control in the tab order.</param>
|
||||
/// <param name="firstControl">Name of the first control in the tab order.</param>
|
||||
/// <param name="defaultControl">Name of the default control.</param>
|
||||
/// <param name="cancelControl">Name of the candle control.</param>
|
||||
/// <param name="trackDiskSpace">True if the containing dialog tracks disk space.</param>
|
||||
private void ParseControlElement(XElement node, string dialog, SymbolDefinitionType symbolType, ref ControlSymbol lastTabSymbol, ref string firstControl, ref string defaultControl, ref string cancelControl)
|
||||
{
|
||||
var sourceLineNumbers = Preprocessor.GetSourceLineNumbers(node);
|
||||
|
|
|
@ -149,12 +149,6 @@ namespace WixToolset.Core.ExtensibilityServices
|
|||
return suffix == null ? null : name + suffix;
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public Identifier CreateRegistryRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
|
||||
{
|
||||
return this.CreateRegistrySymbol(section, sourceLineNumbers, root, key, name, value, componentId, escapeLeadingHash);
|
||||
}
|
||||
|
||||
public Identifier CreateRegistrySymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, RegistryRootType root, string key, string name, string value, string componentId, bool escapeLeadingHash)
|
||||
{
|
||||
if (RegistryRootType.Unknown == root)
|
||||
|
@ -220,12 +214,6 @@ namespace WixToolset.Core.ExtensibilityServices
|
|||
this.CreateSimpleReference(section, sourceLineNumbers, symbolDefinition.Name, primaryKeys);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public void CreateWixGroupRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
|
||||
{
|
||||
this.CreateWixGroupSymbol(section, sourceLineNumbers, parentType, parentId, childType, childId);
|
||||
}
|
||||
|
||||
public void CreateWixGroupSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, ComplexReferenceParentType parentType, string parentId, ComplexReferenceChildType childType, string childId)
|
||||
{
|
||||
if (null == parentId || ComplexReferenceParentType.Unknown == parentType)
|
||||
|
@ -284,18 +272,6 @@ namespace WixToolset.Core.ExtensibilityServices
|
|||
});
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, string tableName, Identifier identifier = null)
|
||||
{
|
||||
return this.CreateSymbol(section, sourceLineNumbers, tableName, identifier);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public IntermediateSymbol CreateRow(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
|
||||
{
|
||||
return this.CreateSymbol(section, sourceLineNumbers, symbolType, identifier);
|
||||
}
|
||||
|
||||
public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, string symbolName, Identifier identifier = null)
|
||||
{
|
||||
if (this.Creator == null)
|
||||
|
@ -311,14 +287,6 @@ namespace WixToolset.Core.ExtensibilityServices
|
|||
return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, SymbolDefinitionType symbolType, Identifier identifier = null)
|
||||
{
|
||||
var symbolDefinition = SymbolDefinitions.ByType(symbolType);
|
||||
|
||||
return this.CreateSymbol(section, sourceLineNumbers, symbolDefinition, identifier);
|
||||
}
|
||||
|
||||
public IntermediateSymbol CreateSymbol(IntermediateSection section, SourceLineNumber sourceLineNumbers, IntermediateSymbolDefinition symbolDefinition, Identifier identifier = null)
|
||||
{
|
||||
return section.AddSymbol(symbolDefinition.CreateSymbol(sourceLineNumbers, identifier));
|
||||
|
|
|
@ -17,7 +17,6 @@ namespace WixToolset.Core.ExtensibilityServices
|
|||
/// </summary>
|
||||
/// <param name="namespaceGuid">The namespace UUID.</param>
|
||||
/// <param name="value">The value.</param>
|
||||
/// <param name="backwardsCompatible">Flag to say to use MD5 instead of better SHA1.</param>
|
||||
/// <returns>The UUID for the given namespace and value.</returns>
|
||||
public static Guid NewUuid(Guid namespaceGuid, string value)
|
||||
{
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace WixToolset.Core
|
|||
{
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface IBinder
|
||||
internal interface IBinder
|
||||
{
|
||||
IBindResult Bind(IBindContext context);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// 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.Core
|
||||
{
|
||||
using WixToolset.Data;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface ICompiler
|
||||
internal interface ICompiler
|
||||
{
|
||||
Intermediate Compile(ICompileContext context);
|
||||
}
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace WixToolset.Core
|
|||
{
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface IDecompiler
|
||||
internal interface IDecompiler
|
||||
{
|
||||
IDecompileResult Decompile(IDecompileContext context);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
// 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.Core
|
||||
{
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface ILayoutCreator
|
||||
internal interface ILayoutCreator
|
||||
{
|
||||
void Layout(ILayoutContext context);
|
||||
}
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
// 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.Core
|
||||
{
|
||||
using WixToolset.Data;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface ILibrarian
|
||||
internal interface ILibrarian
|
||||
{
|
||||
Intermediate Combine(ILibraryContext context);
|
||||
}
|
||||
|
|
|
@ -1,10 +1,11 @@
|
|||
// 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.Core
|
||||
{
|
||||
using WixToolset.Data;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
#pragma warning disable 1591 // TODO: add documentation, move into Extensibility
|
||||
public interface ILinker
|
||||
{
|
||||
Intermediate Link(ILinkContext context);
|
||||
|
|
|
@ -5,6 +5,7 @@ namespace WixToolset.Core
|
|||
using System.Xml;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
#pragma warning disable 1591 // TODO: add documentation, move into Extensibility
|
||||
public interface IPreprocessor
|
||||
{
|
||||
IPreprocessResult Preprocess(IPreprocessContext context);
|
||||
|
|
|
@ -4,7 +4,7 @@ namespace WixToolset.Core
|
|||
{
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public interface IResolver
|
||||
internal interface IResolver
|
||||
{
|
||||
IResolveResult Resolve(IResolveContext context);
|
||||
}
|
||||
|
|
|
@ -10,10 +10,10 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
internal class Inscriber
|
||||
{
|
||||
/// <summary>
|
||||
/// Gets or sets the temp files collection.
|
||||
/// </summary>
|
||||
/// <value>The temp files collection.</value>
|
||||
// <summary>
|
||||
// Gets or sets the temp files collection.
|
||||
// </summary>
|
||||
// <value>The temp files collection.</value>
|
||||
// public TempFileCollection TempFiles
|
||||
// {
|
||||
// get { return this.tempFiles; }
|
||||
|
|
|
@ -85,7 +85,7 @@ namespace WixToolset.Core
|
|||
/// Writes the paths to the content files to a text file.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to write file.</param>
|
||||
/// <param name="contentFilePaths">Collection of paths to content files that will be written to file.</param>
|
||||
/// <param name="trackedFiles">Collection of paths to content files that will be written to file.</param>
|
||||
private void CreateContentsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
|
||||
{
|
||||
var uniqueInputFilePaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Input).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
|
||||
|
@ -111,7 +111,7 @@ namespace WixToolset.Core
|
|||
/// Writes the paths to the output files to a text file.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to write file.</param>
|
||||
/// <param name="fileTransfers">Collection of files that were transferred to the output directory.</param>
|
||||
/// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param>
|
||||
private void CreateOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
|
||||
{
|
||||
var uniqueOutputPaths = new SortedSet<string>(trackedFiles.Where(t => t.Clean).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
|
||||
|
@ -142,7 +142,7 @@ namespace WixToolset.Core
|
|||
/// Writes the paths to the built output files to a text file.
|
||||
/// </summary>
|
||||
/// <param name="path">Path to write file.</param>
|
||||
/// <param name="fileTransfers">Collection of files that were transferred to the output directory.</param>
|
||||
/// <param name="trackedFiles">Collection of files that were transferred to the output directory.</param>
|
||||
private void CreateBuiltOutputsFile(string path, IEnumerable<ITrackedFile> trackedFiles)
|
||||
{
|
||||
var uniqueBuiltPaths = new SortedSet<string>(trackedFiles.Where(t => t.Type == TrackedFileType.Final).Select(t => t.Path), StringComparer.OrdinalIgnoreCase);
|
||||
|
|
|
@ -18,6 +18,7 @@ namespace WixToolset.Core.Link
|
|||
/// <summary>
|
||||
/// Creates a symbol for a symbol.
|
||||
/// </summary>
|
||||
/// <param name="section"></param>
|
||||
/// <param name="symbol">Symbol for the symbol</param>
|
||||
public SymbolWithSection(IntermediateSection section, IntermediateSymbol symbol)
|
||||
{
|
||||
|
|
|
@ -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.Core.Link
|
||||
{
|
||||
|
@ -27,7 +27,8 @@ namespace WixToolset.Core.Link
|
|||
/// <summary>
|
||||
/// Compares two complex references without considering the primary bit.
|
||||
/// </summary>
|
||||
/// <param name="obj">Complex reference to compare to.</param>
|
||||
/// <param name="symbol">this</param>
|
||||
/// <param name="other">Complex reference to compare to.</param>
|
||||
/// <returns>Zero if the objects are equivalent, negative number if the provided object is less, positive if greater.</returns>
|
||||
public static int CompareToWithoutConsideringPrimary(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol other)
|
||||
{
|
||||
|
@ -57,6 +58,7 @@ namespace WixToolset.Core.Link
|
|||
/// <summary>
|
||||
/// Changes all of the parent references to point to the passed in parent reference.
|
||||
/// </summary>
|
||||
/// <param name="symbol">this</param>
|
||||
/// <param name="parent">New parent complex reference.</param>
|
||||
public static void Reparent(this WixComplexReferenceSymbol symbol, WixComplexReferenceSymbol parent)
|
||||
{
|
||||
|
|
|
@ -29,10 +29,8 @@ namespace WixToolset.Core.Link
|
|||
/// <summary>
|
||||
/// Creates a WixGroupingOrdering object.
|
||||
/// </summary>
|
||||
/// <param name="output">Output from which to read the group and order information.</param>
|
||||
/// <param name="entrySections">Output from which to read the group and order information.</param>
|
||||
/// <param name="messageHandler">Handler for any error messages.</param>
|
||||
/// <param name="groupTypes">Group types to include.</param>
|
||||
/// <param name="itemTypes">Item types to include.</param>
|
||||
public WixGroupingOrdering(IntermediateSection entrySections, IMessaging messageHandler)
|
||||
{
|
||||
this.EntrySection = entrySections;
|
||||
|
@ -582,7 +580,7 @@ namespace WixToolset.Core.Link
|
|||
/// <summary>
|
||||
/// Adds an item to the 'after' ordering collection.
|
||||
/// </summary>
|
||||
/// <param name="item">Items to add.</param>
|
||||
/// <param name="after">Item to add.</param>
|
||||
/// <param name="messageHandler">Message handler in case a circular ordering reference is found.</param>
|
||||
public void AddAfter(Item after, IMessaging messageHandler)
|
||||
{
|
||||
|
|
|
@ -1219,7 +1219,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Flattens the tables used in a Bundle.
|
||||
/// </summary>
|
||||
/// <param name="output">Output containing the tables to process.</param>
|
||||
/// <param name="entrySection">Output containing the tables to process.</param>
|
||||
private void FlattenBundleTables(IntermediateSection entrySection)
|
||||
{
|
||||
if (SectionType.Bundle != entrySection.Type)
|
||||
|
|
|
@ -63,6 +63,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Adds a WixVariableRow to a dictionary while performing the expected override checks.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="variables">Dictionary of variable rows.</param>
|
||||
/// <param name="wixVariableRow">Row to add to the variables dictionary.</param>
|
||||
private static void AddWixVariable(IMessaging messaging, IDictionary<string, BindVariable> variables, BindVariable wixVariableRow)
|
||||
|
@ -80,6 +81,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Parses the WixLocalization element.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
private static Localization ParseWixLocalizationElement(IMessaging messaging, XElement node)
|
||||
{
|
||||
|
@ -147,7 +149,9 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Parse a localization string into a WixVariableRow.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="variables"></param>
|
||||
private static void ParseString(IMessaging messaging, XElement node, IDictionary<string, BindVariable> variables)
|
||||
{
|
||||
string id = null;
|
||||
|
@ -208,6 +212,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Parse a localized control.
|
||||
/// </summary>
|
||||
/// <param name="messaging"></param>
|
||||
/// <param name="node">Element to parse.</param>
|
||||
/// <param name="localizedControls">Dictionary of localized controls.</param>
|
||||
private static void ParseUI(IMessaging messaging, XElement node, IDictionary<string, LocalizedControl> localizedControls)
|
||||
|
|
|
@ -1,19 +1,34 @@
|
|||
// 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.Core
|
||||
{
|
||||
using System;
|
||||
|
||||
//
|
||||
// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags:
|
||||
//
|
||||
/// <summary>
|
||||
/// The following flags are used with PATCH_OPTION_DATA SymbolOptionFlags:
|
||||
/// </summary>
|
||||
[Flags]
|
||||
public enum PatchSymbolFlagsType : uint
|
||||
{
|
||||
PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001, // don't use imagehlp.dll
|
||||
PATCH_SYMBOL_NO_FAILURES = 0x00000002, // don't fail patch due to imagehlp failures
|
||||
PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004, // after matching decorated symbols, try to match remaining by undecorated names
|
||||
PATCH_SYMBOL_RESERVED1 = 0x80000000, // (used internally)
|
||||
/// <summary>
|
||||
/// don't use imagehlp.dll
|
||||
/// </summary>
|
||||
PATCH_SYMBOL_NO_IMAGEHLP = 0x00000001,
|
||||
/// <summary>
|
||||
/// don't fail patch due to imagehlp failures
|
||||
/// </summary>
|
||||
PATCH_SYMBOL_NO_FAILURES = 0x00000002,
|
||||
/// <summary>
|
||||
/// after matching decorated symbols, try to match remaining by undecorated names
|
||||
/// </summary>
|
||||
PATCH_SYMBOL_UNDECORATED_TOO = 0x00000004,
|
||||
/// <summary>
|
||||
/// (used internally)
|
||||
/// </summary>
|
||||
PATCH_SYMBOL_RESERVED1 = 0x80000000,
|
||||
/// <summary>
|
||||
///
|
||||
/// </summary>
|
||||
MaxValue = PATCH_SYMBOL_NO_IMAGEHLP | PATCH_SYMBOL_NO_FAILURES | PATCH_SYMBOL_UNDECORATED_TOO
|
||||
}
|
||||
}
|
||||
|
|
|
@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess
|
|||
using System;
|
||||
using WixToolset.Data;
|
||||
|
||||
public delegate void IfDefEventHandler(object sender, IfDefEventArgs e);
|
||||
internal delegate void IfDefEventHandler(object sender, IfDefEventArgs e);
|
||||
|
||||
public class IfDefEventArgs : EventArgs
|
||||
internal class IfDefEventArgs : EventArgs
|
||||
{
|
||||
public IfDefEventArgs(SourceLineNumber sourceLineNumbers, bool isIfDef, bool isDefined, string variableName)
|
||||
{
|
||||
|
|
|
@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess
|
|||
/// Included file event handler delegate.
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender of the message.</param>
|
||||
/// <param name="ea">Arguments for the included file event.</param>
|
||||
public delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e);
|
||||
/// <param name="e">Arguments for the included file event.</param>
|
||||
internal delegate void IncludedFileEventHandler(object sender, IncludedFileEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Event args for included file event.
|
||||
/// </summary>
|
||||
public class IncludedFileEventArgs : EventArgs
|
||||
internal class IncludedFileEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new IncludedFileEventArgs.
|
||||
|
|
|
@ -9,13 +9,13 @@ namespace WixToolset.Core.Preprocess
|
|||
/// Preprocessed output stream event handler delegate.
|
||||
/// </summary>
|
||||
/// <param name="sender">Sender of the message.</param>
|
||||
/// <param name="ea">Arguments for the preprocessed stream event.</param>
|
||||
public delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e);
|
||||
/// <param name="e">Arguments for the preprocessed stream event.</param>
|
||||
internal delegate void ProcessedStreamEventHandler(object sender, ProcessedStreamEventArgs e);
|
||||
|
||||
/// <summary>
|
||||
/// Event args for preprocessed stream event.
|
||||
/// </summary>
|
||||
public class ProcessedStreamEventArgs : EventArgs
|
||||
internal class ProcessedStreamEventArgs : EventArgs
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new ProcessedStreamEventArgs.
|
||||
|
|
|
@ -5,9 +5,9 @@ namespace WixToolset.Core.Preprocess
|
|||
using System;
|
||||
using WixToolset.Data;
|
||||
|
||||
public delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e);
|
||||
internal delegate void ResolvedVariableEventHandler(object sender, ResolvedVariableEventArgs e);
|
||||
|
||||
public class ResolvedVariableEventArgs : EventArgs
|
||||
internal class ResolvedVariableEventArgs : EventArgs
|
||||
{
|
||||
public ResolvedVariableEventArgs(SourceLineNumber sourceLineNumbers, string variableName, string variableValue)
|
||||
{
|
||||
|
|
|
@ -6,7 +6,7 @@ namespace WixToolset.Core
|
|||
using System.Xml.Linq;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public class PreprocessResult : IPreprocessResult
|
||||
internal class PreprocessResult : IPreprocessResult
|
||||
{
|
||||
public XDocument Document { get; set; }
|
||||
|
||||
|
|
|
@ -63,10 +63,10 @@ namespace WixToolset.Core
|
|||
/// </summary>
|
||||
public event ProcessedStreamEventHandler ProcessedStream;
|
||||
|
||||
/// <summary>
|
||||
/// Event for resolved variables.
|
||||
/// </summary>
|
||||
/// TOOD: Remove?
|
||||
// <summary>
|
||||
// Event for resolved variables.
|
||||
// </summary>
|
||||
// TOOD: Remove?
|
||||
//public event ResolvedVariableEventHandler ResolvedVariable;
|
||||
|
||||
/// <summary>
|
||||
|
@ -134,7 +134,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Preprocesses a file.
|
||||
/// </summary>
|
||||
/// <param name="context">The preprocessing context.</param>
|
||||
/// <param name="state">The preprocessing context.</param>
|
||||
/// <param name="reader">XmlReader to processing the context.</param>
|
||||
/// <returns>XDocument with the postprocessed data.</returns>
|
||||
private IPreprocessResult Process(ProcessingState state, XmlReader reader)
|
||||
|
@ -266,6 +266,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes an xml reader into an xml writer.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="include">Specifies if reader is from an included file.</param>
|
||||
/// <param name="reader">Reader for the source document.</param>
|
||||
/// <param name="container">Node where content should be added.</param>
|
||||
|
@ -546,6 +547,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes an error processing instruction.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="errorMessage">Text from source.</param>
|
||||
private void PreprocessError(ProcessingState state, string errorMessage)
|
||||
{
|
||||
|
@ -558,6 +560,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes a warning processing instruction.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="warningMessage">Text from source.</param>
|
||||
private void PreprocessWarning(ProcessingState state, string warningMessage)
|
||||
{
|
||||
|
@ -570,6 +573,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes a define processing instruction and creates the appropriate parameter.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalDefine">Text from source.</param>
|
||||
private void PreprocessDefine(ProcessingState state, string originalDefine)
|
||||
{
|
||||
|
@ -607,6 +611,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes an undef processing instruction and creates the appropriate parameter.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalDefine">Text from source.</param>
|
||||
private void PreprocessUndef(ProcessingState state, string originalDefine)
|
||||
{
|
||||
|
@ -625,6 +630,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes an included file.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="includePath">Path to included file.</param>
|
||||
/// <param name="parent">Parent container for included content.</param>
|
||||
private void PreprocessInclude(ProcessingState state, string includePath, XContainer parent)
|
||||
|
@ -671,6 +677,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Preprocess a foreach processing instruction.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="reader">The xml reader.</param>
|
||||
/// <param name="container">The container where to output processed data.</param>
|
||||
/// <param name="offset">Offset for the line numbers.</param>
|
||||
|
@ -785,7 +792,9 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Processes a pragma processing instruction
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="pragmaText">Text from source.</param>
|
||||
/// <param name="parent"></param>
|
||||
private void PreprocessPragma(ProcessingState state, string pragmaText, XContainer parent)
|
||||
{
|
||||
var match = PragmaRegex.Match(pragmaText);
|
||||
|
@ -811,6 +820,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Gets the next token in an expression.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">Expression to parse.</param>
|
||||
/// <param name="expression">Expression with token removed.</param>
|
||||
/// <param name="stringLiteral">Flag if token is a string literal instead of a variable.</param>
|
||||
|
@ -958,6 +968,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Gets the value for a variable.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">Original expression for error message.</param>
|
||||
/// <param name="variable">Variable to evaluate.</param>
|
||||
/// <returns>Value of variable.</returns>
|
||||
|
@ -996,6 +1007,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Gets the left side value, operator, and right side value of an expression.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">Original expression to evaluate.</param>
|
||||
/// <param name="expression">Expression modified while processing.</param>
|
||||
/// <param name="leftValue">Left side value from expression.</param>
|
||||
|
@ -1048,6 +1060,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Evaluates an expression.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">Original expression to evaluate.</param>
|
||||
/// <param name="expression">Expression modified while processing.</param>
|
||||
/// <returns>true if expression evaluates to true.</returns>
|
||||
|
@ -1143,6 +1156,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Gets a sub-expression in parenthesis.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">Original expression to evaluate.</param>
|
||||
/// <param name="expression">Expression modified while processing.</param>
|
||||
/// <param name="endSubExpression">Index of end of sub-expression.</param>
|
||||
|
@ -1197,6 +1211,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Updates expression based on operation.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="currentValue">State to update.</param>
|
||||
/// <param name="operation">Operation to apply to current value.</param>
|
||||
/// <param name="prevResult">Previous result.</param>
|
||||
|
@ -1221,6 +1236,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Evaluate an expression.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="expression">Expression to evaluate.</param>
|
||||
/// <returns>Boolean result of expression.</returns>
|
||||
private bool EvaluateExpression(ProcessingState state, string expression)
|
||||
|
@ -1252,6 +1268,7 @@ namespace WixToolset.Core
|
|||
/// $(var.A) and $(var.B)>2 or $(var.B) <= 2
|
||||
/// $(var.A) != "2"
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="originalExpression">The original expression</param>
|
||||
/// <param name="expression">The expression currently being evaluated</param>
|
||||
/// <param name="prevResultOperation">The operation to apply to this result</param>
|
||||
|
@ -1322,6 +1339,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Update the current line number with the reader's current state.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="reader">The xml reader for the preprocessor.</param>
|
||||
/// <param name="offset">This is the artificial offset of the line numbers from the reader. Used for the foreach processing.</param>
|
||||
private void UpdateCurrentLineNumber(ProcessingState state, XmlReader reader, int offset)
|
||||
|
@ -1341,6 +1359,7 @@ namespace WixToolset.Core
|
|||
/// <summary>
|
||||
/// Pushes a file name on the stack of included files.
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="fileName">Name to push on to the stack of included files.</param>
|
||||
private void PushInclude(ProcessingState state, string fileName)
|
||||
{
|
||||
|
@ -1374,6 +1393,7 @@ namespace WixToolset.Core
|
|||
/// through the search paths in the order given on the command line
|
||||
/// (leftmost first, ...).
|
||||
/// </summary>
|
||||
/// <param name="state"></param>
|
||||
/// <param name="includePath">User-specified path to the included file (usually just the file name).</param>
|
||||
/// <returns>Returns a FileInfo for the found include file, or null if the file cannot be found.</returns>
|
||||
private string GetIncludeFile(ProcessingState state, string includePath)
|
||||
|
|
|
@ -5,7 +5,7 @@ namespace WixToolset.Core
|
|||
using System.Collections.Generic;
|
||||
using WixToolset.Extensibility.Data;
|
||||
|
||||
public class ResolveFileResult : IResolveFileResult
|
||||
internal class ResolveFileResult : IResolveFileResult
|
||||
{
|
||||
public string Path { get; set; }
|
||||
|
||||
|
|
|
@ -9,6 +9,8 @@
|
|||
<Title>WiX Toolset Core</Title>
|
||||
<DebugType>embedded</DebugType>
|
||||
<PublishRepositoryUrl>true</PublishRepositoryUrl>
|
||||
<NBGV_EmitThisAssemblyClass>true</NBGV_EmitThisAssemblyClass>
|
||||
<CreateDocumentationFile>true</CreateDocumentationFile>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
|
|
|
@ -4,8 +4,15 @@ namespace WixToolset.Core
|
|||
{
|
||||
using WixToolset.Extensibility.Services;
|
||||
|
||||
/// <summary>
|
||||
/// Class for creating <see cref="IWixToolsetCoreServiceProvider"/>.
|
||||
/// </summary>
|
||||
public static class WixToolsetServiceProviderFactory
|
||||
{
|
||||
/// <summary>
|
||||
/// Creates a new <see cref="IWixToolsetCoreServiceProvider"/>.
|
||||
/// </summary>
|
||||
/// <returns>The created <see cref="IWixToolsetCoreServiceProvider"/></returns>
|
||||
public static IWixToolsetCoreServiceProvider CreateServiceProvider()
|
||||
{
|
||||
return new WixToolsetServiceProvider();
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace WixToolsetTest.CoreIntegration
|
|||
using System.IO;
|
||||
using System.Linq;
|
||||
using WixBuildTools.TestSupport;
|
||||
using WixToolset.Core.Burn.Bundles;
|
||||
using WixToolset.Core.TestPackage;
|
||||
using WixToolset.Data;
|
||||
using WixToolset.Data.Symbols;
|
||||
|
@ -109,8 +108,10 @@ namespace WixToolsetTest.CoreIntegration
|
|||
|
||||
Assert.InRange(result.ExitCode, 2, int.MaxValue);
|
||||
|
||||
Assert.Equal(1, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count());
|
||||
Assert.Equal(2, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count());
|
||||
var expectedIllegalRelativeLongFileName = 1;
|
||||
var expectedPayloadMustBeRelativeToCache = 2;
|
||||
Assert.Equal(expectedIllegalRelativeLongFileName, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.IllegalRelativeLongFilename).Count());
|
||||
Assert.Equal(expectedPayloadMustBeRelativeToCache, result.Messages.Where(m => m.Id == (int)ErrorMessages.Ids.PayloadMustBeRelativeToCache).Count());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -8,10 +8,6 @@
|
|||
<DebugType>embedded</DebugType>
|
||||
</PropertyGroup>
|
||||
|
||||
<PropertyGroup>
|
||||
<NoWarn>NU1701</NoWarn>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Content Include="TestData\.Data\burn.exe" CopyToOutputDirectory="PreserveNewest" />
|
||||
<Content Include="TestData\AppId\Advertised.wxs" CopyToOutputDirectory="PreserveNewest" />
|
||||
|
|
Загрузка…
Ссылка в новой задаче