changeset 303:1fa734fe4384

fix: wrong path for glsl on windows
author Sam <sam@basx.dev>
date Sun, 25 Jun 2023 09:26:19 -0700
parents 05233dd60205
children 0c6e73fcc61f
files src/semicongine/vulkan/shader.nim
diffstat 1 files changed, 5 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/semicongine/vulkan/shader.nim	Sun Jun 25 19:20:34 2023 +0700
+++ b/src/semicongine/vulkan/shader.nim	Sun Jun 25 09:26:19 2023 -0700
@@ -60,8 +60,11 @@
   echo "shader of type ", stage, ", entrypoint ", entrypoint
   for i, line in enumerate(shaderSource.splitlines()):
     echo "  ", i + 1, " ", line
-  let command = &"{projectPath}/glslangValidator --entry-point {entrypoint} -V --stdin -S {stagename} -o {shaderfile}"
-
+  var glslExe = "glslangValidator"
+  when defined(windows):
+    glslExe = glslExe & "." & ExeExt
+  let command = &"{projectPath.joinPath(glslExe)} --entry-point {entrypoint} -V --stdin -S {stagename} -o {shaderfile}"
+  echo "run: ", command
   discard staticExecChecked(
       command = command,
       input = shaderSource