You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

34 lines
1.2 KiB
Batchfile

2 years ago
@echo off
echo Running codegen...
rmdir /S /q assets\copyrighted
rmdir /S /q "assets\exported_3d"
mkdir "assets\exported_3d" || goto :error
copy "art\exported\*" "assets\exported_3d\" || goto :error
copy "art\gigatexture.png" "assets\exported_3d\gigatexture.png" || goto :error
rmdir /S /q gen
mkdir gen
@REM shaders
thirdparty\sokol-shdc.exe --input quad.glsl --output gen\quad-sapp.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error
thirdparty\sokol-shdc.exe --input threedee.glsl --output gen\threedee.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error
thirdparty\sokol-shdc.exe --input armature.glsl --output gen\armature.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error
thirdparty\sokol-shdc.exe --input shadow_mapper.glsl --output gen\shadow_mapper.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error
2 years ago
@REM metadesk codegen
cl /Ithirdparty /W3 /Zi /WX codegen.c || goto :error
@REM zig cc -Ithirdparty -gfull -gcodeview codegen.c -o codegen.exe || goto error
codegen || goto :error
@REM cl /Ithirdparty /Igen /W3 /Zi /WX maketraining.c || goto :error
@REM maketraining || goto :error
2 years ago
goto :EOF
:error
echo Codegen failed
2 years ago
exit /B %ERRORLEVEL%