changeset 967:2f9469f83796

fix: steamcmd and build-script location
author sam <sam@basx.dev>
date Wed, 03 Apr 2024 16:00:33 +0700
parents a3428760e483
children 9d362151c78f 2fc5723a5635
files semicongine/build.nim
diffstat 1 files changed, 6 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/semicongine/build.nim	Wed Apr 03 15:00:40 2024 +0700
+++ b/semicongine/build.nim	Wed Apr 03 16:00:33 2024 +0700
@@ -96,8 +96,8 @@
   var audiofiles: seq[(string, string)]
 
   for (target_rel, source_rel) in resourceMap:
-    let target = joinPath(thisDir(), target_rel)
-    let source = joinPath(thisDir(), source_rel)
+    let target = thisDir().joinPath(target_rel)
+    let source = thisDir().joinPath(source_rel)
     if not source.fileExists:
       raise newException(IOError, &"Not found: {source}")
     if not target.fileExists or source.fileNewerStatic(target):
@@ -120,7 +120,6 @@
   if not defined(linux):
     echo "steam uploads must be done on linux for now"
     return
-
   let steamdir = thisDir().joinPath(STEAM_DIR_NAME)
   if not dirExists(steamdir):
     steamdir.mkDir
@@ -131,4 +130,7 @@
       rmFile zipFilename
       exec "steamcmd/steamcmd.sh +quit" # self-update steamcmd
 
-  exec f"steamcmd/steamcmd.sh +login \"{steamaccount}\" \"{password}\" +run_app_build {buildscript} +quit"
+  let
+    steamcmd = STEAM_DIR_NAME.joinPath("steamcmd").joinPath("steamcmd.sh")
+    scriptPath = "..".joinPath("..").joinPath(buildscript)
+  exec &"./{steamcmd} +login \"{steamaccount}\" \"{password}\" +run_app_build {scriptPath} +quit"