add version

This commit is contained in:
Mikhail
2024-11-03 14:59:22 -05:00
parent 1d11cee520
commit d3a0e9dcd3
3 changed files with 11 additions and 4 deletions

View File

@@ -506,7 +506,7 @@ namespace EpinelPS.Database
Save();
ValidateDb();
Console.WriteLine("Loaded db");
Console.WriteLine("JsonDb: Loaded");
}
else
{

View File

@@ -9,6 +9,7 @@
<PublishSingleFile>true</PublishSingleFile>
<SelfContained>true</SelfContained>
<IncludeNativeLibrariesForSelfExtract>True</IncludeNativeLibrariesForSelfExtract>
<Version>0.1.4.2</Version>
</PropertyGroup>
<ItemGroup>

View File

@@ -10,6 +10,7 @@ using Microsoft.Extensions.Logging.EventLog;
using Microsoft.VisualBasic;
using System.Net;
using System.Net.Http.Headers;
using System.Reflection;
using System.Security.Cryptography.X509Certificates;
using System.Text;
@@ -21,15 +22,16 @@ namespace EpinelPS
{
try
{
Console.WriteLine("Initializing JsonDb");
Console.WriteLine($"EpinelPS v{Assembly.GetExecutingAssembly().GetName().Version} - https://github.com/EpinelPS/EpinelPS/");
Console.WriteLine("Initializing database");
JsonDb.Save();
GameData.Instance.GetAllCostumes(); // force static data to be loaded
Console.WriteLine("Initialize handlers");
Console.WriteLine("Register handlers");
LobbyHandler.Init();
Console.WriteLine("Starting ASP.NET core on ports 80/443");
Console.WriteLine("Starting ASP.NET core on port 443");
new Thread(() =>
{
var builder = WebApplication.CreateBuilder(args);
@@ -167,6 +169,10 @@ namespace EpinelPS
]
}".Replace("{GameMinVer}", GameConfig.Root.GameMinVer).Replace("{GameMaxVer}", GameConfig.Root.GameMaxVer));
app.MapGet("/", () => {
return $"EpinelPS v{Assembly.GetExecutingAssembly().GetName().Version} - https://github.com/EpinelPS/EpinelPS/";
});
app.Run();
}).Start();