Build RTL when not exist while compiling examples

This commit is contained in:
Владислав Джавадов 2020-05-31 20:58:17 +03:00
parent 956e9db0e8
commit a9f98b9894
2 changed files with 5 additions and 10 deletions

View File

@ -8,14 +8,17 @@ if "%Source%"=="" (
) )
set Bin=%~dp0..\Bin set Bin=%~dp0..\Bin
set Options=-b -$C- -$I- -$T+ set Options=-$C- -$I- -$T+
set Target=%Bin%\%~n1 set Target=%Bin%\%~n1
set Units=%~dp0..\RTL;%~dp0..\Lib set Units=%~dp0..\RTL;%~dp0..\Lib
if not exist "%Bin%" mkdir "%Bin%" if not exist "%Bin%" mkdir "%Bin%"
if exist "%Source%.cfg" del "%Source%.cfg" if exist "%Source%.cfg" del "%Source%.cfg"
dcc32 "%Source%.dpr" -e"%Bin%" %Options% -u"%Units%" if not exist "%~dp0..\RTL\SysInit.dcu" call "%~dp0..\build-RTL.bat"
if errorlevel 1 goto exit
dcc32 "%Source%.dpr" -e"%Bin%" -u"%Units%" %Options%
if errorlevel 1 goto exit if errorlevel 1 goto exit
"%~dp0..\Pet" -nologo -strip -trunc -dropsect .idata,.rsrc -rebase 0 -osver 0.7 -log brief -into "%Target%.exe" "%~dp0..\Pet" -nologo -strip -trunc -dropsect .idata,.rsrc -rebase 0 -osver 0.7 -log brief -into "%Target%.exe"

View File

@ -1,8 +0,0 @@
@echo off
call %~dp0build-RTL.bat
if errorlevel 1 goto exit
call %~dp0build-examples.bat
:exit