@echo off
rem Build WB from source tarball
rem

set edition=%1
set version=%2
set vertype=%3

cd "\Documents and Settings\mysqldev\build\mysql-workbench-%edition%-%version%"

call setedition%edition%.cmd

echo Compiling %edition% %version%

if "%edition%"=="oss" devenv /rebuild "Release_OSS|x86" /out buildlog_%edition%.txt MySQLWorkbench.sln
if "%edition%"=="se" devenv /rebuild "Release|x86" /out buildlog_%edition%.txt MySQLWorkbench.sln

echo ----------------- >> buildlog_%edition%.txt

echo "Making MSI package"
cd build/msi
call MakeSetup %edition% %version% %vertype% >> buildlog_%edition%.txt
cd ../..

echo ----------------- >> buildlog_%edition%.txt

echo "Making ZIP package"
cd build/zip
call MakeZip %edition% %version% %vertype% >> buildlog_%edition%.txt
cd ../..
