@echo on
rem setup for calling nmake
rem setlocal

set casa_root_dir=%cd%
rem Do a free (retail) build
setlocal
call "C:\Program Files (x86)\Microsoft Visual Studio 2005\VC\bin\amd64\vcvarsamd64.bat"

rem VS 2005 crashed when building solution file, so right now building project level.
rem Also, it has the same problem with rebuild option, so I am cleaning binaries in my scripts.

cd /d %casa_root_dir%
.\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ./package/windows/authtokenclient64_msi/authtokenclient64_msi.vdproj version=1.7.%SVN_REVISION%
.\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ./package/windows/authtokenclientdevel64_msi/authtokenclientdevel64_msi.vdproj  version=1.7.%SVN_REVISION%
.\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ./package/windows/authtokenclientdevel_msi/authtokenclientdevel_msi.vdproj version=1.7.%SVN_REVISION%
.\tools\w32\VersionVDProj\bin\VersionVDProj.exe -msi ./package/windows/authtokenclient_msi/authtokenclient_msi.vdproj version=1.7.%SVN_REVISION%

devenv authclient.sln /build "Release|Win32"
devenv authclient.sln /build "Release|x64"

endlocal