From 2009ee537ce1332303ee7b84331f1d3fe95def61 Mon Sep 17 00:00:00 2001 From: Anthony Fuller <24512050+AnthonyFuller@users.noreply.github.com> Date: Sat, 20 Nov 2021 20:22:28 +0000 Subject: [PATCH] Fix shaders not compiling with spaces in the path (#258) --- DirectXTex/Shaders/CompileShaders.cmd | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/DirectXTex/Shaders/CompileShaders.cmd b/DirectXTex/Shaders/CompileShaders.cmd index 65f54a7..d28cef9 100644 --- a/DirectXTex/Shaders/CompileShaders.cmd +++ b/DirectXTex/Shaders/CompileShaders.cmd @@ -21,7 +21,7 @@ if not defined CompileShadersOutput set CompileShadersOutput=Compiled set StrTrim=%CompileShadersOutput%## set StrTrim=%StrTrim: ##=% set CompileShadersOutput=%StrTrim:##=% -@if not exist %CompileShadersOutput% mkdir %CompileShadersOutput% +@if not exist "%CompileShadersOutput%" mkdir "%CompileShadersOutput%" call :CompileShader BC7Encode TryMode456CS call :CompileShader BC7Encode TryMode137CS call :CompileShader BC7Encode TryMode02CS @@ -43,7 +43,7 @@ endlocal exit /b :CompileShader -set fxc=%PCFXC% %1.hlsl %FXCOPTS% /Tcs_4_0 /E%2 /Fh%CompileShadersOutput%\%1_%2.inc /Fd%CompileShadersOutput%\%1_%2.pdb /Vn%1_%2 +set fxc=%PCFXC% %1.hlsl %FXCOPTS% /Tcs_4_0 /E%2 "/Fh%CompileShadersOutput%\%1_%2.inc" "/Fd%CompileShadersOutput%\%1_%2.pdb" /Vn%1_%2 echo. echo %fxc% %fxc% || set error=1