mirror of https://github.com/axmolengine/axmol.git
Merge branch 'develop' into develop_nutty_modify_framework_for315
This commit is contained in:
commit
0525320945
|
@ -1,6 +1,7 @@
|
||||||
language: cpp
|
language: cpp
|
||||||
env:
|
env:
|
||||||
matrix:
|
matrix:
|
||||||
|
- GEN_COCOS_FILES=YES
|
||||||
- PLATFORM=linux DEBUG=1 CC_COMPILER=gcc CXX_COMPILER=g++
|
- PLATFORM=linux DEBUG=1 CC_COMPILER=gcc CXX_COMPILER=g++
|
||||||
- PLATFORM=linux DEBUG=1 CC_COMPILER=clang CXX_COMPILER=clang++
|
- PLATFORM=linux DEBUG=1 CC_COMPILER=clang CXX_COMPILER=clang++
|
||||||
# Since switching to C++11 only the ARM version of the nactive client
|
# Since switching to C++11 only the ARM version of the nactive client
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
1283277b97cce107c19ac971a0648a5720e341c5
|
c95c8696018ed9dbb68d20bb12242bfc8de6c273
|
|
@ -1 +1 @@
|
||||||
Subproject commit cef397668e1220f2b9b4262ee18fcffedb8347ca
|
Subproject commit c788443babb3505c4668cb7079f0c9a0e450c6e0
|
|
@ -0,0 +1,29 @@
|
||||||
|
#!/bin/bash
|
||||||
|
|
||||||
|
# exit this script if any commmand fails
|
||||||
|
set -e
|
||||||
|
|
||||||
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
|
PROJECT_ROOT="$DIR"/../..
|
||||||
|
|
||||||
|
shopt -s dotglob
|
||||||
|
|
||||||
|
echo_all_files() {
|
||||||
|
for file in $1/*
|
||||||
|
do
|
||||||
|
if [ -d "$file" ]; then
|
||||||
|
echo_all_files "$file"
|
||||||
|
else
|
||||||
|
relative_path="${file##*${PROJECT_ROOT}/}"
|
||||||
|
prefix=${relative_path:0:5}
|
||||||
|
if [ "$prefix"x != ".git/"x ]; then
|
||||||
|
echo "\"$relative_path\","
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
|
echo "["
|
||||||
|
echo_all_files ${PROJECT_ROOT}
|
||||||
|
echo "]"
|
||||||
|
|
|
@ -1,9 +1,12 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
COCOS2DX_ROOT="$DIR"/../..
|
PROJECT_ROOT="$DIR"/../..
|
||||||
COCOSFILES_CREATOR_ROOT=$COCOS2DX_ROOT/tools/project-creator/config-create
|
|
||||||
COMMITTAG="[AUTO][ci skip]"
|
COMMITTAG="[AUTO][ci skip]: updating cocos2dx_files.json"
|
||||||
|
PUSH_REPO="https://api.github.com/repos/cocos2d/cocos2d-x/pulls"
|
||||||
|
OUTPUT_FILE_PATH="${PROJECT_ROOT}/templates/cocos2dx_files.json"
|
||||||
|
|
||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
@ -11,9 +14,7 @@ set -e
|
||||||
generate_cocosfiles_json()
|
generate_cocosfiles_json()
|
||||||
{
|
{
|
||||||
echo "Updates cocos_files.json"
|
echo "Updates cocos_files.json"
|
||||||
pushd "$COCOSFILES_CREATOR_ROOT"
|
./for-each-file-in-dir.sh > "${OUTPUT_FILE_PATH}"
|
||||||
./create_config.py
|
|
||||||
popd
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if [ "$GEN_COCOS_FILES"x != "YES"x ]; then
|
if [ "$GEN_COCOS_FILES"x != "YES"x ]; then
|
||||||
|
@ -21,7 +22,7 @@ if [ "$GEN_COCOS_FILES"x != "YES"x ]; then
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
pushd "$COCOS2DX_ROOT"
|
pushd "$PROJECT_ROOT"
|
||||||
#Set git user for cocos2d-x repo
|
#Set git user for cocos2d-x repo
|
||||||
git config user.email ${GH_EMAIL}
|
git config user.email ${GH_EMAIL}
|
||||||
git config user.name ${GH_USER}
|
git config user.name ${GH_USER}
|
||||||
|
@ -35,12 +36,6 @@ echo
|
||||||
echo cocos_files.json was generated successfully
|
echo cocos_files.json was generated successfully
|
||||||
echo
|
echo
|
||||||
|
|
||||||
|
|
||||||
if [ -z "${COMMITTAG+aaa}" ]; then
|
|
||||||
# ... if COMMITTAG is not set, use this machine's hostname
|
|
||||||
COMMITTAG=`hostname -s`
|
|
||||||
fi
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Using "'$COMMITTAG'" in the commit messages
|
echo Using "'$COMMITTAG'" in the commit messages
|
||||||
echo
|
echo
|
||||||
|
@ -51,7 +46,7 @@ echo Using "$ELAPSEDSECS" in the branch names for pseudo-uniqueness
|
||||||
|
|
||||||
# 2. Check if there are any files that are different from the index
|
# 2. Check if there are any files that are different from the index
|
||||||
|
|
||||||
pushd "$COCOS2DX_ROOT"
|
pushd "$PROJECT_ROOT"
|
||||||
|
|
||||||
# Run status to record the output in the log
|
# Run status to record the output in the log
|
||||||
git status
|
git status
|
||||||
|
@ -87,11 +82,10 @@ COCOS_BRANCH=update_cocosfiles_"$ELAPSEDSECS"
|
||||||
|
|
||||||
pushd "${DIR}"
|
pushd "${DIR}"
|
||||||
|
|
||||||
# 3. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings
|
cd "${PROJECT_ROOT}"
|
||||||
cd "${COCOS2DX_ROOT}"
|
|
||||||
git add .
|
git add .
|
||||||
git checkout -b "$COCOS_BRANCH"
|
git checkout -b "$COCOS_BRANCH"
|
||||||
git commit -m "$COMMITTAG : updating tools/project-creator/module/cocos_files.json"
|
git commit -m "$COMMITTAG"
|
||||||
#Set remotes
|
#Set remotes
|
||||||
git remote add upstream https://${GH_USER}:${GH_PASSWORD}@github.com/${GH_USER}/cocos2d-x.git 2> /dev/null > /dev/null
|
git remote add upstream https://${GH_USER}:${GH_PASSWORD}@github.com/${GH_USER}/cocos2d-x.git 2> /dev/null > /dev/null
|
||||||
# 4. In Cocos2D-X repo, Push the commit to cocos2d-x repository
|
# 4. In Cocos2D-X repo, Push the commit to cocos2d-x repository
|
||||||
|
@ -101,6 +95,6 @@ git push -fq upstream "$COCOS_BRANCH" 2> /dev/null
|
||||||
|
|
||||||
# 5.
|
# 5.
|
||||||
echo "Sending Pull Request to base repo ..."
|
echo "Sending Pull Request to base repo ..."
|
||||||
curl --user "${GH_USER}:${GH_PASSWORD}" --request POST --data "{ \"title\": \"$COMMITTAG : updating tools/project-creator/module/cocos_files.json\", \"body\": \"\", \"head\": \"${GH_USER}:${COCOS_BRANCH}\", \"base\": \"${TRAVIS_BRANCH}\"}" https://api.github.com/repos/cocos2d/cocos2d-x/pulls 2> /dev/null > /dev/null
|
curl --user "${GH_USER}:${GH_PASSWORD}" --request POST --data "{ \"title\": \"$COMMITTAG\", \"body\": \"\", \"head\": \"${GH_USER}:${COCOS_BRANCH}\", \"base\": \"${TRAVIS_BRANCH}\"}" "${PUSH_REPO}" 2> /dev/null > /dev/null
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
|
|
@ -32,14 +32,14 @@ if [ "$GEN_COCOS_FILES"x = "YES"x ]; then
|
||||||
fi
|
fi
|
||||||
|
|
||||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
# ./generate-cocosfiles.sh
|
./generate-cocosfiles.sh
|
||||||
elif [ "$PLATFORM"x = "android"x ]; then
|
elif [ "$PLATFORM"x = "android"x ]; then
|
||||||
export NDK_ROOT=$HOME/bin/android-ndk
|
export NDK_ROOT=$HOME/bin/android-ndk
|
||||||
|
|
||||||
# Generate binding glue codes
|
# Generate binding glue codes
|
||||||
echo "Generating bindings glue codes ..."
|
echo "Generating bindings glue codes ..."
|
||||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
# ./generate-cocosfiles.sh
|
./generate-cocosfiles.sh
|
||||||
|
|
||||||
cd $COCOS2DX_ROOT
|
cd $COCOS2DX_ROOT
|
||||||
|
|
||||||
|
@ -66,7 +66,7 @@ elif [ "$PLATFORM"x = "linux"x ]; then
|
||||||
# Generate binding glue codes
|
# Generate binding glue codes
|
||||||
echo "Generating bindings glue codes ..."
|
echo "Generating bindings glue codes ..."
|
||||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
# ./generate-cocosfiles.sh
|
./generate-cocosfiles.sh
|
||||||
|
|
||||||
echo "Building cocos2d-x"
|
echo "Building cocos2d-x"
|
||||||
cd $COCOS2DX_ROOT/build
|
cd $COCOS2DX_ROOT/build
|
||||||
|
@ -79,7 +79,7 @@ elif [ "$PLATFORM"x = "emscripten"x ]; then
|
||||||
# Generate binding glue codes
|
# Generate binding glue codes
|
||||||
echo "Generating bindings glue codes ..."
|
echo "Generating bindings glue codes ..."
|
||||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
# ./generate-cocosfiles.sh
|
./generate-cocosfiles.sh
|
||||||
|
|
||||||
cd $COCOS2DX_ROOT/build
|
cd $COCOS2DX_ROOT/build
|
||||||
export PYTHON=/usr/bin/python
|
export PYTHON=/usr/bin/python
|
||||||
|
@ -88,7 +88,7 @@ elif [ "$PLATFORM"x = "emscripten"x ]; then
|
||||||
EMCC_DEBUG=1 make PLATFORM=emscripten -j 8
|
EMCC_DEBUG=1 make PLATFORM=emscripten -j 8
|
||||||
elif [ "$PLATFORM"x = "ios"x ]; then
|
elif [ "$PLATFORM"x = "ios"x ]; then
|
||||||
cd $COCOS2DX_ROOT/tools/travis-scripts
|
cd $COCOS2DX_ROOT/tools/travis-scripts
|
||||||
# ./generate-cocosfiles.sh
|
./generate-cocosfiles.sh
|
||||||
|
|
||||||
cd $COCOS2DX_ROOT
|
cd $COCOS2DX_ROOT
|
||||||
xctool/xctool.sh -project samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj -scheme HelloCpp test
|
xctool/xctool.sh -project samples/Cpp/HelloCpp/proj.ios/HelloCpp.xcodeproj -scheme HelloCpp test
|
||||||
|
|
Loading…
Reference in New Issue