@echo off
if exist setenv.bat call setenv.bat
computil SetupC10
if exist setenv.bat call setenv.bat
call clean.bat
if not exist ..\..\DataLinks\*.* md ..\..\DataLinks >nul

set DCCOPTS=-N..\..\D2006Win -E..\..\DataLinks -LN..\..\DataLinks -U..\..\D2006Win;..\..\IDE;..\..\QUAD -I..\Win;..\DataLink -$D-,L- -V-

REM ***************************************************
REM Compile DataLink drivers
REM ***************************************************
%NDC10%\bin\dcc32.exe ..\DataLink\DataLinkBDE.dpr -M -H -W -Q %DCCOPTS% %1 %2 %3
if errorlevel 1 goto enderror

%NDC10%\bin\dcc32.exe ..\DataLink\DataLinkADO.dpr -M -H -W -Q %DCCOPTS% %1 %2 %3
if errorlevel 1 goto enderror

%NDC10%\bin\dcc32.exe ..\DataLink\DataLinkDBX.dpr -M -H -W -Q %DCCOPTS% %1 %2 %3
if errorlevel 1 goto enderror

%NDC10%\bin\dcc32.exe ..\DataLink\DataLinkInterbase.dpr -M -H -W -Q %DCCOPTS% %1 %2 %3
if errorlevel 1 goto enderror

del ..\..\D2006Win\RvDLADOCfg.dcu
del ..\..\D2006Win\RvDLBDECfg.dcu
del ..\..\D2006Win\RvDLDBXCfg.dcu
del ..\..\D2006Win\RvDLInterbaseCfg.dcu

echo.
echo SUCCESS: DataLink Drivers Compiled
echo.
goto endok
:enderror
call clean
echo.
echo FAILURE: DataLink Drivers NOT Compiled
echo.
pause
:endok