Mercurial > games > semicongine
changeset 669:0b55be039538
add: support for version handling
author | Sam <sam@basx.dev> |
---|---|
date | Tue, 09 May 2023 01:36:34 +0700 |
parents | a02d503ffa53 |
children | 881a5c9ea50f |
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: