mirror of
https://github.com/ReactionQuake3/reaction.git
synced 2024-11-10 07:11:36 +00:00
Moved commands for generating glsl.c files from project settings to new embed_glsl.bat file.
This commit is contained in:
parent
9fb667b960
commit
a8732d5a4b
2 changed files with 290 additions and 700 deletions
38
misc/msvc/embed_glsl.bat
Normal file
38
misc/msvc/embed_glsl.bat
Normal 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
Loading…
Reference in a new issue