Gondwana Game Engine Development (master) - 2.6.1
Gondwana is a cross-platform 2.5D game and rendering engine written in C#/.NET 8. It provides fine-grained control over rendering, timing, and scene composition, with built-in support for parallax, z-ordering, pixel overhang, collision detection, and particle effects. Gondwana targets desktop and web platforms using SkiaSharp for graphics and pluggable audio backends for desktop and browser targets.
Loading...
Searching...
No Matches
EngineInfo.cs
1using System.Diagnostics;
2using System.Reflection;
3
4namespace Gondwana;
5
11public static class EngineInfo
12{
38 public static string Version => GetVersion(typeof(Engine).Assembly);
39
40 private static string GetVersion(Assembly asm)
41 {
42 // 1) Best: NerdBank / SemVer / git hash lives here
43 var info = asm.GetCustomAttribute<AssemblyInformationalVersionAttribute>()?.InformationalVersion;
44 if (!string.IsNullOrWhiteSpace(info))
45 return info;
46
47 // 2) Next: Windows file version (works cross-platform too; returns empty sometimes)
48 var fvi = FileVersionInfo.GetVersionInfo(asm.Location);
49 if (!string.IsNullOrWhiteSpace(fvi.FileVersion))
50 return fvi.FileVersion;
51
52 // 3) Last resort: AssemblyName.Version (often stable/boring)
53 return asm.GetName().Version?.ToString() ?? "unknown";
54 }
55}