@echo off setlocal enableextensions set VERSION=%1 if '%VERSION%' EQU '' goto Usage set PERLCMD=C:\Perl\Bin\Perl.exe set ROOTDIR=E:\EaBuild.DMA set ARCHIVEDIR=E:\DMA set LOG=%ROOTDIR%\IncrementalBuild.log set stars=******************************************************************************** echo %stars% > %LOG% 2>&1 echo Build Process started at: >> %LOG% 2>&1 date /t >> %LOG% 2>&1 time /t >> %LOG% 2>&1 echo %stars% >> %LOG% 2>&1 echo Changing drive to E: >> %LOG% 2>&1 E: >> %LOG% 2>&1 echo Changing directory to \BuildTools >> %LOG% 2>&1 cd \BuildTools >> %LOG% 2>&1 if /I '%VERSION%' EQU '/AUTO' goto GetBuildNumber goto StartBuild :GetBuildNumber echo Getting last build directory... >> %LOG% 2>&1 GetLastBuildDir.pl %ARCHIVEDIR% >> %LOG% 2>&1 echo Setting next build number... >> %LOG% 2>&1 set /A VERSION=%ERRORLEVEL% + 1 echo Set build number to %VERSION%. >> %LOG% 2>&1 :StartBuild echo Deleting T: >> %LOG% 2>&1 subst t: /d >> %LOG% 2>&1 echo Mapping T: to %ROOTDIR% >> %LOG% 2>&1 subst t: %ROOTDIR% >> %LOG% 2>&1 if ERRORLEVEL 0 goto Build goto Finish :Build echo %stars% >> %LOG% 2>&1 echo Building projects... echo Building projects... >> %LOG% 2>&1 %PERLCMD% BuildProjects.pl -dT: -fDmaProjects.ini -pIntel >> %LOG% 2>&1 echo %stars% >> %LOG% 2>&1 echo Building Help... echo Building Help... >> %LOG% 2>&1 Call DmaBuildHelp.cmd \EaBuild.DMA %ROOTDIR%\BuildHelp.log >> %LOG% 2>&1 echo %stars% >> %LOG% 2>&1 echo Checking projects... echo Checking projects... >> %LOG% 2>&1 %PERLCMD% CheckProjects.pl -dT: -fDmaProjects.ini -pIntel >> %LOG% 2>&1 if ERRORLEVEL 1 goto Archive echo %stars% >> %LOG% 2>&1 echo Deleting temporary files... echo Deleting temporary files... >> %LOG% 2>&1 Call DeleteTempFiles.cmd T: >> %LOG% 2>&1 echo %stars% >> %LOG% 2>&1 echo Creating installation... echo Creating installation... >> %LOG% 2>&1 Call DmaCreateInstall.cmd 6.0 >> %LOG% 2>&1 :Post if %VERSION% == 0 goto Finish if %VERSION% LSS 10 set VERSION=0%VERSION% if not exist %ROOTDIR%\Bin\IntelRelease\DMA.msi goto Archive echo %stars% >> %LOG% 2>&1 echo Posting build... echo Posting build... >> %LOG% 2>&1 Call DmaPostBuild.cmd %VERSION% >> %LOG% 2>&1 :Archive echo %stars% >> %LOG% 2>&1 echo Archiving build... echo Archiving build... >> %LOG% 2>&1 Call DmaArchiveBuild.cmd %ARCHIVEDIR%\Build%VERSION% >> %LOG% 2>&1 :Finish echo %stars% >> %LOG% 2>&1 echo Build Process ended at: >> %LOG% 2>&1 date /t >> %LOG% 2>&1 time /t >> %LOG% 2>&1 echo %stars% >> %LOG% 2>&1 goto End :Usage echo Usage: "DmaIncrementalBuild.cmd " :End endlocal