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(); Save();
ValidateDb(); ValidateDb();
Console.WriteLine("Loaded db"); Console.WriteLine("JsonDb: Loaded");
} }
else else
{ {

View File

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

View File

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