diff --git a/tools/bindings-generator b/tools/bindings-generator index ad6f6c7816..71690550b5 160000 --- a/tools/bindings-generator +++ b/tools/bindings-generator @@ -1 +1 @@ -Subproject commit ad6f6c781687b0dd471c4df53c0ba5925e43894d +Subproject commit 71690550b5fcfcbcf3928adb0e8579fbbcd317a9 diff --git a/tools/tojs/genbindings-win32.bat b/tools/tojs/genbindings-win32.bat index b8c4c0e537..d1f5537f2a 100644 --- a/tools/tojs/genbindings-win32.bat +++ b/tools/tojs/genbindings-win32.bat @@ -1,11 +1,28 @@ @echo off :: This script is used to generate jsbinding glue codes. -:: You should modify PYTHON_ROOT and NDK_ROOT to work under your environment. -:: Android ndk version must be at least ndk-r9b. +:: Android ndk version must be ndk-r9b. -set PYTHON_ROOT=C:/Python27 -set NDK_ROOT=G:/android/android-ndk-r9b +setlocal +:: You should modify PYTHON_ROOT and NDK_ROOT to work under your environment. +:: or just uncomment the follow 2 lines and set them. + +:: set PYTHON_ROOT=C:/Python27 +:: set NDK_ROOT=G:/android/android-ndk-r9b + +setlocal ENABLEEXTENSIONS +if %errorlevel% neq 0 ( + echo Unable to enable extensions + goto QUIT + ) + +if defined PYTHON_ROOT (echo PYTHON_ROOT is defined.) else ( + echo PYTHON_ROOT is NOT defined! + goto QUIT) + +if defined NDK_ROOT (echo NDK_ROOT is defined.) else ( + echo NDK_ROOT is NOT defined! + goto QUIT) set NDK_LLVM_ROOT=%NDK_ROOT%/toolchains/llvm-3.3/prebuilt/windows-x86_64 set COCOS2DX_ROOT=%cd%/../.. @@ -81,8 +98,9 @@ goto QUIT echo --------------------------------- echo Generating bindings fails. echo --------------------------------- +endlocal :QUIT - pause +endlocal diff --git a/tools/tolua/genbindings-win32.bat b/tools/tolua/genbindings-win32.bat index 1aeddcdcfa..a4c00529a6 100644 --- a/tools/tolua/genbindings-win32.bat +++ b/tools/tolua/genbindings-win32.bat @@ -1,11 +1,28 @@ @echo off -:: This script is used to generate luabinding glue codes. -:: You should modify PYTHON_ROOT and NDK_ROOT to work under your environment. -:: Android ndk version must be at least ndk-r9b. +:: This script is used to generate jsbinding glue codes. +:: Android ndk version must be ndk-r9b. -set PYTHON_ROOT=C:/Python27 -set NDK_ROOT=G:/android/android-ndk-r9b +setlocal +:: You should modify PYTHON_ROOT and NDK_ROOT to work under your environment. +:: or just uncomment the follow 2 lines and set them. + +:: set PYTHON_ROOT=C:/Python27 +:: set NDK_ROOT=G:/android/android-ndk-r9b + +setlocal ENABLEEXTENSIONS +if %errorlevel% neq 0 ( + echo Unable to enable extensions + goto QUIT + ) + +if defined PYTHON_ROOT (echo PYTHON_ROOT is defined.) else ( + echo PYTHON_ROOT is NOT defined! + goto QUIT) + +if defined NDK_ROOT (echo NDK_ROOT is defined.) else ( + echo NDK_ROOT is NOT defined! + goto QUIT) set NDK_LLVM_ROOT=%NDK_ROOT%/toolchains/llvm-3.3/prebuilt/windows-x86_64 set COCOS2DX_ROOT=%cd%/../.. @@ -82,8 +99,9 @@ goto QUIT echo --------------------------------- echo Generating bindings fails. echo --------------------------------- +endlocal :QUIT - pause +endlocal