Open Raildex opened 6 months ago
Did you try to add {curdir = "."} to your batchcmds:execv calls?
Did you try to add {curdir = "."} to your batchcmds:execv calls?
Yes, with no difference.
batchcmds:execv(fxc, compileargs, {curdir= "."})
batchcmds:execv(f2c, f2cargs, { curdir= ".", envs = {XMAKE_SKIP_HISTORY = "y"}})
Currently ninja generator does not support custom script commands for rule.
Xmake Version
v2.8.9+HEAD.cb1b65054
Operating System Version and Architecture
Windows 11, Visual Studio 2022
Describe Bug
I have a rule that compiles shader files and transforms them into header files. It works with xmake, but does not with Visual Studio or Ninja and I have no idea how to fix it. The order of execution seems to be different. Ninja does not seem to generate the header files and tries to compile the main.cpp before that and hits a compile error. The visual studio solution error is unknown to me and seems to be an error of the xmake generation.
The rule "shadercompile.d3d11" seems to be the culprit, but since it works with xmake, I think Visual Studio solution/Ninja generation has a bug
Expected Behavior
Compilation should work
Project Configuration
test.zip
Additional Information and Error Logs
Ninja:
Visual Studio: