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
|
|
|
|
)
|
|
|
|
|
2020-06-28 21:27:34 +02:00
|
|
|
call "%~dp0init.bat"
|
|
|
|
|
2020-05-23 15:55:40 +02:00
|
|
|
set Bin=%~dp0..\Bin
|
2020-06-28 21:27:34 +02:00
|
|
|
set DCU=%Bin%\DCU
|
2020-05-31 19:58:17 +02:00
|
|
|
set Options=-$C- -$I- -$T+
|
2020-05-22 00:15:03 +02:00
|
|
|
set Target=%Bin%\%~n1
|
2020-06-28 21:27:34 +02:00
|
|
|
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
|
|
|
|
|
2020-05-31 20:55:55 +02:00
|
|
|
call "%~dp0convert.bat" "%Target%.exe"
|
2020-05-22 00:15:03 +02:00
|
|
|
if errorlevel 1 goto exit
|
|
|
|
|
|
|
|
del "%Target%.exe"
|
|
|
|
|
|
|
|
:exit
|