Mercurial > games > semicongine
changeset 208:47acf82a438d
add: support for version handling
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 09 May 2023 01:36:34 +0700 |
parents | 81fab407a479 |
children | 461c18ee759b |
files | src/semicongine/core/buildconfig.nim |
diffstat | 1 files changed, 7 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- 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: