@echo off del tmp?.txt 2>nul rem ======================================================================================================== regedit /ea temp1.txt HKEY_CURRENT_USER\Software\Borland\Delphi\7.0\Library more +3 temp1.txt>temp2.txt gsar -s; -r:013:010 -f temp2.txt temp1.txt >nul gsar -s\\ -r\ -f temp1.txt temp2.txt >nul for /f "tokens=*" %%a in ('type temp2.txt ^| find "Search Path"') do set "tempVar1=%%a" set "tempVar1=%tempVar1:~15%" echo %tempVar1%>temp1.txt more +1 temp2.txt>>temp1.txt set lines=0 for /f "tokens=*" %%a in (temp1.txt) do set /a "lines+=1" rem =========================================================================== Echo ******* Building ******* if exist .cfg ren .cfg .cf~ if exist DCC32.cfg ren DCC32.cfg DCC32.cf~ rem # Make console target, unless overridden later echo -$A8 >> DCC32.cfg echo -$B- >> DCC32.cfg echo -$C+ >> DCC32.cfg echo -$D+ >> DCC32.cfg echo -$E->> DCC32.cfg echo -$F- >> DCC32.cfg echo -$G+ >> DCC32.cfg echo -$H+ >> DCC32.cfg echo -$I+ >> DCC32.cfg echo -$J- >> DCC32.cfg echo -$K- >> DCC32.cfg echo -$L+ >> DCC32.cfg echo -$M- >> DCC32.cfg echo -$N+ >> DCC32.cfg echo -$O+ >> DCC32.cfg echo -$P+ >> DCC32.cfg echo -$Q- >> DCC32.cfg echo -$R- >> DCC32.cfg echo -$S- >> DCC32.cfg echo -$T- >> DCC32.cfg echo -$U- >> DCC32.cfg echo -$V+ >> DCC32.cfg echo -$W- >> DCC32.cfg echo -$X+ >> DCC32.cfg echo -$YD >> DCC32.cfg echo -$Z1 >> DCC32.cfg echo -GD >> DCC32.cfg echo -cg >> DCC32.cfg echo -AWinTypes=Windows;WinProcs=Windows;DbiTypes=BDE;DbiProcs=BDE;DbiErrs=BDE; >> DCC32.cfg echo -H+ >> DCC32.cfg echo -W+ >> DCC32.cfg echo -M >> DCC32.cfg rem # Min/MaxStackSize echo -M16384,1048576 >> DCC32.cfg rem # ImageBase echo -K$00400000 >> DCC32.cfg echo -LE"c:\program files\borland\delphi7\Projects\bpl" >> DCC32.cfg echo -LN"c:\program files\borland\delphi7\Projects\Bpl" >> DCC32.cfg echo -DEUREKALOG;EUREKALOG_VER6 >> DCC32.cfg rem # Packages echo -LUvcl;vclx >> DCC32.cfg rem # SearchPath set /p=-U<nul>>DCC32.cfg call :writeSearchPath DCC32.cfg echo.>>DCC32.cfg rem # SearchPath set /p=-R<nul>>DCC32.cfg call :writeSearchPath DCC32.cfg echo.>>DCC32.cfg rem # SearchPath set /p=-O<nul>>DCC32.cfg call :writeSearchPath DCC32.cfg echo.>>DCC32.cfg rem # SearchPath set /p=-I<nul>>DCC32.cfg call :writeSearchPath DCC32.cfg echo.>>DCC32.cfg rem # BuildAll echo -B >> DCC32.cfg "c:\Program Files\Borland\Delphi7\Bin\DCC32.EXE" *.dpr %1 %2 %3 %4 %5 %6 %7 %8 %9 if errorlevel 1 goto GotError goto Finish rem # Got an error. Wait for user input :GotError echo Error! pause :Finish del DCC32.cfg if exist DCC32.cf~ ren DCC32.cf~ DCC32.cfg if exist .cf~ ren .cf~ .cfg del temp?.txt 2>nul Echo ******* Done. ******* :End goto :EOF :writeSearchPath setlocal enabledelayedexpansion set "count=1" set /p=""<nul>>"%~1%" for /f "tokens=*" %%a in (temp1.txt) do ( set "sp=%%a;" if !count!==1 set "sp="""!sp!" if !count!==!lines! set "sp=!sp:~0,-1!" set /p=!sp!<nul>>"%~1%" set /a count+=1 ) |