@echo off

if not defined SINDEVBASE ( goto failed )

call "%SINDEVBASE%\clean.bat"
call vcvars32.bat
call "%VS80COMNTOOLS%vsvars32.bat"

cd /D "%SINDEVBASE%"

:startcopy

devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "Sin"
devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "sinded"
devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "ref_gl"
devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "ref_soft"
devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "basegame"
devenv "%SINDEVBASE%\win32\sin.sln" /Build "Release|Win32" /Project "2015game"

cd win32

CALL package_x86.bat
CALL mvf.bat
goto end

:failed
echo SINDEVBASE not defined!
pause
goto end

:end
