diff --git a/build_desktop_debug.bat b/build_desktop_debug.bat index 6cda265..87d4c60 100644 --- a/build_desktop_debug.bat +++ b/build_desktop_debug.bat @@ -15,7 +15,7 @@ if "%should_do_blender_export%"=="1" ( call blender_export.bat || goto :error ) if "%should_do_codegen%"=="1" ( call run_codegen.bat || goto :error ) @REM start /B zig cc -DDEVTOOLS -Igen -Ithirdparty -lDbghelp -lGdi32 -lD3D11 -lOle32 -lwinhttp -gfull -gcodeview -o main_zig.exe main.c -cl /diagnostics:caret /DDEVTOOLS /Igen /Ithirdparty /Wall /FC /Zi /WX Dbghelp.lib winhttp.lib main.c || goto :error +cl /nologo /diagnostics:caret /DDEVTOOLS /Igen /Ithirdparty /Wall /FC /Zi /WX main.c /link /noimplib /noexp || goto :error goto :EOF diff --git a/main.c b/main.c index 08e8d5a..55a742a 100644 --- a/main.c +++ b/main.c @@ -43,8 +43,6 @@ #pragma warning(push, 3) #include -#include -#include #include // https://developer.download.nvidia.com/devzone/devcenter/gamegraphics/files/OptimusRenderingPolicies.pdf @@ -474,6 +472,7 @@ LPCWSTR windows_string(MD_String8 s) #ifdef DESKTOP #ifdef WINDOWS #pragma warning(push, 3) +#pragma comment(lib, "WinHttp") #include #include #pragma warning(pop) @@ -3751,9 +3750,11 @@ typedef enum typedef BUFF(char, 200) StacktraceElem; typedef BUFF(StacktraceElem, 16) StacktraceInfo; +#if 0 // #ifdef WINDOWS +#include +#pragma comment(lib, "DbgHelp") StacktraceInfo get_stacktrace() { -#ifdef WINDOWS StacktraceInfo to_return = {0}; void *stack[ARRLEN(to_return.data)] = {0}; int captured = CaptureStackBackTrace(0, ARRLEN(to_return.data), stack, 0); @@ -3787,10 +3788,13 @@ StacktraceInfo get_stacktrace() free(symbol); } return to_return; +} #else +StacktraceInfo get_stacktrace() +{ return (StacktraceInfo){0}; -#endif } +#endif typedef struct DrawParams { diff --git a/run_codegen.bat b/run_codegen.bat index 5d638b7..0465f88 100644 --- a/run_codegen.bat +++ b/run_codegen.bat @@ -12,11 +12,11 @@ if exist gen\ ( thirdparty\sokol-shdc.exe --input threedee.glsl --output gen\threedee.glsl.h --slang glsl100:hlsl5:metal_macos:glsl330 || goto :error @REM metadesk codegen -cl /Ithirdparty /W3 /Zi /WX codegen.c || goto :error +cl /nologo /diagnostics:caret /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 cl /nologo /diagnostics:caret /Ithirdparty /Igen /W3 /Zi /WX maketraining.c || goto :error @REM maketraining || goto :error goto :EOF