I use batch scripts for every build job.
script . Delphi rsvars.bat ( Delphi, MSBuild Delphi ..).
, script MSBuild ( , MSBuild Jenkins).
, :
set BDS=C:\PathToDelphiLib
set FrameworkDir=C:\Windows\Microsoft.NET\Framework\v3.5
set FrameworkVersion=v3.5
set PATH=%FrameworkDir%;%BDS%\bin;%PATH%
set LANGDIR=EN
// set other variables
echo @@@ building the project
MSBuild.exe %WORKSPACE%\YourApp\YourApp.dproj "/p:Win32LibraryPath=$(BDS)\lib" /target:Build /p:config=%AConfigVariable% /p:Platform=Win32 /p:DCC_ExeOutput=%OutputDirVariable% /verbosity:quiet
Jenkins Windows
call %WORKSPACE%\YourApp\ContinuousIntegration\DelphiXE2_Build_Release.bat
, . . .