@echo off

del /s *.log  > null.txt

IF EXIST .\debug.txt del debug.txt

IF EXIST .\01_images\objs rmdir /s /q 01_Images\objs > null.txt
cd 01_images
call make_win images01.dpr >> ..\debug.txt
copy ..\starttemplate.bat images01.bat >> ..\debug.txt
echo "images01.exe" >> images01.bat
call make_win images02.dpr >> ..\debug.txt
copy ..\starttemplate.bat images02.bat >> ..\debug.txt
echo "images02.exe" >> images02.bat
cd ..

IF EXIST .\02_Controls\objs rmdir /s /q 02_Controls\objs > null.txt
cd 02_Controls
call make_win keyboard01.dpr >> ..\debug.txt
copy ..\starttemplate.bat keyboard01.bat >> ..\debug.txt
echo "keyboard01.exe" >> keyboard01.bat
cd ..

IF EXIST .\03_Music\objs rmdir /s /q 03_Music\objs > null.txt
cd 03_Music
call make_win music01.dpr >> ..\debug.txt
copy ..\starttemplate.bat music01.bat >> ..\debug.txt
echo "music01.exe" >> music01.bat
cd ..

IF EXIST .\05_Sprites\objs rmdir /s /q 05_Sprites\objs > null.txt
cd 05_Sprites
call make_win sprites01.dpr >> ..\debug.txt
copy ..\starttemplate.bat sprites01.bat >> ..\debug.txt
echo "sprites01.exe" >> sprites01.bat

call make_win sprites02.dpr >> ..\debug.txt
copy ..\starttemplate.bat sprites02.bat >> ..\debug.txt
echo "sprites02.exe" >> sprites02.bat

call make_win sprites05.dpr >> ..\debug.txt
copy ..\starttemplate.bat sprites05.bat >> ..\debug.txt
echo "sprites05.exe" >> sprites05.bat

cd ..

IF EXIST .\10_Tiles\objs rmdir /s /q 10_Tiles\objs > null.txt
cd 10_Tiles
call make_win tiles01.dpr >> ..\debug.txt
copy ..\starttemplate.bat tiles01.bat >> ..\debug.txt
echo "tiles01.exe" >> tiles01.bat
call make_win tiles02.dpr >> ..\debug.txt
copy ..\starttemplate.bat tiles02.bat >> ..\debug.txt
echo "tiles02.exe" >> tiles02.bat
cd ..

IF EXIST .\50_ISO\objs rmdir /s /q 50_ISO\objs > null.txt
cd 50_ISO
call make_win isotest.dpr >> ..\debug.txt
copy ..\starttemplate.bat isotest.bat >> ..\debug.txt
echo "isotest.exe" >> isotest.bat
cd ..

