xonotic/misc/tools/the-big-benchmark/the-big-benchmark.bat

110 lines
2.6 KiB
Batchfile
Raw Normal View History

2012-01-27 15:31:03 +00:00
@echo off
2012-01-26 19:00:37 +00:00
cd %~dp0
cd ..\..\..
echo The Big Benchmark
echo =================
echo.
if not exist all goto nogit
echo For Git builds, please use the-big-benchmark.sh instead!
goto end
:nogit
2012-01-25 21:26:32 +00:00
if "%1" == "" goto noarg
set xonotic=%1
goto postarg
2012-01-25 21:26:32 +00:00
:noarg
if "%ProgramFiles(x86)%" == "" goto bit32
:bit64
2012-01-29 10:40:58 +00:00
set xonotic=xonotic-x64.exe
goto postarg
:bit32
set xonotic=xonotic.exe
goto postarg
:postarg
2012-01-28 16:56:16 +00:00
if exist data\the-big-benchmark.log del data\the-big-benchmark.log
if exist data\benchmark.log del data\benchmark.log
if exist data\engine.log del data\engine.log
2012-03-26 11:15:50 +00:00
set p=+cl_curl_enabled 0 +r_texture_dds_load 1 +cl_playerdetailreduction 0 +developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos/the-big-keybench.dem
2012-03-14 13:18:40 +00:00
goto start
2012-03-14 13:18:40 +00:00
:benchmark
echo Benchmarking on %e%
2012-01-28 16:56:16 +00:00
if exist data\benchmark.log del data\benchmark.log
2012-03-14 13:18:40 +00:00
echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% > data\engine.log
%xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% >> data\engine.log 2>&1
find "MED: " data\engine.log
find "]quit" data\engine.log >nul
if not errorlevel 1 goto done
type data\engine.log >> data\the-big-benchmark.log
type data\benchmark.log >> data\the-big-benchmark.log
2012-03-14 13:18:40 +00:00
if not "%e%" == "med" goto nomed
find "checking for OpenGL 2.0 core features... not detected" data\engine.log >nul
if errorlevel 1 goto nomed
echo OpenGL 2.0 or later required for Normal quality and higher, exiting.
goto done
:nomed
if not "%e%" == "high" goto nohigh
find "vid_soft 1" data\engine.log >nul
if errorlevel 1 goto nohigh
echo Software rendering does not support Ultra and Ultimate quality settings, exiting.
goto done
:nohigh
goto z%e%
2012-03-14 13:18:40 +00:00
:start
2012-03-14 13:18:40 +00:00
set e=omg
goto benchmark
:zomg
2012-03-14 13:18:40 +00:00
set e=low
goto benchmark
:zlow
2012-03-14 13:18:40 +00:00
set e=med
goto benchmark
:zmed
2012-03-14 13:18:40 +00:00
set e=normal
goto benchmark
:znormal
set e=high
goto benchmark
:zhigh
set e=ultra
goto benchmark
:zultra
set e=ultimate
goto benchmark
:zultimate
:done
2012-01-28 16:56:16 +00:00
if exist data\benchmark.log del data\benchmark.log
if exist data\engine.log del data\engine.log
2012-01-27 15:48:52 +00:00
if exist data\the-big-benchmark.log goto logisgood
echo.
echo The benchmark has been aborted. No log file has been written.
goto end
:logisgood
echo.
echo Please provide the the following info to the Xonotic developers:
echo - CPU speed
echo - memory size
echo - graphics card (which vendor, which model)
echo - operating system (including whether it is 32bit or 64bit)
echo - graphics driver version
echo - the file the-big-benchmark.log in the data directory
2012-01-26 16:15:40 +00:00
echo.
echo Thank you
:end
pause