Move core to external libs, Starting terminal crossplatform client
This commit is contained in:
36
OpenSaveCloudCli/Program.cs
Normal file
36
OpenSaveCloudCli/Program.cs
Normal file
@@ -0,0 +1,36 @@
|
||||
using OpenSaveCloudCore.Core;
|
||||
using System.Reflection;
|
||||
|
||||
namespace OpenSaveCloudCli
|
||||
{
|
||||
internal static class Program
|
||||
{
|
||||
static int Main(string[] args)
|
||||
{
|
||||
if (args.Contains("-v") || args.Contains("--version"))
|
||||
{
|
||||
Version();
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void Version()
|
||||
{
|
||||
Assembly a = Assembly.GetExecutingAssembly();
|
||||
Version? v = a.GetName().Version;
|
||||
string clientInfo = "C# [Core .NET {0}/{1}]";
|
||||
Version dotNetVersion = Environment.Version;
|
||||
string? clrArch = Environment.GetEnvironmentVariable("PROCESSOR_ARCHITECTURE");
|
||||
clientInfo = string.Format(clientInfo, dotNetVersion, clrArch);
|
||||
|
||||
Console.WriteLine("Open Save Cloud - Terminal Client (Cross Platform)");
|
||||
if (v != null)
|
||||
{
|
||||
Console.WriteLine("v{0}", v.ToString());
|
||||
}
|
||||
Console.WriteLine("Running on .Net {0}", clientInfo);
|
||||
|
||||
// TODO get server version
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user