# HG changeset patch # User Sam # Date 1683570994 -25200 # Node ID 0b55be0395389bdd4b11b6a89284206d33f3660e # Parent a02d503ffa533bb69718f12f27128b0b0d2bc62e add: support for version handling diff -r a02d503ffa53 -r 0b55be039538 src/semicongine/core/buildconfig.nim --- a/src/semicongine/core/buildconfig.nim Tue May 09 01:18:01 2023 +0700 +++ b/src/semicongine/core/buildconfig.nim Tue May 09 01:36:34 2023 +0700 @@ -1,9 +1,16 @@ +import std/parsecfg +import std/streams import std/compilesettings import std/strutils import std/logging import std/os const ENGINENAME = "semicongine" +const ENGINEVERSION* = static: + var nimbleFile = newStringStream(staticRead("../../../semicongine.nimble")) + var config = loadConfig(nimbleFile) + config.getSectionValue("", "version") + # checks required build options: static: