Fix shaders not compiling with spaces in the path (#258)

This commit is contained in:
Anthony Fuller 2021-11-20 20:22:28 +00:00 committed by GitHub
parent 73ecfc91bb
commit 2009ee537c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -21,7 +21,7 @@ if not defined CompileShadersOutput set CompileShadersOutput=Compiled
set StrTrim=%CompileShadersOutput%## set StrTrim=%CompileShadersOutput%##
set StrTrim=%StrTrim: ##=% set StrTrim=%StrTrim: ##=%
set CompileShadersOutput=%StrTrim:##=% set CompileShadersOutput=%StrTrim:##=%
@if not exist %CompileShadersOutput% mkdir %CompileShadersOutput% @if not exist "%CompileShadersOutput%" mkdir "%CompileShadersOutput%"
call :CompileShader BC7Encode TryMode456CS call :CompileShader BC7Encode TryMode456CS
call :CompileShader BC7Encode TryMode137CS call :CompileShader BC7Encode TryMode137CS
call :CompileShader BC7Encode TryMode02CS call :CompileShader BC7Encode TryMode02CS
@ -43,7 +43,7 @@ endlocal
exit /b exit /b
:CompileShader :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.
echo %fxc% echo %fxc%
%fxc% || set error=1 %fxc% || set error=1