Move core to external libs, Starting terminal crossplatform client

This commit is contained in:
Aurélie Delhaie
2023-01-08 21:45:42 +01:00
parent 40645a80a1
commit e5274702ab
56 changed files with 146 additions and 67 deletions

View 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>

View 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
}
}
}