# HG changeset patch # User Sam # Date 1703599934 -25200 # Node ID ce66095e19e39121a846f0aadbf0185e908da700 # Parent c94db8b830406995a4423e8763e2bb0ccb2d4101 fix: bad way to do build config diff -r c94db8b83040 -r ce66095e19e3 semicongine/core/buildconfig.nim --- a/semicongine/core/buildconfig.nim Tue Dec 26 19:13:58 2023 +0700 +++ b/semicongine/core/buildconfig.nim Tue Dec 26 21:12:14 2023 +0700 @@ -1,16 +1,8 @@ -import std/parsecfg -import std/streams import std/strutils import std/logging import std/os -const ENGINENAME* = "semicongine" -const ENGINEVERSION* = static: - let nimblePath = currentSourcePath.parentDir().parentDir().parentDir().joinPath("semicongine.nimble") - let nimbleFile = newStringStream(staticRead(nimblePath)) - let config = loadConfig(nimbleFile) - config.getSectionValue("", "version") - +import ./constants # checks required build options: static: diff -r c94db8b83040 -r ce66095e19e3 semicongine/core/constants.nim --- a/semicongine/core/constants.nim Tue Dec 26 19:13:58 2023 +0700 +++ b/semicongine/core/constants.nim Tue Dec 26 21:12:14 2023 +0700 @@ -1,1 +1,4 @@ -const RESOURCEROOT*: string = "resources" +const + RESOURCEROOT*: string = "resources" + ENGINENAME* = "semicongine" + ENGINEVERSION* = "0.0.1"