Move core to external libs, Starting terminal crossplatform client
This commit is contained in:
14
OpenSaveCloudCli/OpenSaveCloudCli.csproj
Normal file
14
OpenSaveCloudCli/OpenSaveCloudCli.csproj
Normal file
@@ -0,0 +1,14 @@
|
||||
<Project Sdk="Microsoft.NET.Sdk">
|
||||
|
||||
<PropertyGroup>
|
||||
<OutputType>Exe</OutputType>
|
||||
<TargetFramework>net6.0</TargetFramework>
|
||||
<ImplicitUsings>enable</ImplicitUsings>
|
||||
<Nullable>enable</Nullable>
|
||||
</PropertyGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<ProjectReference Include="..\OpenSaveCloudCore\OpenSaveCloudCore.csproj" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
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