mirror of
https://github.com/cocos/cocos4.git
synced 2026-11-20 23:52:40 +08:00
use linux to generate bindings
This commit is contained in:
@@ -26,10 +26,10 @@ install_android_ndk()
|
||||
echo "Decompress android-ndk-r11c-${HOST_NAME}-x86_64.zip ..."
|
||||
unzip -q android-ndk-r11c-${HOST_NAME}-x86_64.zip
|
||||
# Rename ndk
|
||||
mv android-ndk-r9d android-ndk
|
||||
mv android-ndk-r11c android-ndk
|
||||
}
|
||||
|
||||
#we only use osx for generate bindings
|
||||
if [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
if [ $TRAVIS_OS_NAME == 'linux' ]; then
|
||||
install_android_ndk
|
||||
fi
|
||||
|
||||
@@ -29,7 +29,7 @@ JS_COMMIT_PATH="cocos/scripting/js-bindings/auto"
|
||||
# Exit on error
|
||||
set -e
|
||||
|
||||
if [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
if [ $TRAVIS_OS_NAME == 'linux' ]; then
|
||||
mkdir -p $HOME/bin
|
||||
pushd $HOME/bin
|
||||
curl -O http://pyyaml.org/download/pyyaml/PyYAML-3.10.zip
|
||||
@@ -60,28 +60,9 @@ git config user.email ${GH_EMAIL}
|
||||
git config user.name ${GH_USER}
|
||||
popd
|
||||
|
||||
#backup the chipmunk js bindings
|
||||
backup_dir="$JS_AUTO_GENERATED_DIR"/../backup
|
||||
echo $backup_dir
|
||||
mkdir $backup_dir
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_auto_classes.cpp "$backup_dir"/
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_auto_classes.h "$backup_dir"/
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_auto_classes_registration.h "$backup_dir"/
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_functions.cpp "$backup_dir"/
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_functions.h "$backup_dir"/
|
||||
cp "$JS_AUTO_GENERATED_DIR"/js_bindings_chipmunk_functions_registration.h "$backup_dir"/
|
||||
|
||||
rm -rf "$JS_AUTO_GENERATED_DIR"
|
||||
mkdir "$JS_AUTO_GENERATED_DIR"
|
||||
|
||||
cp "$backup_dir"/js_bindings_chipmunk_auto_classes.cpp "$JS_AUTO_GENERATED_DIR"/
|
||||
cp "$backup_dir"/js_bindings_chipmunk_auto_classes.h "$JS_AUTO_GENERATED_DIR"/
|
||||
cp "$backup_dir"/js_bindings_chipmunk_auto_classes_registration.h "$JS_AUTO_GENERATED_DIR"/
|
||||
cp "$backup_dir"/js_bindings_chipmunk_functions.cpp "$JS_AUTO_GENERATED_DIR"/
|
||||
cp "$backup_dir"/js_bindings_chipmunk_functions.h "$JS_AUTO_GENERATED_DIR"/
|
||||
cp "$backup_dir"/js_bindings_chipmunk_functions_registration.h "$JS_AUTO_GENERATED_DIR"/
|
||||
#move the backup chipmunk js bindings to js auto directory
|
||||
|
||||
# 1. Generate js bindings
|
||||
generate_bindings_glue_codes
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@ if [ -z "$PYTHON_BIN" ]; then
|
||||
export PYTHON_BIN=/usr/bin/python
|
||||
fi
|
||||
|
||||
if [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
if [ $TRAVIS_OS_NAME == 'linux' ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
exit 0
|
||||
fi
|
||||
@@ -31,7 +31,7 @@ if [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
|
||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||
./generate-bindings.sh $TRAVIS_BRANCH
|
||||
elif [ $TRAVIS_OS_NAME == 'linux' ]; then
|
||||
elif [ $TRAVIS_OS_NAME == 'osx' ]; then
|
||||
if [ "$TRAVIS_PULL_REQUEST" != "false" ]; then
|
||||
exit 0
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user