echo on
REM Build root is the base directory of the build environment
SET BUILDROOT=c:\prophets
SET SCRIPTSROOT=c:\scripts

REM Add Scripts directory to Path
SET Path=%Path%;c:\scripts

cd %SCRIPTSROOT%\logs
del /f *.txt

REM Get rid of old log files
cd %buildroot%\logs
del /f *.log
del /f *.maplog
del /f *_dumpbin.txt
rd /s /q %buildroot%\logs\objects

REM Get rid of old map files if they exist
cd %buildroot%
rd /s /q maps

REM Get rid of old zip files if they exist
cd %buildroot%
del /f currentsource.zip

REM Get rid of old .txt files if they exist
cd %buildroot%
del /f *.txt

REM <BUILD>
cd %buildroot%
REM Get rid of sync'd exe's
REM I do this individually as opposed to *.exe to be careful, does need to be updated if binaries are added to process.
del /f guerilla.*
del /f blam.*
del /f tool.*
del /f sapien.*
del /f *.bat

cd %buildroot%\bin

del /f *.exe
del /f *.pdb
del /f *.map
del /f *.ilk
del /f *.xbe

cd %buildroot%\maps
del /f *.map

del /f %buildroot%\objects\blamlib\Xbox\Tag_Debug\blamlibXboxTag_Debug.lib
del /f %buildroot%\objects\blamlib\Xbox\Cache_Profile\blamlibXboxCache_Profile.lib
del /f %buildroot%\objects\blamlib\Xbox\Cache_Ship\blamlibXboxCache_Ship.lib
del /f %buildroot%\objects\blamlib\Xbox\Cache_Debug\blamlibXboxCache_Debug.lib
del /f %buildroot%\objects\blamlib\Win32\Tag_Debug\blamlibWin32Tag_Debug.lib
del /f %buildroot%\objects\blamlib\Xbox\Cache_Near_Ship\blamlibXboxCache_Near_Ship.lib
del /f %buildroot%\objects\blamlib\Xbox\Tag_Symbols\blamlibXboxTag_Symbols.lib
del /f %buildroot%\objects\blamlib\Xbox\Cache_Symbols\blamlibXboxCache_Symbols.lib
