# HG changeset patch
# User sam <sam@basx.dev>
# Date 1712134833 -25200
# Node ID 2f9469f8379653e408b3759cc99881a2b4bba807
# Parent  a3428760e483de8ef0146b2e18220230ce6a1098
fix: steamcmd and build-script location

diff -r a3428760e483 -r 2f9469f83796 semicongine/build.nim
--- 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"