# HG changeset patch # User Sam # Date 1674027787 -25200 # Node ID ab8de2471a3a183417a7dea481fa375e7a4cc8a3 # Parent ae20734fde0b2665e441618504e06a91a7cd7f93 add: correct publishing dir, correct check when nimcheck is running diff -r ae20734fde0b -r ab8de2471a3a config.nims --- a/config.nims Wed Jan 18 14:15:47 2023 +0700 +++ b/config.nims Wed Jan 18 14:43:07 2023 +0700 @@ -102,7 +102,7 @@ exec(&"rm -rf {BUILDBASE}") task publish, "publish all build": - exec("rsync -rv build/ basx.dev:/var/www/public.basx.dev/zamikongine") + exec("rsync -rv build/ basx.dev:/var/www/public.basx.dev/semcongine") task glslangValidator, "Download glslangValidator (required for linux compilation)": let dirname="/tmp/glslang_download" diff -r ae20734fde0b -r ab8de2471a3a src/semicongine/shader.nim --- a/src/semicongine/shader.nim Wed Jan 18 14:15:47 2023 +0700 +++ b/src/semicongine/shader.nim Wed Jan 18 14:43:07 2023 +0700 @@ -33,6 +33,8 @@ of VK_SHADER_STAGE_ALL: "" proc compileGLSLToSPIRV(stage: static VkShaderStageFlagBits, shaderSource: static string, entrypoint: string): seq[uint32] {.compileTime.} = + when defined(nimcheck): # will not run if nimcheck is running + return result const stagename = stage2string(stage) shaderHash = hash(shaderSource) @@ -43,8 +45,6 @@ let (output, exitCode_glsl) = gorgeEx(command=fmt"{projectPath}/glslangValidator --entry-point {entrypoint} -V --stdin -S {stagename} -o {shaderout}", input=shaderSource) if exitCode_glsl != 0: raise newException(Exception, output) - if output == "": # this happens when the nim was invoked with "check" instead of "compile/c", as it prevents the gorgeEx command to really run. However, there is hope, see https://github.com/nim-lang/RFCs/issues/430 - return result let shaderbinary = staticRead shaderout let (output_rm, exitCode_rm) = gorgeEx(command=fmt"rm {shaderout}")