| 1 |
rem @echo off |
| 2 |
|
| 3 |
set headersdir=%1 |
| 4 |
set headersname=%2 |
| 5 |
set libs=%3 |
| 6 |
set bins=%4 |
| 7 |
|
| 8 |
rem ************************************************************************ |
| 9 |
rem * check environment variables |
| 10 |
|
| 11 |
if not "%INCLUDEDIR%"=="" goto includedirset |
| 12 |
echo The INCLUDEDIR environment variable must be set to point to a directory |
| 13 |
echo to be able to perform the installation procedure. |
| 14 |
exit |
| 15 |
|
| 16 |
:includedirset |
| 17 |
if exist %INCLUDEDIR%\*.* goto includedirexists |
| 18 |
echo The INCLUDEDIR environment variable must point to an existing directory |
| 19 |
echo to be able to perform the installation procedure. |
| 20 |
exit |
| 21 |
|
| 22 |
:includedirexists |
| 23 |
|
| 24 |
if not "%LIBDIR%"=="" goto libdirset |
| 25 |
echo The LIBDIR environment variable must be set to point to a directory |
| 26 |
echo to be able to perform the installation procedure. |
| 27 |
exit |
| 28 |
|
| 29 |
:libdirset |
| 30 |
if exist %LIBDIR%\*.* goto libdirexists |
| 31 |
echo The LIBDIR environment variable must point to an existing directory |
| 32 |
echo to be able to perform the installation procedure. |
| 33 |
exit |
| 34 |
|
| 35 |
:libdirexists |
| 36 |
if not "%BINDIR%"=="" goto bindirset |
| 37 |
echo The BINDIR environment variable must be set to point to a directory |
| 38 |
echo to be able to perform the installation procedure. |
| 39 |
exit |
| 40 |
|
| 41 |
:bindirset |
| 42 |
if exist %BINDIR%\*.* goto bindirexists |
| 43 |
echo The BINDIR environment variable must point to an existing directory |
| 44 |
echo to be able to perform the installation procedure. |
| 45 |
exit |
| 46 |
|
| 47 |
:bindirexists |
| 48 |
|
| 49 |
echo All is well installing... |
| 50 |
|
| 51 |
rem ************************************************************************ |
| 52 |
rem * check input variables and install if necessary |
| 53 |
|
| 54 |
if "%headersdir%"=="" goto skipheaders |
| 55 |
if "%headersname%"=="" goto skipheaders |
| 56 |
|
| 57 |
xcopy /S /I /Y %headersdir% %INCLUDEDIR%\%headersname% |
| 58 |
|
| 59 |
:skipheaders |
| 60 |
|
| 61 |
if "%libs%"=="" goto skiplibs |
| 62 |
xcopy /S /I /Y %libs% %LIBDIR% |
| 63 |
|
| 64 |
:skiplibs |
| 65 |
|
| 66 |
if "%bins%"=="" goto skipbins |
| 67 |
xcopy /S /I /Y %bins% %BINDIR% |
| 68 |
|
| 69 |
:skipbins |
| 70 |
|
| 71 |
echo Installation finished. |