mirror of https://github.com/axmolengine/axmol.git
Minor debugging messages and guards.
Dependencies installation is skipped on linux distributions that does not use .deb package format.
This commit is contained in:
parent
fa2481bb24
commit
79e3c05ef1
|
@ -3,6 +3,11 @@
|
||||||
# Change directory to the location of this script
|
# Change directory to the location of this script
|
||||||
cd $(dirname ${BASH_SOURCE[0]})
|
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='libx11-dev'
|
||||||
DEPENDS+=' libxmu-dev'
|
DEPENDS+=' libxmu-dev'
|
||||||
DEPENDS+=' libglu1-mesa-dev'
|
DEPENDS+=' libglu1-mesa-dev'
|
||||||
|
|
|
@ -86,7 +86,7 @@ def main():
|
||||||
elif os.path.isdir(x64_llvm_path):
|
elif os.path.isdir(x64_llvm_path):
|
||||||
llvm_path = x64_llvm_path
|
llvm_path = x64_llvm_path
|
||||||
else:
|
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)
|
print 'path: %s or path: %s are not valid! ' % (x86_llvm_path, x64_llvm_path)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -145,15 +145,15 @@ def main():
|
||||||
with _pushd(output_dir):
|
with _pushd(output_dir):
|
||||||
_run_cmd('dos2unix *')
|
_run_cmd('dos2unix *')
|
||||||
|
|
||||||
print '---------------------------------'
|
print '----------------------------------------'
|
||||||
print 'Generating bindings succeeds.'
|
print 'Generating javascript bindings succeeds.'
|
||||||
print '---------------------------------'
|
print '----------------------------------------'
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if e.__class__.__name__ == 'CmdError':
|
if e.__class__.__name__ == 'CmdError':
|
||||||
print '---------------------------------'
|
print '-------------------------------------'
|
||||||
print 'Generating bindings fails.'
|
print 'Generating javascript bindings fails.'
|
||||||
print '---------------------------------'
|
print '-------------------------------------'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
raise
|
raise
|
||||||
|
|
|
@ -86,7 +86,7 @@ def main():
|
||||||
elif os.path.isdir(x64_llvm_path):
|
elif os.path.isdir(x64_llvm_path):
|
||||||
llvm_path = x64_llvm_path
|
llvm_path = x64_llvm_path
|
||||||
else:
|
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)
|
print 'path: %s or path: %s are not valid! ' % (x86_llvm_path, x64_llvm_path)
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
|
|
||||||
|
@ -146,13 +146,13 @@ def main():
|
||||||
_run_cmd('dos2unix *')
|
_run_cmd('dos2unix *')
|
||||||
|
|
||||||
print '---------------------------------'
|
print '---------------------------------'
|
||||||
print 'Generating bindings succeeds.'
|
print 'Generating lua bindings succeeds.'
|
||||||
print '---------------------------------'
|
print '---------------------------------'
|
||||||
|
|
||||||
except Exception as e:
|
except Exception as e:
|
||||||
if e.__class__.__name__ == 'CmdError':
|
if e.__class__.__name__ == 'CmdError':
|
||||||
print '---------------------------------'
|
print '---------------------------------'
|
||||||
print 'Generating bindings fails.'
|
print 'Generating lua bindings fails.'
|
||||||
print '---------------------------------'
|
print '---------------------------------'
|
||||||
sys.exit(1)
|
sys.exit(1)
|
||||||
else:
|
else:
|
||||||
|
|
|
@ -39,7 +39,7 @@ if [ "$PLATFORM"x = "ios"x ]; then
|
||||||
cd Cheetah-2.4.4
|
cd Cheetah-2.4.4
|
||||||
sudo python setup.py install 2> /dev/null > /dev/null
|
sudo python setup.py install 2> /dev/null > /dev/null
|
||||||
popd
|
popd
|
||||||
else
|
elif [ $(command -v apt-get) ]; then
|
||||||
sudo apt-get --force-yes --yes install python-yaml python-cheetah
|
sudo apt-get --force-yes --yes install python-yaml python-cheetah
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -5,8 +5,13 @@ set -e
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
COCOS2DX_ROOT="$DIR"/../..
|
COCOS2DX_ROOT="$DIR"/../..
|
||||||
|
|
||||||
export NDK_ROOT=$HOME/bin/android-ndk
|
if [ -z "$NDK_ROOT" ]; then
|
||||||
export PYTHON_BIN=/usr/bin/python
|
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
|
if [ "$GEN_JSB"x = "YES"x ]; then
|
||||||
# Re-generation of the javascript bindings can perform push of the new
|
# 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
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
./generate-jsbindings.sh
|
./generate-jsbindings.sh
|
||||||
|
|
||||||
|
echo "Building cocos2d-x"
|
||||||
cd $COCOS2DX_ROOT/build
|
cd $COCOS2DX_ROOT/build
|
||||||
mkdir -p linux-build
|
mkdir -p linux-build
|
||||||
cd linux-build
|
cd linux-build
|
||||||
|
|
Loading…
Reference in New Issue