From d3d3649a68cb1fa589fdd987a6690dbd5d671f0d Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Sun, 17 Sep 2017 15:35:20 -0700 Subject: Initial code commit --- .../Bind/Bundles/ProcessExePackageCommand.cs | 33 ++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 src/WixToolset.Core/Bind/Bundles/ProcessExePackageCommand.cs (limited to 'src/WixToolset.Core/Bind/Bundles/ProcessExePackageCommand.cs') diff --git a/src/WixToolset.Core/Bind/Bundles/ProcessExePackageCommand.cs b/src/WixToolset.Core/Bind/Bundles/ProcessExePackageCommand.cs new file mode 100644 index 00000000..a1e7c271 --- /dev/null +++ b/src/WixToolset.Core/Bind/Bundles/ProcessExePackageCommand.cs @@ -0,0 +1,33 @@ +// 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.Bind.Bundles +{ + using System; + using WixToolset.Data; + using WixToolset.Data.Rows; + + /// + /// Initializes package state from the Exe contents. + /// + internal class ProcessExePackageCommand : ICommand + { + public RowDictionary AuthoredPayloads { private get; set; } + + public PackageFacade Facade { private get; set; } + + /// + /// Processes the Exe packages to add properties and payloads from the Exe packages. + /// + public void Execute() + { + WixBundlePayloadRow packagePayload = this.AuthoredPayloads.Get(this.Facade.Package.PackagePayload); + + if (String.IsNullOrEmpty(this.Facade.Package.CacheId)) + { + this.Facade.Package.CacheId = packagePayload.Hash; + } + + this.Facade.Package.Version = packagePayload.Version; + } + } +} -- cgit v1.2.3-55-g6feb