# HG changeset patch # User Sam # Date 1703599934 -25200 # Node ID 869cecde0a2276b64332b7f8af09e7ae13e19fbe # Parent 64b40937d0df4698d4e22b14b93fa967071eb7c4 fix: bad way to do build config diff -r 64b40937d0df -r 869cecde0a22 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 64b40937d0df -r 869cecde0a22 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"