v1.3.0.1 (Epic Store release)
This commit is contained in:
@@ -1,11 +1,11 @@
|
||||
using System;
|
||||
using System.Linq;
|
||||
using System.Linq;
|
||||
using System.Reflection;
|
||||
using System.Runtime.CompilerServices;
|
||||
|
||||
[assembly:InternalsVisibleTo("WindowsTest"),
|
||||
InternalsVisibleTo("MacTest"),
|
||||
InternalsVisibleTo("LinuxTest")]
|
||||
|
||||
public static class AssemblyInfo
|
||||
{
|
||||
public static readonly string GitRevision;
|
||||
@@ -13,6 +13,38 @@ public static class AssemblyInfo
|
||||
public static readonly string ProjectDir;
|
||||
public static readonly string BuildString;
|
||||
|
||||
public enum Platform
|
||||
{
|
||||
Windows,
|
||||
MacOS,
|
||||
Linux
|
||||
}
|
||||
|
||||
public enum Configuration
|
||||
{
|
||||
Release,
|
||||
Unstable,
|
||||
Debug
|
||||
}
|
||||
|
||||
#if WINDOWS
|
||||
public const Platform CurrentPlatform = Platform.Windows;
|
||||
#elif OSX
|
||||
public const Platform CurrentPlatform = Platform.MacOS;
|
||||
#elif LINUX
|
||||
public const Platform CurrentPlatform = Platform.Linux;
|
||||
#else
|
||||
#error Unknown platform
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
public const Configuration CurrentConfiguration = Configuration.Debug;
|
||||
#elif UNSTABLE
|
||||
public const Configuration CurrentConfiguration = Configuration.Unstable;
|
||||
#else
|
||||
public const Configuration CurrentConfiguration = Configuration.Release;
|
||||
#endif
|
||||
|
||||
static AssemblyInfo()
|
||||
{
|
||||
var asm = typeof(AssemblyInfo).Assembly;
|
||||
@@ -27,22 +59,7 @@ public static class AssemblyInfo
|
||||
string[] dirSplit = ProjectDir.Split('/', '\\');
|
||||
ProjectDir = string.Join(ProjectDir.Contains('/') ? '/' : '\\', dirSplit.Take(dirSplit.Length - 2));
|
||||
|
||||
BuildString = "Unknown";
|
||||
#if WINDOWS
|
||||
BuildString = "Windows";
|
||||
#elif OSX
|
||||
BuildString = "Mac";
|
||||
#elif LINUX
|
||||
BuildString = "Linux";
|
||||
#endif
|
||||
|
||||
#if DEBUG
|
||||
BuildString = "Debug" + BuildString;
|
||||
#elif UNSTABLE
|
||||
BuildString = "Unstable" + BuildString;
|
||||
#else
|
||||
BuildString = "Release" + BuildString;
|
||||
#endif
|
||||
BuildString = $"{CurrentConfiguration}{CurrentPlatform}";
|
||||
}
|
||||
|
||||
public static string CleanupStackTrace(this string stackTrace)
|
||||
|
||||
Reference in New Issue
Block a user