diff --git a/tools/tojs/cocos2dx.ini b/tools/tojs/cocos2dx.ini index b0ac2a84ae..88b7857d25 100644 --- a/tools/tojs/cocos2dx.ini +++ b/tools/tojs/cocos2dx.ini @@ -7,10 +7,10 @@ prefix = cocos2dx # all classes will be embedded in that namespace target_namespace = cc -android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include android_flags = -D_SIZE_T_DEFINED_ -clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include diff --git a/tools/tojs/cocos2dx_extension.ini b/tools/tojs/cocos2dx_extension.ini index 1987dcfcfc..6a31b61f3c 100644 --- a/tools/tojs/cocos2dx_extension.ini +++ b/tools/tojs/cocos2dx_extension.ini @@ -7,10 +7,10 @@ prefix = cocos2dx_extension # all classes will be embedded in that namespace target_namespace = cc -android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.6/include +android_headers = -I%(androidndkdir)s/platforms/android-14/arch-arm/usr/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/libs/armeabi-v7a/include -I%(androidndkdir)s/sources/cxx-stl/gnu-libstdc++/4.7/include android_flags = -D_SIZE_T_DEFINED_ -clang_headers = -I%(clangllvmdir)s/lib/clang/3.1/include +clang_headers = -I%(clangllvmdir)s/lib/clang/3.3/include clang_flags = -nostdinc -x c++ -std=c++11 cocos_headers = -I%(cocosdir)s/cocos2dx/include -I%(cocosdir)s/cocos2dx/platform -I%(cocosdir)s/cocos2dx/platform/android -I%(cocosdir)s/cocos2dx -I%(cocosdir)s/cocos2dx/kazmath/include -I%(cocosdir)s/extensions diff --git a/tools/travis-scripts/before-install.sh b/tools/travis-scripts/before-install.sh index 9fd123ece2..dc26ab044a 100755 --- a/tools/travis-scripts/before-install.sh +++ b/tools/travis-scripts/before-install.sh @@ -6,6 +6,10 @@ set -e DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" COCOS2DX_ROOT="$DIR"/../.. HOST_NAME="" +LLVM_VERSION="" +LLVM_PACKAGE="" +LLVM_PACKAGE_SUFFIX="" + mkdir -p $HOME/bin pushd $HOME/bin @@ -28,18 +32,27 @@ install_android_ndk() install_llvm() { + LLVM_VERSION="3.3" if [ "$PLATFORM"x = "ios"x ]; then - HOST_NAME="apple-darwin11" + LLVM_PACKAGE="clang+llvm-3.3-x86_64-apple-darwin12" + LLVM_PACKAGE_SUFFIX = ".tar.gz" else - HOST_NAME="linux-ubuntu_12.04" + LLVM_PACKAGE="clang+llvm-3.3-Ubuntu-13.04-x86_64-linux-gnu" + LLVM_PACKAGE_SUFFIX = ".tar.bz2" fi - # Download llvm3.1 - echo "Download clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz" - curl -O http://llvm.org/releases/3.1/clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz - echo "Decompress clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz ..." - tar xzf clang+llvm-3.1-x86_64-${HOST_NAME}.tar.gz + + # Download llvm + echo "Download ${LLVM_PACKAGE} ..." + curl -O http://llvm.org/releases/${LLVM_VERSION}/${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX} + echo "Decompress ${LLVM_PACKAGE} ..." + if [ "$PLATFORM"x = "ios"x ]; then + tar xzf ${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX} + else + tar xjf ${LLVM_PACKAGE}${LLVM_PACKAGE_SUFFIX} + fi + # Rename llvm - mv clang+llvm-3.1-x86_64-${HOST_NAME} clang+llvm-3.1 + mv ${LLVM_PACKAGE} clang+llvm-${LLVM_VERSION} } install_llvm_3_2()