Minor debugging messages and guards.

Dependencies installation is skipped on linux distributions that does not use .deb package format.
This commit is contained in:
Éloi Rivard 2014-02-12 15:01:46 +01:00
parent fa2481bb24
commit 79e3c05ef1
5 changed files with 24 additions and 13 deletions

View File

@ -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'

View File

@ -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

View File

@ -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:

View File

@ -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

View File

@ -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