aboutsummaryrefslogtreecommitdiff
path: root/tools/run.bat
blob: 007126db6fe06be4107d22ad9289dfd826d1a933 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@echo off
set RC=
setlocal
cd ..

if "%1" == "" (
echo ERROR: Please specify a target platform: win32 or win64
set ERRORLEVEL=1
goto end
)

if "%2" == "" (
echo ERROR: Please specify a build type: Debug or Release
set ERRORLEVEL=1
goto end
)

if "%3" == "" (
echo ERROR: Please specify a run type: detailed or simple
set ERRORLEVEL=1
goto end
)

set OUT_PATH=".\out\%1"
set LIB_PATH="%OUT_PATH%\%2"
set CLS_PATH=".\third_party\jogamp\jar\*;%OUT_PATH%"
set RUN_TYPE="%3"

:: Remove the first three params (%1, %2 and %3) and pass the rest to java.
shift
shift
shift

java -cp %CLS_PATH% -Djava.library.path=%LIB_PATH% tests.%RUN_TYPE%.MainFrame %*

:end
endlocal & set RC=%ERRORLEVEL%
goto omega

:returncode
exit /B %RC%

:omega
call :returncode %RC%