changeset 298:717928618344

fix: wrong relative path
author Sam <sam@basx.dev>
date Sun, 25 Jun 2023 19:17:44 +0700
parents d7b7f6292300
children 05233dd60205
files src/semicongine/core/buildconfig.nim
diffstat 1 files changed, 3 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/semicongine/core/buildconfig.nim	Sun Jun 25 19:03:57 2023 +0700
+++ b/src/semicongine/core/buildconfig.nim	Sun Jun 25 19:17:44 2023 +0700
@@ -7,8 +7,9 @@
 
 const ENGINENAME* = "semicongine"
 const ENGINEVERSION* = static:
-  var nimbleFile = newStringStream(staticRead("../../../semicongine.nimble"))
-  var config = loadConfig(nimbleFile)
+  let nimblePath = currentSourcePath.parentDir().parentDir().parentDir().parentDir().joinPath("semicongine.nimble")
+  let nimbleFile = newStringStream(staticRead(nimblePath))
+  let config = loadConfig(nimbleFile)
   config.getSectionValue("", "version")