SDK/Tools/build.bat

28 lines
455 B
Batchfile
Raw Normal View History

2020-05-22 00:15:03 +02:00
@echo off
set Source=%1
2020-06-28 21:07:46 +02:00
if #%Source%#==## (
2020-05-22 00:15:03 +02:00
echo Usage: %~n0 [source-file]
goto exit
)
call "%~dp0init.bat"
2020-05-23 15:55:40 +02:00
set Bin=%~dp0..\Bin
set DCU=%Bin%\DCU
set Options=-$C- -$I- -$T+
2020-05-22 00:15:03 +02:00
set Target=%Bin%\%~n1
set Units=%~dp0..\Lib;%DCU%
2020-05-22 00:15:03 +02:00
if exist "%Source%.cfg" del "%Source%.cfg"
2020-06-28 21:07:46 +02:00
dcc32 %Source%.dpr -e"%Bin%" -n"%DCU%" -u"%Units%" %Options%
2020-05-22 00:15:03 +02:00
if errorlevel 1 goto exit
call "%~dp0convert.bat" "%Target%.exe"
2020-05-22 00:15:03 +02:00
if errorlevel 1 goto exit
del "%Target%.exe"
:exit