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

REM ***************************************************
REM Compile Runtime Package Indy60
REM ***************************************************
%NDD6%\bin\dcc32.exe Indy60.dpk /b /h /w /N..\D6 /LE..\D6 /LN..\D6 -$d-l-n+p+r-s-t-w- %1 %2 %3
if errorlevel 1 goto enderror
copy ..\D6\Indy60.bpl %NDWINSYS% >nul

REM ***************************************************
REM Compile Design-time Package dclIndy60
REM ***************************************************
%NDD6%\bin\dcc32.exe dclIndy60.dpk /b /h /w /N..\D6 /LE..\D6 /LN..\D6 /L..\D6\Indy60.dcp /U..\D6 -$d-l-n+p+r-s-t-w- %1 %2 %3
if errorlevel 1 goto enderror

REM ***************************************************
REM Clean-up
REM ***************************************************
del ..\D6\dclIndy60.dcu >nul
del ..\D6\dclIndy60.dcp >nul
del ..\D6\Indy60.dcu >nul
del ..\D6\Indy60.bpl >nul
del ..\D6\IdAbout.dcu >nul
del ..\D6\IdDsnPropEdBinding.dcu >nul
del ..\D6\IdDsnRegister.dcu >nul
del ..\D6\IdRegister.dcu >nul
goto endok
:enderror
call clean
echo Error!
:endok