]> git.xonotic.org Git - xonotic/xonotic.git/blob - misc/tools/the-big-benchmark/the-big-benchmark.bat
port changes to batch file too
[xonotic/xonotic.git] / misc / tools / the-big-benchmark / the-big-benchmark.bat
1 @echo off\r
2 \r
3 cd %~dp0\r
4 cd ..\..\..\r
5 \r
6 echo The Big Benchmark\r
7 echo  =================\r
8 echo.\r
9 if not exist all goto nogit\r
10 echo For Git builds, please use the-big-benchmark.sh instead!\r
11 goto end\r
12 :nogit\r
13 if "%1" == "" goto noarg\r
14 set xonotic=%1\r
15 goto postarg\r
16 :noarg\r
17 if "%ProgramFiles(x86)%" == "" goto bit32\r
18 :bit64\r
19 set xonotic=xonotic-x64.exe\r
20 goto postarg\r
21 :bit32\r
22 set xonotic=xonotic.exe\r
23 goto postarg\r
24 :postarg\r
25 \r
26 if exist data\the-big-benchmark.log del data\the-big-benchmark.log\r
27 if exist data\benchmark.log del data\benchmark.log\r
28 if exist data\engine.log del data\engine.log\r
29 set p=+r_texture_dds_load 1 +cl_playerdetailreduction 0 +developer 1 -nohome -benchmarkruns 4 -benchmarkruns_skipfirst -benchmark demos/the-big-keybench.dem\r
30 \r
31 goto start\r
32 \r
33 :benchmark\r
34 echo Benchmarking on %e%\r
35 if exist data\benchmark.log del data\benchmark.log\r
36 echo + %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% > data\engine.log\r
37 %xonotic% %2 %3 %4 %5 %6 %7 %8 %9 +exec effects-%e%.cfg %p% >> data\engine.log 2>&1\r
38 find "MED: " data\engine.log\r
39 find "]quit" data\engine.log >nul\r
40 if not errorlevel 1 goto done\r
41 type data\engine.log >> data\the-big-benchmark.log\r
42 type data\benchmark.log >> data\the-big-benchmark.log\r
43 if not "%e%" == "med" goto nomed\r
44 find "checking for OpenGL 2.0 core features...  not detected" data\engine.log >nul\r
45 if errorlevel 1 goto nomed\r
46 echo OpenGL 2.0 or later required for Normal quality and higher, exiting.\r
47 goto done\r
48 :nomed\r
49 if not "%e%" == "high" goto nohigh\r
50 find "vid_soft 1" data\engine.log >nul\r
51 if errorlevel 1 goto nohigh\r
52 echo Software rendering does not support Ultra and Ultimate quality settings, exiting.\r
53 goto done\r
54 :nohigh\r
55 goto z%e%\r
56 \r
57 :start\r
58 \r
59 set e=omg\r
60 goto benchmark\r
61 :zomg\r
62 \r
63 set e=low\r
64 goto benchmark\r
65 :zlow\r
66 \r
67 set e=med\r
68 goto benchmark\r
69 :zmed\r
70 \r
71 set e=normal\r
72 goto benchmark\r
73 :znormal\r
74 \r
75 set e=high\r
76 goto benchmark\r
77 :zhigh\r
78 \r
79 set e=ultra\r
80 goto benchmark\r
81 :zultra\r
82 \r
83 set e=ultimate\r
84 goto benchmark\r
85 :zultimate\r
86 \r
87 :done\r
88 \r
89 if exist data\benchmark.log del data\benchmark.log\r
90 if exist data\engine.log del data\engine.log\r
91 \r
92 if exist data\the-big-benchmark.log goto logisgood\r
93 echo.\r
94 echo The benchmark has been aborted. No log file has been written.\r
95 goto end\r
96 \r
97 :logisgood\r
98 echo.\r
99 echo Please provide the the following info to the Xonotic developers:\r
100 echo  - CPU speed\r
101 echo  - memory size\r
102 echo  - graphics card (which vendor, which model)\r
103 echo  - operating system (including whether it is 32bit or 64bit)\r
104 echo  - graphics driver version\r
105 echo  - the file the-big-benchmark.log in the data directory\r
106 echo.\r
107 echo Thank you\r
108 :end\r
109 pause\r