CALL "C:\Program Files (x86)\Embarcadero\Studio\20.0\bin\rsvars.bat"
ECHO %
BDS%
ECHO %BDSCOMMONDIR%
SET BPLREG="HKEY_CURRENT_USER\Software\Embarcadero\
BDS\20.0\Known Packages"
ECHO %BPLREG%
SET LIBREG="HKEY_CURRENT_USER\Software\Embarcadero\
BDS\20.0\Library\Win64"
ECHO %LIBREG%
SET BPLPATH="%BDSCOMMONDIR%\
Bpl"
ECHO %BPLPATH%
SET BDSCATALOGREPO=C:\Users\%USERNAME%\Documents\TMP\Delphi
ECHO ================================================================================
rem LockBox3
ECHO LockBox3
ECHO LockBox3DR
rem add search path for library
SET LIB_LOCKBOX=%BDSCATALOGREPO%\LockBox3\design\;%BDSCATALOGREPO%\LockBox3\run\ciphers\;%BDSCATALOGREPO%\LockBox3\run\cryptography\;%BDSCATALOGREPO%\LockBox3\run\hashes\;%BDSCATALOGREPO%\LockBox3\run\library surface\;%BDSCATALOGREPO%\LockBox3\run\RSA\;%BDSCATALOGREPO%\LockBox3\run\utilities
:: extract path from registry entry
FOR /F "tokens=3* skip=2" %%a in ('reg
query %LIBREG% /v "Search Path"') do set "DELPHI_LIB_SEARCH=%%b"
ECHO New variable DELPHI_LIB_SEARCH = %DELPHI_LIB_SEARCH%
:: check if substring is already present in path -> if not: add it to path
echo %DELPHI_LIB_SEARCH%|find /i "%LIB_LOCKBOX%">nul || set DELPHI_LIB_SEARCH=%DELPHI_LIB_SEARCH%;%LIB_LOCKBOX%
reg add %LIBREG% /v "Search Path" /t REG_SZ /d "%DELPHI_LIB_SEARCH%" /f
:: compile in order to get *.bpl
msbuild "%BDSCATALOGREPO%\LockBox3\packages\Rio\Delphi\LockBox3DR.dproj" /t:Build /p:Configuration=Release /p:platform=Win64
IF NOT %ERRORLEVEL%==0 GOTO ERROR
reg delete %BPLREG% /v "%BPLPATH%\LockBox3DR260.bpl" /f >NUL 2>&1
reg add %BPLREG% /v "%BPLPATH%\LockBox3DR260.bpl" /t REG_SZ /d "Turbo LockBox3 Delphi
package" >NUL
::ECHO LockBox3FMXDD
msbuild "%BDSCATALOGREPO%\LockBox3\packages\Rio\Delphi\LockBox3FMXDD.dproj" /t:Build /p:Configuration=Release /p:platform=Win64
IF NOT %ERRORLEVEL%==0 GOTO ERROR
reg delete %BPLREG% /v "%BPLPATH%\LockBox3FMXDD260.bpl" /f >NUL 2>&1
reg add %BPLREG% /v "%BPLPATH%\LockBox3FMXDD260.bpl" /t REG_SZ /d "Turbo LockBox3 FMX designtime
package" >NUL
ECHO LockBox3VCLDD
msbuild "%BDSCATALOGREPO%\LockBox3\packages\Rio\Delphi\LockBox3VCLDD.dproj" /t:Build /p:Configuration=Release /p:platform=Win64
IF NOT %ERRORLEVEL%==0 GOTO ERROR
reg delete %BPLREG% /v "%BPLPATH%\LockBox3VCLDD260.bpl" /f >NUL 2>&1
reg add %BPLREG% /v "%BPLPATH%\LockBox3VCLDD260.bpl" /t REG_SZ /d "Turbo LockBox3
VCL designtime
package" >NUL
GOTO DONE
:ERROR
ECHO ================================================================================
ECHO FEHLER aufgetreten! ERRORLEVEL = %ERRORLEVEL%
ECHO ================================================================================
GOTO END
:DONE
ECHO ================================================================================
ECHO Build erfolgreich!
ECHO ================================================================================
GOTO END
:END
SET BPLREG=
SET BPLPATH=
SET LIBREG=
SET BDSCatalogRepository=
SET LIB_PATH_LOCKBOX=
SET BDSCATALOGREPO=
SET LIB_LOCKBOX=
SET DELPHI_LIB_SEARCH=