2011-03-10 12:00:29 +08:00
|
|
|
@echo off
|
|
|
|
|
|
|
|
echo./*
|
|
|
|
echo.* Check VC++ environment...
|
|
|
|
echo.*/
|
|
|
|
echo.
|
|
|
|
|
|
|
|
if defined VS90COMNTOOLS (
|
|
|
|
set VSVARS="%VS90COMNTOOLS%vsvars32.bat"
|
2011-03-10 21:11:14 +08:00
|
|
|
set VC_VER=90
|
|
|
|
) else if defined VS100COMNTOOLS (
|
|
|
|
set VSVARS="%VS100COMNTOOLS%vsvars32.bat"
|
|
|
|
set VC_VER=100
|
2011-03-10 12:00:29 +08:00
|
|
|
)
|
|
|
|
|
|
|
|
if not defined VSVARS (
|
|
|
|
echo Can't find VC2008 or VC2010 installed!
|
|
|
|
goto ERROR
|
|
|
|
)
|
|
|
|
|
|
|
|
echo./*
|
|
|
|
echo.* Building cocos2d-x library binary, please wait a while...
|
|
|
|
echo.*/
|
|
|
|
echo.
|
|
|
|
|
|
|
|
call %VSVARS%
|
2011-03-10 21:11:14 +08:00
|
|
|
if %VC_VER%==90 (
|
|
|
|
vcbuild cocos2d-win32.vc2008.sln $ALL
|
|
|
|
) else if %VC_VER%==100 (
|
2011-03-11 15:12:49 +08:00
|
|
|
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Debug"
|
2011-03-25 17:41:54 +08:00
|
|
|
msbuild cocos2d-win32.vc2010.sln /p:Configuration="Release"
|
2011-03-10 21:11:14 +08:00
|
|
|
) else (
|
|
|
|
echo Script error.
|
|
|
|
goto ERROR
|
|
|
|
)
|
2011-03-10 12:00:29 +08:00
|
|
|
|
|
|
|
echo./*
|
|
|
|
echo.* Check the cocos2d-win32 application "tests.exe" ...
|
|
|
|
echo.*/
|
|
|
|
echo.
|
|
|
|
|
|
|
|
set CC_TEST_PATH=".\Release.win32\tests.exe"
|
|
|
|
if not exist %CC_TEST_PATH% (
|
|
|
|
echo Can't find the binary "tests.exe", is there build error?
|
|
|
|
goto ERROR
|
|
|
|
)
|
|
|
|
|
|
|
|
echo./*
|
|
|
|
echo.* Run cocos2d-win32 tests.exe and view Cocos2d-x Application Wizard for Visual Studio User Guide.
|
|
|
|
echo.*/
|
|
|
|
echo.
|
|
|
|
call %CC_TEST_PATH%
|
|
|
|
start http://www.cocos2d-x.org/projects/cocos2d-x/wiki/Cocos2d-x_Application_Wizard_for_Visual_Studio_User_Guide
|
|
|
|
goto EOF
|
|
|
|
|
|
|
|
:ERROR
|
|
|
|
pause
|
|
|
|
|
|
|
|
:EOF
|