mirror of
https://github.com/MCCTeam/Minecraft-Console-Client
synced 2025-10-14 21:22:49 +00:00
Add build info inside MCC executable
Should help when submitting bug reports. See #456.
This commit is contained in:
parent
143fcf7155
commit
b5c8bf683f
2 changed files with 34 additions and 7 deletions
|
|
@ -21,9 +21,10 @@ namespace MinecraftClient
|
|||
private static McTcpClient Client;
|
||||
public static string[] startupargs;
|
||||
|
||||
public const string Version = "1.12.2 DEV";
|
||||
public const string Version = MCHighestVersion;
|
||||
public const string MCLowestVersion = "1.4.6";
|
||||
public const string MCHighestVersion = "1.12.2";
|
||||
public static readonly string BuildInfo = null;
|
||||
|
||||
private static Thread offlinePrompt = null;
|
||||
private static bool useMcVersionOnce = false;
|
||||
|
|
@ -35,6 +36,12 @@ namespace MinecraftClient
|
|||
{
|
||||
Console.WriteLine("Console Client for MC {0} to {1} - v{2} - By ORelio & Contributors", MCLowestVersion, MCHighestVersion, Version);
|
||||
|
||||
//Build information to facilitate processing of bug reports
|
||||
if (BuildInfo != null)
|
||||
{
|
||||
ConsoleIO.WriteLineFormatted("§8" + BuildInfo);
|
||||
}
|
||||
|
||||
//Debug input ?
|
||||
if (args.Length == 1 && args[0] == "--keyboard-debug")
|
||||
{
|
||||
|
|
@ -421,5 +428,19 @@ namespace MinecraftClient
|
|||
if (assembly == null) { assembly = Assembly.GetExecutingAssembly(); }
|
||||
return assembly.GetTypes().Where(t => String.Equals(t.Namespace, nameSpace, StringComparison.Ordinal)).ToArray();
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// Static initialization of build information, read from assembly information
|
||||
/// </summary>
|
||||
static Program()
|
||||
{
|
||||
AssemblyConfigurationAttribute attribute
|
||||
= typeof(Program)
|
||||
.Assembly
|
||||
.GetCustomAttributes(typeof(System.Reflection.AssemblyConfigurationAttribute), false)
|
||||
.FirstOrDefault() as AssemblyConfigurationAttribute;
|
||||
if (attribute != null)
|
||||
BuildInfo = attribute.Configuration;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -6,11 +6,11 @@ using System.Runtime.InteropServices;
|
|||
// set of attributes. Change these attribute values to modify the information
|
||||
// associated with an assembly.
|
||||
[assembly: AssemblyTitle("Minecraft Console Client")]
|
||||
[assembly: AssemblyDescription("")]
|
||||
[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("")]
|
||||
[assembly: AssemblyDescription("Lightweight console for Minecraft chat and automated scripts")]
|
||||
//[assembly: AssemblyConfiguration("")]
|
||||
[assembly: AssemblyCompany("https://github.com/ORelio/Minecraft-Console-Client")]
|
||||
[assembly: AssemblyProduct("MinecraftClient")]
|
||||
[assembly: AssemblyCopyright("Copyright © ORelio 2012-2014")]
|
||||
[assembly: AssemblyCopyright("Copyright © 2012-2018 ORelio & Contributors")]
|
||||
[assembly: AssemblyTrademark("")]
|
||||
[assembly: AssemblyCulture("")]
|
||||
|
||||
|
|
@ -32,5 +32,11 @@ using System.Runtime.InteropServices;
|
|||
// You can specify all the values or you can default the Build and Revision Numbers
|
||||
// by using the '*' as shown below:
|
||||
// [assembly: AssemblyVersion("1.0.*")]
|
||||
[assembly: AssemblyVersion("1.8.0")]
|
||||
[assembly: AssemblyFileVersion("1.8.0")]
|
||||
// [assembly: AssemblyVersion("1.0.0")]
|
||||
// [assembly: AssemblyFileVersion("1.0.0")]
|
||||
|
||||
// AppVeyor Build Number
|
||||
// MCC will use the following command as CMD pre-build script in AppVeyor msbuild settings:
|
||||
// echo [assembly: AssemblyConfiguration("AppVeyor build %APPVEYOR_BUILD_NUMBER%, built on %DATE% from commit %APPVEYOR_REPO_COMMIT:~0,7%")] >> MinecraftClient\Properties\AssemblyInfo.cs
|
||||
// The command will add build info like the example below to be incorporated in Assembly Info in order to display build info on launch
|
||||
// [assembly: AssemblyConfiguration("AppVeyor build 1234, built on Sun 31/12/2017 from commit abc1def")]
|
||||
Loading…
Add table
Add a link
Reference in a new issue