Small stuff
This commit is contained in:
parent
3a58ed9701
commit
5a89a2ae9f
|
|
@ -17,7 +17,7 @@ task("compile-shaders")
|
||||||
task.run("config", {}, {disable_dump = true})
|
task.run("config", {}, {disable_dump = true})
|
||||||
|
|
||||||
local nzsl = project.required_package("nzsl")
|
local nzsl = project.required_package("nzsl")
|
||||||
local nzslc = path.join(project.required_package("nzsl"):installdir(), "bin", "nzslc")
|
local nzslc = path.join(nzsl:installdir(), "bin", "nzslc")
|
||||||
|
|
||||||
local envs = nzsl:get("envs")
|
local envs = nzsl:get("envs")
|
||||||
if is_plat("mingw") then
|
if is_plat("mingw") then
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ rule("nzsl.compile.shaders")
|
||||||
before_buildcmd_file(function (target, batchcmds, shaderfile, opt)
|
before_buildcmd_file(function (target, batchcmds, shaderfile, opt)
|
||||||
import("core.tool.toolchain")
|
import("core.tool.toolchain")
|
||||||
|
|
||||||
local nzsl = path.join(target:pkg("nzsl"):installdir(), "bin", "nzslc")
|
local nzslc = path.join(target:pkg("nzsl"):installdir(), "bin", "nzslc")
|
||||||
|
|
||||||
-- add commands
|
-- add commands
|
||||||
batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile)
|
batchcmds:show_progress(opt.progress, "${color.build.object}compiling shader %s", shaderfile)
|
||||||
|
|
@ -29,7 +29,7 @@ rule("nzsl.compile.shaders")
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
batchcmds:vrunv(nzsl, argv, { curdir = ".", envs = envs })
|
batchcmds:vrunv(nzslc, argv, { curdir = ".", envs = envs })
|
||||||
|
|
||||||
local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")
|
local outputFile = path.join(path.directory(shaderfile), path.basename(shaderfile) .. ".nzslb.h")
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue