diff options
-rw-r--r-- | Tools.sln | 14 | ||||
-rw-r--r-- | appveyor.cmd | 3 | ||||
-rw-r--r-- | src/heat/Program.cs | 74 | ||||
-rw-r--r-- | src/heat/heat.csproj | 34 | ||||
-rw-r--r-- | src/heat/heat.net461.v3.ncrunchproject | 5 | ||||
-rw-r--r-- | src/heat/heat.netcoreapp2.1.v3.ncrunchproject | 5 |
6 files changed, 133 insertions, 2 deletions
@@ -1,7 +1,7 @@ | |||
1 | | 1 | |
2 | Microsoft Visual Studio Solution File, Format Version 12.00 | 2 | Microsoft Visual Studio Solution File, Format Version 12.00 |
3 | # Visual Studio 15 | 3 | # Visual Studio Version 16 |
4 | VisualStudioVersion = 15.0.26124.0 | 4 | VisualStudioVersion = 16.0.30011.22 |
5 | MinimumVisualStudioVersion = 15.0.26124.0 | 5 | MinimumVisualStudioVersion = 15.0.26124.0 |
6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BuildTasks", "src\test\WixToolsetTest.BuildTasks\WixToolsetTest.BuildTasks.csproj", "{4B0098A4-B581-4D04-BA1E-6DC2370A7D43}" | 6 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.BuildTasks", "src\test\WixToolsetTest.BuildTasks\WixToolsetTest.BuildTasks.csproj", "{4B0098A4-B581-4D04-BA1E-6DC2370A7D43}" |
7 | EndProject | 7 | EndProject |
@@ -26,6 +26,8 @@ Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "WixToolsetTest.WixCop", "sr | |||
26 | EndProject | 26 | EndProject |
27 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "src\thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" | 27 | Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "thmviewer", "src\thmviewer\thmviewer.vcxproj", "{95228C13-97F5-484A-B4A2-ECF4618B0881}" |
28 | EndProject | 28 | EndProject |
29 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "heat", "src\heat\heat.csproj", "{B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}" | ||
30 | EndProject | ||
29 | Global | 31 | Global |
30 | GlobalSection(SolutionConfigurationPlatforms) = preSolution | 32 | GlobalSection(SolutionConfigurationPlatforms) = preSolution |
31 | Debug|Any CPU = Debug|Any CPU | 33 | Debug|Any CPU = Debug|Any CPU |
@@ -104,6 +106,14 @@ Global | |||
104 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32 | 106 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|Any CPU.ActiveCfg = Release|Win32 |
105 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32 | 107 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.ActiveCfg = Release|Win32 |
106 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32 | 108 | {95228C13-97F5-484A-B4A2-ECF4618B0881}.Release|x86.Build.0 = Release|Win32 |
109 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU | ||
110 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|Any CPU.Build.0 = Debug|Any CPU | ||
111 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|x86.ActiveCfg = Debug|Any CPU | ||
112 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Debug|x86.Build.0 = Debug|Any CPU | ||
113 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|Any CPU.ActiveCfg = Release|Any CPU | ||
114 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|Any CPU.Build.0 = Release|Any CPU | ||
115 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|x86.ActiveCfg = Release|Any CPU | ||
116 | {B1F18B6F-FBD8-4911-B3BF-40D801DA77D7}.Release|x86.Build.0 = Release|Any CPU | ||
107 | EndGlobalSection | 117 | EndGlobalSection |
108 | GlobalSection(SolutionProperties) = preSolution | 118 | GlobalSection(SolutionProperties) = preSolution |
109 | HideSolutionNode = FALSE | 119 | HideSolutionNode = FALSE |
diff --git a/appveyor.cmd b/appveyor.cmd index d0dcee83..0071045f 100644 --- a/appveyor.cmd +++ b/appveyor.cmd | |||
@@ -8,6 +8,9 @@ dotnet test -c Release src\test\WixToolsetTest.BuildTasks | |||
8 | dotnet test -c Release src\test\WixToolsetTest.WixCop | 8 | dotnet test -c Release src\test\WixToolsetTest.WixCop |
9 | 9 | ||
10 | dotnet publish -c Release -o %_P%\dotnet-wix\ -f netcoreapp2.1 src\wix | 10 | dotnet publish -c Release -o %_P%\dotnet-wix\ -f netcoreapp2.1 src\wix |
11 | @rem dotnet publish -c Release -o %_P%\netfx-heat\ -f net461 src\heat | ||
12 | @rem dotnet publish -c Release -o %_P%\netfx-wix\ -f net461 src\wix | ||
13 | @rem dotnet publish -c Release -o %_P%\netfx-wixcop\ -f net461 src\wixcop | ||
11 | dotnet publish -c Release -o %_P%\WixToolset.MSBuild\net461\ -f net461 src\WixToolset.BuildTasks | 14 | dotnet publish -c Release -o %_P%\WixToolset.MSBuild\net461\ -f net461 src\WixToolset.BuildTasks |
12 | dotnet publish -c Release -o %_P%\WixToolset.MSBuild\netcoreapp2.1\ -f netcoreapp2.1 src\WixToolset.BuildTasks | 15 | dotnet publish -c Release -o %_P%\WixToolset.MSBuild\netcoreapp2.1\ -f netcoreapp2.1 src\WixToolset.BuildTasks |
13 | 16 | ||
diff --git a/src/heat/Program.cs b/src/heat/Program.cs new file mode 100644 index 00000000..38d6d401 --- /dev/null +++ b/src/heat/Program.cs | |||
@@ -0,0 +1,74 @@ | |||
1 | // 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. | ||
2 | |||
3 | namespace WixToolset.Tools.Heat | ||
4 | { | ||
5 | using System; | ||
6 | using System.Runtime.InteropServices; | ||
7 | using WixToolset.Core; | ||
8 | using WixToolset.Data; | ||
9 | using WixToolset.Extensibility; | ||
10 | using WixToolset.Extensibility.Data; | ||
11 | using WixToolset.Extensibility.Services; | ||
12 | using WixToolset.Harvesters; | ||
13 | using WixToolset.Tools.Core; | ||
14 | |||
15 | /// <summary> | ||
16 | /// Wix Toolset Harvester. | ||
17 | /// </summary> | ||
18 | public sealed class Program | ||
19 | { | ||
20 | /// <summary> | ||
21 | /// The main entry point for the application. | ||
22 | /// </summary> | ||
23 | /// <param name="args">Commandline arguments for the application.</param> | ||
24 | /// <returns>Returns the application error code.</returns> | ||
25 | [MTAThread] | ||
26 | public static int Main(string[] args) | ||
27 | { | ||
28 | var serviceProvider = WixToolsetServiceProviderFactory.CreateServiceProvider(); | ||
29 | var listener = new ConsoleMessageListener("HEAT", "heat.exe"); | ||
30 | |||
31 | try | ||
32 | { | ||
33 | var program = new Program(); | ||
34 | return program.Run(serviceProvider, listener, args); | ||
35 | } | ||
36 | catch (WixException e) | ||
37 | { | ||
38 | listener.Write(e.Error); | ||
39 | |||
40 | return e.Error.Id; | ||
41 | } | ||
42 | catch (Exception e) | ||
43 | { | ||
44 | listener.Write(ErrorMessages.UnexpectedException(e)); | ||
45 | |||
46 | if (e is NullReferenceException || e is SEHException) | ||
47 | { | ||
48 | throw; | ||
49 | } | ||
50 | |||
51 | return e.HResult; | ||
52 | } | ||
53 | } | ||
54 | |||
55 | /// <summary> | ||
56 | /// Run the application with the given arguments. | ||
57 | /// </summary> | ||
58 | /// <param name="serviceProvider">Service provider to use throughout this execution.</param> | ||
59 | /// <param name="args">The commandline arguments.</param> | ||
60 | /// <returns>Returns the application error code.</returns> | ||
61 | public int Run(IWixToolsetServiceProvider serviceProvider, IMessageListener listener, string[] args) | ||
62 | { | ||
63 | var messaging = serviceProvider.GetService<IMessaging>(); | ||
64 | messaging.SetListener(listener); | ||
65 | |||
66 | var arguments = serviceProvider.GetService<ICommandLineArguments>(); | ||
67 | arguments.Populate(args); | ||
68 | |||
69 | var commandLine = HeatCommandLineFactory.CreateCommandLine(serviceProvider); | ||
70 | var command = commandLine.ParseStandardCommandLine(arguments); | ||
71 | return command?.Execute() ?? 1; | ||
72 | } | ||
73 | } | ||
74 | } | ||
diff --git a/src/heat/heat.csproj b/src/heat/heat.csproj new file mode 100644 index 00000000..fd56c6c8 --- /dev/null +++ b/src/heat/heat.csproj | |||
@@ -0,0 +1,34 @@ | |||
1 | <?xml version="1.0" encoding="utf-8"?> | ||
2 | <!-- 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. --> | ||
3 | |||
4 | <Project Sdk="Microsoft.NET.Sdk"> | ||
5 | <PropertyGroup> | ||
6 | <TargetFrameworks>netcoreapp2.1;net461;net472</TargetFrameworks> | ||
7 | <OutputType>Exe</OutputType> | ||
8 | <Description>Harvester</Description> | ||
9 | <Title>WiX Harvester</Title> | ||
10 | <DebugType>embedded</DebugType> | ||
11 | <PublishRepositoryUrl>true</PublishRepositoryUrl> | ||
12 | <!-- <PackAsTool>true</PackAsTool> --> | ||
13 | <RuntimeIdentifier Condition=" '$(RuntimeIdentifier)'=='' and '$(TargetFramework)'!='netcoreapp2.1' ">win-x86</RuntimeIdentifier> | ||
14 | <PlatformTarget>AnyCPU</PlatformTarget> | ||
15 | </PropertyGroup> | ||
16 | |||
17 | <PropertyGroup> | ||
18 | <NoWarn>NU1701</NoWarn> | ||
19 | </PropertyGroup> | ||
20 | |||
21 | <ItemGroup> | ||
22 | <ProjectReference Include="..\WixToolset.Tools.Core\WixToolset.Tools.Core.csproj" /> | ||
23 | </ItemGroup> | ||
24 | |||
25 | <ItemGroup> | ||
26 | <PackageReference Include="WixToolset.Core" Version="4.0.*" /> | ||
27 | <PackageReference Include="WixToolset.Harvesters" Version="4.0.*" /> | ||
28 | </ItemGroup> | ||
29 | |||
30 | <ItemGroup> | ||
31 | <PackageReference Include="Microsoft.SourceLink.GitHub" Version="1.0.0" PrivateAssets="All" /> | ||
32 | <PackageReference Include="Nerdbank.GitVersioning" Version="2.1.65" PrivateAssets="All" /> | ||
33 | </ItemGroup> | ||
34 | </Project> | ||
diff --git a/src/heat/heat.net461.v3.ncrunchproject b/src/heat/heat.net461.v3.ncrunchproject new file mode 100644 index 00000000..cf22dfa9 --- /dev/null +++ b/src/heat/heat.net461.v3.ncrunchproject | |||
@@ -0,0 +1,5 @@ | |||
1 | <ProjectConfiguration> | ||
2 | <Settings> | ||
3 | <HiddenComponentWarnings /> | ||
4 | </Settings> | ||
5 | </ProjectConfiguration> \ No newline at end of file | ||
diff --git a/src/heat/heat.netcoreapp2.1.v3.ncrunchproject b/src/heat/heat.netcoreapp2.1.v3.ncrunchproject new file mode 100644 index 00000000..cf22dfa9 --- /dev/null +++ b/src/heat/heat.netcoreapp2.1.v3.ncrunchproject | |||
@@ -0,0 +1,5 @@ | |||
1 | <ProjectConfiguration> | ||
2 | <Settings> | ||
3 | <HiddenComponentWarnings /> | ||
4 | </Settings> | ||
5 | </ProjectConfiguration> \ No newline at end of file | ||