# HG changeset patch # User Sam # Date 1683570994 -25200 # Node ID 47acf82a438dc1e14f3f3345102b00d571aefb15 # Parent 81fab407a479e645d74fad7225b3c227c43cec5d add: support for version handling diff -r 81fab407a479 -r 47acf82a438d 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: