[Jenkins] add auto generate bindings for win7

This commit is contained in:
lm 2014-01-23 15:38:26 +08:00
parent f43f3c770b
commit f364e64e3c
2 changed files with 39 additions and 0 deletions

View File

@ -0,0 +1,37 @@
@echo off
::!/bin/bash
:: Generate JS and Lua bindings for Cocos2D-X
:: ... using Android NDK system headers
:: ... and automatically update submodule references
:: ... and push these changes to remote repos
:: Dependencies
::
:: For bindings generator:
:: (see ../../../tojs/genbindings.sh and ../../../tolua/genbindings-win32.bat
:: ... for the defaults used if the environment is not customized)
::
:: * $PYTHON_BIN
:: * $CLANG_ROOT
:: * $NDK_ROOT
::
set COCOS2DX_ROOT=%cd%/../..
set "COCOS2DX_ROOT=%COCOS2DX_ROOT:\=/%"
set TO_JS_ROOT=%COCOS2DX_ROOT%/tools/tojs
set TO_LUA_ROOT=%COCOS2DX_ROOT%/tools/tolua
set GENERATED_WORKTREE=%COCOS2DX_ROOT%/cocos/scripting/auto-generated
set "GENERATED_WORKTREE=%GENERATED_WORKTREE:/=\%"
:: Run to_js genbindings
cd %TO_JS_ROOT%
genbindings-win32.bat
:: Run to_lua genbindings
cd %TO_LUA_ROOT%
genbindings-win32.bat
echo
echo Bindings generated successfully
echo

View File

@ -110,6 +110,8 @@ def main():
# Generate binding glue codes # Generate binding glue codes
if(platform.system() == 'Darwin'): if(platform.system() == 'Darwin'):
os.system("tools/jenkins-scripts/gen_jsb.sh") os.system("tools/jenkins-scripts/gen_jsb.sh")
elif(platform.system() == 'Windows'):
os.system("tools/jenkins-scripts/gen_jsb_win32.bat")
#make temp dir #make temp dir
print "current dir is" + os.environ['WORKSPACE'] print "current dir is" + os.environ['WORKSPACE']