From 50fe3d149a101b2569647689673fa01d67ff5267 Mon Sep 17 00:00:00 2001 From: Bob Arnson Date: Thu, 24 Apr 2025 21:32:49 -0400 Subject: Remove deprecated Heat. Fixes https://github.com/wixtoolset/issues/issues/9039 --- src/tools/heat/Program.cs | 88 ----------------------------------------------- 1 file changed, 88 deletions(-) delete mode 100644 src/tools/heat/Program.cs (limited to 'src/tools/heat/Program.cs') diff --git a/src/tools/heat/Program.cs b/src/tools/heat/Program.cs deleted file mode 100644 index 80423e18..00000000 --- a/src/tools/heat/Program.cs +++ /dev/null @@ -1,88 +0,0 @@ -// 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.Tools.Heat -{ - using System; - using System.Runtime.InteropServices; - using System.Threading; - using System.Threading.Tasks; - using WixToolset.Core; - using WixToolset.Data; - using WixToolset.Extensibility; - using WixToolset.Extensibility.Data; - using WixToolset.Extensibility.Services; - using WixToolset.Harvesters; - using WixToolset.Harvesters.Data; - using WixToolset.Harvesters.Extensibility; - using WixToolset.Tools.Core; - - /// - /// Wix Toolset Harvester. - /// - public sealed class Program - { - /// - /// The main entry point for the application. - /// - /// Commandline arguments for the application. - /// Returns the application error code. - [MTAThread] - public static async Task Main(string[] args) - { - var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); - var listener = new ConsoleMessageListener("HEAT", "heat.exe"); - - try - { - var program = new Program(); - return await program.Run(serviceProvider, listener, args); - } - catch (WixException e) - { - listener.Write(e.Error); - - return e.Error.Id; - } - catch (Exception e) - { - listener.Write(ErrorMessages.UnexpectedException(e)); - - if (e is NullReferenceException || e is SEHException) - { - throw; - } - - return e.HResult; - } - } - - /// - /// Run the application with the given arguments. - /// - /// Service provider to use throughout this execution. - /// The commandline arguments. - /// Returns the application error code. - public Task Run(IServiceProvider serviceProvider, IMessageListener listener, string[] args) - { - var messaging = serviceProvider.GetService(); - messaging.SetListener(listener); - - var arguments = serviceProvider.GetService(); - arguments.Populate(args); - - var extensionManager = serviceProvider.GetService(); - foreach (var extension in arguments.Extensions) - { - extensionManager.Load(extension); - } - var heatExtensions = extensionManager.GetServices(); - - var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider, heatExtensions); - var command = commandLine.ParseStandardCommandLine(arguments); - - messaging.Write(HarvesterWarnings.HeatIsDeprecated()); - - return command?.ExecuteAsync(CancellationToken.None) ?? Task.FromResult(1); - } - } -} -- cgit v1.2.3-55-g6feb