diff --git a/build/install-deps-linux.sh b/build/install-deps-linux.sh index 22ac303efa..6fceed60af 100755 --- a/build/install-deps-linux.sh +++ b/build/install-deps-linux.sh @@ -3,6 +3,11 @@ # Change directory to the location of this script cd $(dirname ${BASH_SOURCE[0]}) +if [ ! $(command -v apt-get) ]; then + echo "Not a .deb package system. Please install dependencies manually" + exit 0 +fi + DEPENDS='libx11-dev' DEPENDS+=' libxmu-dev' DEPENDS+=' libglu1-mesa-dev' diff --git a/tools/tojs/genbindings.py b/tools/tojs/genbindings.py index 3008534cd4..275b3e9f5d 100755 --- a/tools/tojs/genbindings.py +++ b/tools/tojs/genbindings.py @@ -86,7 +86,7 @@ def main(): elif os.path.isdir(x64_llvm_path): llvm_path = x64_llvm_path else: - print 'llvm toochain not found!' + print 'llvm toolchain not found!' print 'path: %s or path: %s are not valid! ' % (x86_llvm_path, x64_llvm_path) sys.exit(1) @@ -145,15 +145,15 @@ def main(): with _pushd(output_dir): _run_cmd('dos2unix *') - print '---------------------------------' - print 'Generating bindings succeeds.' - print '---------------------------------' + print '----------------------------------------' + print 'Generating javascript bindings succeeds.' + print '----------------------------------------' except Exception as e: if e.__class__.__name__ == 'CmdError': - print '---------------------------------' - print 'Generating bindings fails.' - print '---------------------------------' + print '-------------------------------------' + print 'Generating javascript bindings fails.' + print '-------------------------------------' sys.exit(1) else: raise diff --git a/tools/tolua/genbindings.py b/tools/tolua/genbindings.py index cc7d0dacea..080a112cb2 100755 --- a/tools/tolua/genbindings.py +++ b/tools/tolua/genbindings.py @@ -86,7 +86,7 @@ def main(): elif os.path.isdir(x64_llvm_path): llvm_path = x64_llvm_path else: - print 'llvm toochain not found!' + print 'llvm toolchain not found!' print 'path: %s or path: %s are not valid! ' % (x86_llvm_path, x64_llvm_path) sys.exit(1) @@ -146,13 +146,13 @@ def main(): _run_cmd('dos2unix *') print '---------------------------------' - print 'Generating bindings succeeds.' + print 'Generating lua bindings succeeds.' print '---------------------------------' except Exception as e: if e.__class__.__name__ == 'CmdError': print '---------------------------------' - print 'Generating bindings fails.' + print 'Generating lua bindings fails.' print '---------------------------------' sys.exit(1) else: diff --git a/tools/travis-scripts/generate-jsbindings.sh b/tools/travis-scripts/generate-jsbindings.sh index a8d3f3ab9f..5e36d6c5fb 100755 --- a/tools/travis-scripts/generate-jsbindings.sh +++ b/tools/travis-scripts/generate-jsbindings.sh @@ -39,7 +39,7 @@ if [ "$PLATFORM"x = "ios"x ]; then cd Cheetah-2.4.4 sudo python setup.py install 2> /dev/null > /dev/null popd -else +elif [ $(command -v apt-get) ]; then sudo apt-get --force-yes --yes install python-yaml python-cheetah fi diff --git a/tools/travis-scripts/run-script.sh b/tools/travis-scripts/run-script.sh index af628c3160..d9ae9f2663 100755 --- a/tools/travis-scripts/run-script.sh +++ b/tools/travis-scripts/run-script.sh @@ -5,8 +5,13 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" COCOS2DX_ROOT="$DIR"/../.. -export NDK_ROOT=$HOME/bin/android-ndk -export PYTHON_BIN=/usr/bin/python +if [ -z "$NDK_ROOT" ]; then + export NDK_ROOT=$HOME/bin/android-ndk +fi + +if [ -z "$PYTHON_BIN" ]; then + export PYTHON_BIN=/usr/bin/python +fi if [ "$GEN_JSB"x = "YES"x ]; then # Re-generation of the javascript bindings can perform push of the new @@ -74,6 +79,7 @@ elif [ "$PLATFORM"x = "linux"x ]; then cd $COCOS2DX_ROOT/tools/travis-scripts ./generate-jsbindings.sh + echo "Building cocos2d-x" cd $COCOS2DX_ROOT/build mkdir -p linux-build cd linux-build