changeset 759:7cf908571ec8

fix: wrong relative path
author Sam <sam@basx.dev>
date Sun, 25 Jun 2023 19:17:44 +0700
parents ac72df379e1d
children 916939358fef
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")