Moved commands for generating glsl.c files from project settings to new embed_glsl.bat file.

This commit is contained in:
Andrei Drexler 2014-01-29 22:57:39 +02:00
parent 9fb667b960
commit a8732d5a4b
2 changed files with 290 additions and 700 deletions

38
misc/msvc/embed_glsl.bat Normal file
View file

@ -0,0 +1,38 @@
@echo off
setlocal ENABLEDELAYEDEXPANSION
if "%~1" == "" goto noinput
if "%~2" == "" goto nooutput
echo // Generated automatically from %~nx1, do not modify...>%2
echo const char *fallbackShader_%~n1 = >>%2
for /f "tokens=*" %%l in (%1) do call :stringize %%l>>%2
echo ;>>%2
set ERRORLEVEL=0
goto end
:stringize
set str=%*
if "!str!" EQU "" (
echo "\n"
goto :eof
)
set str=!str:\=\\!
set str=!str:^"=\^"!
echo "!str!\n"
goto :eof
:noinput
echo No input file specified 1>&2
set ERRORLEVEL=1
goto end
:nooutput
echo No output file specified 1>&2
set ERRORLEVEL=2
goto end
:end
endlocal

File diff suppressed because it is too large Load diff