-
Notifications
You must be signed in to change notification settings - Fork 17
/
check_prerequesites.bat
65 lines (56 loc) · 1.19 KB
/
check_prerequesites.bat
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
:: checks if installing of thirdparty products took place
@echo off
set THIRDPARTY_DIR=Thirdparty
set LIB_DIR=%THIRDPARTY_DIR%\lib
set INCLUDE_DIR=%THIRDPARTY_DIR%\include
set BOOST_INCLUDE_DIR=%INCLUDE_DIR%\boost
set INTTYPE_INCLUDE_FILES=inttypes.h stdint.h
:: changes to directory of this script
pushd "%~dp0"
if not exist %LIB_DIR% (
echo %LIB_DIR% missing!
goto error
)
if not exist %INCLUDE_DIR% (
echo %INCLUDE_DIR% missing!
goto error
)
if not exist %BOOST_INCLUDE_DIR% (
echo %BOOST_INCLUDE_DIR% missing!
goto fatal_error
)
pushd %INCLUDE_DIR%
for %%i in (%INTTYPE_INCLUDE_FILES%) do (
if not exist %%i (
echo %%i is missing!
goto fatal_error
)
)
popd
:: Very weak check - improve!!
pushd %LIB_DIR%
set FOUND_LIB=NONE
for /r %%i in (*) do (
set FOUND_LIB=YES
)
if %FOUND_LIB%==NONE (
echo No library files found!
goto :fatal_error
)
popd
popd
exit 0
:error
echo.
echo install_thirdparty.bat executed? See Readme.txt!
echo.
echo Finished with errors
popd
exit 1
:fatal_error
echo.
echo install_thirdparty.bat seems to be broken or configuration of install_thirdparty.bat is strange!
echo.
echo Finished with errors
popd
exit 1