add release build

This commit is contained in:
Zack Buhman 2025-12-31 14:41:24 -06:00
parent 7862a974fc
commit 98804d9ee4
6 changed files with 72 additions and 3 deletions

3
.gitignore vendored
View File

@ -5,4 +5,5 @@
*.manifest
*.idb
*.obj
*.res
*.res
*.aps

View File

@ -17,7 +17,7 @@ link.exe @"link.rsp" /NOLOGO /ERRORREPORT:PROMPT
@if %errorlevel% neq 0 exit /b %errorlevel%
mt.exe -manifest d3d10.exe.manifest -outputresource:Debug\d3d10.exe;1
mt.exe -manifest d3d10.exe.debug.manifest -outputresource:Debug\d3d10.exe;1
@if %errorlevel% neq 0 exit /b %errorlevel%

24
build_release.bat Normal file
View File

@ -0,0 +1,24 @@
fxc /Od /Zi /T fx_4_0 /nologo /Fo main.fxo main.fx
@if %errorlevel% neq 0 exit /b %errorlevel%
rem build main resource
rc.exe /d "_UNICODE" /d "UNICODE" /fo"Release\main.res" ".\main.rc"
@if %errorlevel% neq 0 exit /b %errorlevel%
rem compile
cl.exe @"compile_release.rsp" "main.cpp"
@if %errorlevel% neq 0 exit /b %errorlevel%
rem link
link.exe @"link_release.rsp" /NOLOGO /ERRORREPORT:PROMPT
@if %errorlevel% neq 0 exit /b %errorlevel%
mt.exe -manifest d3d10.exe.release.manifest -outputresource:Release\d3d10.exe;1
@if %errorlevel% neq 0 exit /b %errorlevel%
Release\d3d10.exe

19
compile_release.rsp Normal file
View File

@ -0,0 +1,19 @@
/O2
/GL
/D "WIN32"
/D "NDEBUG"
/D "_WINDOWS"
/D "_UNICODE"
/D "UNICODE"
/FD
/EHsc
/MT
/Fo"Release\\"
/Fd"Release\vc80.pdb"
/W3
/c
/Wp64
/Zi
/TP
/nologo
/errorReport:prompt

25
link_release.rsp Normal file
View File

@ -0,0 +1,25 @@
/INCREMENTAL:NO
/SUBSYSTEM:WINDOWS
/OPT:REF
/OPT:ICF
/LTCG
/MANIFEST:NO
/MACHINE:X86
/OUT:"Release\d3d10.exe"
/PDB:"Release\d3d10.pdb"
d3d10.lib
d3dx10.lib
kernel32.lib
user32.lib
gdi32.lib
winspool.lib
comdlg32.lib
advapi32.lib
shell32.lib
ole32.lib
oleaut32.lib
uuid.lib
odbc32.lib
odbccp32.lib
".\Release\main.obj"
".\Release\main.res"

View File

@ -262,7 +262,7 @@ HRESULT InitDirect3DDevice()
&pBlobErrors,
NULL);
if (FAILED(hr)) {
print("D3DX10CreateEffectFromFile\n");
print("D3DX10CreateEffectFromResource\n");
if (pBlobErrors != NULL) {
const char * pError = (const char *)pBlobErrors->GetBufferPointer();
print("pError: %p\n", pError);