From 6b51e3b2bfd321f98e855141eb4b15a75bcd8c16 Mon Sep 17 00:00:00 2001 From: Rob Mensching Date: Fri, 22 Sep 2017 07:47:43 -0700 Subject: Fix CLI header --- src/Directory.Build.props | 1 + src/WixToolset.Core/AppCommon.cs | 9 +- .../WixDistributionSpecificStrings.Designer.cs | 77 ------------ .../WixDistributionSpecificStrings.resx | 130 --------------------- src/WixToolset.Core/WixToolset.Core.csproj | 2 +- src/wix/Program.cs | 9 ++ src/wix/wix.csproj | 2 +- 7 files changed, 17 insertions(+), 213 deletions(-) delete mode 100644 src/WixToolset.Core/WixDistributionSpecificStrings.Designer.cs delete mode 100644 src/WixToolset.Core/WixDistributionSpecificStrings.resx (limited to 'src') diff --git a/src/Directory.Build.props b/src/Directory.Build.props index 25cb6d36..b27b5ca8 100644 --- a/src/Directory.Build.props +++ b/src/Directory.Build.props @@ -10,6 +10,7 @@ WiX Toolset Team WiX Toolset Copyright (c) .NET Foundation and contributors. All rights reserved. + WiX Toolset diff --git a/src/WixToolset.Core/AppCommon.cs b/src/WixToolset.Core/AppCommon.cs index 30ec7771..5fde632a 100644 --- a/src/WixToolset.Core/AppCommon.cs +++ b/src/WixToolset.Core/AppCommon.cs @@ -121,7 +121,7 @@ namespace WixToolset /// Returns value for PID_APPNAME." public static string GetCreatingApplicationString() { - Assembly assembly = Assembly.GetExecutingAssembly(); + var assembly = Assembly.GetExecutingAssembly(); return WixDistribution.ReplacePlaceholders("[AssemblyProduct] ([FileVersion])", assembly); } @@ -130,8 +130,8 @@ namespace WixToolset /// public static void DisplayToolHeader() { - Assembly assembly = Assembly.GetCallingAssembly(); - Console.WriteLine(WixDistribution.ReplacePlaceholders(WixDistributionSpecificStrings.ToolsetHelpHeader, assembly)); + var assembly = Assembly.GetCallingAssembly(); + Console.WriteLine(WixDistribution.ReplacePlaceholders("[AssemblyProduct] [AssemblyDescription] version [FileVersion]\r\n[AssemblyCopyright]", assembly)); } /// @@ -139,7 +139,8 @@ namespace WixToolset /// public static void DisplayToolFooter() { - Console.Write(WixDistribution.ReplacePlaceholders(WixDistributionSpecificStrings.ToolsetHelpFooter, null)); + var assembly = Assembly.GetCallingAssembly(); + Console.Write(WixDistribution.ReplacePlaceholders("\r\nFor more information see: [SupportUrl]", assembly)); } } } diff --git a/src/WixToolset.Core/WixDistributionSpecificStrings.Designer.cs b/src/WixToolset.Core/WixDistributionSpecificStrings.Designer.cs deleted file mode 100644 index 841f6ca8..00000000 --- a/src/WixToolset.Core/WixDistributionSpecificStrings.Designer.cs +++ /dev/null @@ -1,77 +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 { - using System; - - - /// - /// A strongly-typed resource class, for looking up localized strings, etc. - /// - // This class was auto-generated by the StronglyTypedResourceBuilder - // class via a tool like ResGen or Visual Studio. - // To add or remove a member, edit your .ResX file then rerun ResGen - // with the /str option, or rebuild your VS project. - [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")] - [global::System.Diagnostics.DebuggerNonUserCodeAttribute()] - [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()] - internal class WixDistributionSpecificStrings { - - private static global::System.Resources.ResourceManager resourceMan; - - private static global::System.Globalization.CultureInfo resourceCulture; - - [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")] - internal WixDistributionSpecificStrings() { - } - - /// - /// Returns the cached ResourceManager instance used by this class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Resources.ResourceManager ResourceManager { - get { - if (object.ReferenceEquals(resourceMan, null)) { - global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("WixToolset.WixDistributionSpecificStrings", typeof(WixDistributionSpecificStrings).Assembly); - resourceMan = temp; - } - return resourceMan; - } - } - - /// - /// Overrides the current thread's CurrentUICulture property for all - /// resource lookups using this strongly typed resource class. - /// - [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)] - internal static global::System.Globalization.CultureInfo Culture { - get { - return resourceCulture; - } - set { - resourceCulture = value; - } - } - - /// - /// Looks up a localized string similar to - ///For more information see: http://wix.sourceforge.net - ///. - /// - internal static string ToolsetHelpFooter { - get { - return ResourceManager.GetString("ToolsetHelpFooter", resourceCulture); - } - } - - /// - /// Looks up a localized string similar to WiX {0} version {1} - ///Copyright (C) .NET Foundation and contributors. All rights reserved. - ///. - /// - internal static string ToolsetHelpHeader { - get { - return ResourceManager.GetString("ToolsetHelpHeader", resourceCulture); - } - } - } -} diff --git a/src/WixToolset.Core/WixDistributionSpecificStrings.resx b/src/WixToolset.Core/WixDistributionSpecificStrings.resx deleted file mode 100644 index 7cca2d4e..00000000 --- a/src/WixToolset.Core/WixDistributionSpecificStrings.resx +++ /dev/null @@ -1,130 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - text/microsoft-resx - - - 2.0 - - - System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089 - - - -For more information see: [SupportUrl] - - - - [AssemblyProduct] [AssemblyDescription] version [FileVersion] -[AssemblyCopyright] - - - \ No newline at end of file diff --git a/src/WixToolset.Core/WixToolset.Core.csproj b/src/WixToolset.Core/WixToolset.Core.csproj index 3db31e4d..de7f004e 100644 --- a/src/WixToolset.Core/WixToolset.Core.csproj +++ b/src/WixToolset.Core/WixToolset.Core.csproj @@ -4,7 +4,7 @@ netstandard2.0 - + Core WiX Toolset Core diff --git a/src/wix/Program.cs b/src/wix/Program.cs index 3e4fa8f8..477f05ff 100644 --- a/src/wix/Program.cs +++ b/src/wix/Program.cs @@ -24,11 +24,20 @@ namespace WixToolset.Core [MTAThread] public static int Main(string[] args) { + Messaging.Instance.InitializeAppName("WIX", "wix.exe"); + + Messaging.Instance.Display += DisplayMessage; + var command = CommandLine.ParseStandardCommandLine(args); return command?.Execute() ?? 1; } + private static void DisplayMessage(object sender, DisplayEventArgs e) + { + Console.WriteLine(e.Message); + } + #if false private static ICommand ParseCommandLine(string[] args) { diff --git a/src/wix/wix.csproj b/src/wix/wix.csproj index 88017e3f..5018bcd4 100644 --- a/src/wix/wix.csproj +++ b/src/wix/wix.csproj @@ -5,7 +5,7 @@ netcoreapp2.0 Exe - + Compiler WiX Toolset Compiler -- cgit v1.2.3-55-g6feb