diff --git a/tools/jenkins-scripts/gen_jsb_win32.bat b/tools/jenkins-scripts/gen_jsb_win32.bat new file mode 100644 index 0000000000..ec4440de91 --- /dev/null +++ b/tools/jenkins-scripts/gen_jsb_win32.bat @@ -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 \ No newline at end of file diff --git a/tools/jenkins-scripts/pull-request-builder.py b/tools/jenkins-scripts/pull-request-builder.py index e1b316e6d5..555e60532e 100755 --- a/tools/jenkins-scripts/pull-request-builder.py +++ b/tools/jenkins-scripts/pull-request-builder.py @@ -110,6 +110,8 @@ def main(): # Generate binding glue codes if(platform.system() == 'Darwin'): os.system("tools/jenkins-scripts/gen_jsb.sh") + elif(platform.system() == 'Windows'): + os.system("tools/jenkins-scripts/gen_jsb_win32.bat") #make temp dir print "current dir is" + os.environ['WORKSPACE']