mirror of https://github.com/axmolengine/axmol.git
issue #2732: [iOS] Updating the reference of auto-generated binding glue codes.
This commit is contained in:
parent
c2099f5d3e
commit
7552a72577
|
@ -1 +1 @@
|
||||||
027d1d69c91552623e04c46fd002c5976c4bb40c
|
9bf893fd31bf044ec732332fb109c050b711fdc8
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_chipmunk_registration.h"
|
#include "js_bindings_chipmunk_registration.h"
|
||||||
#include "js_bindings_system_registration.h"
|
#include "js_bindings_system_registration.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_chipmunk_registration.h"
|
#include "js_bindings_chipmunk_registration.h"
|
||||||
#include "js_bindings_system_registration.h"
|
#include "js_bindings_system_registration.h"
|
||||||
|
|
|
@ -8,7 +8,7 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
|
|
||||||
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
#if (CC_TARGET_PLATFORM != CC_PLATFORM_WIN32)
|
||||||
|
|
|
@ -6,8 +6,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_ccbreader.h"
|
#include "js_bindings_ccbreader.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_ccbreader.h"
|
#include "js_bindings_ccbreader.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_ccbreader.h"
|
#include "js_bindings_ccbreader.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_chipmunk_registration.h"
|
#include "js_bindings_chipmunk_registration.h"
|
||||||
|
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_chipmunk_registration.h"
|
#include "js_bindings_chipmunk_registration.h"
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
10b7b9eb9dd50e4480e377538b5a1fa7261b9029
|
01ccea588d07b1419922fb6fd66502422184c2bd
|
|
@ -1 +1 @@
|
||||||
d4944c285d6219a01aa06f326168ae67d08b9cb0
|
1a67569d3ade0153cccbfa71ca5ac5355d03fbd4
|
|
@ -3,8 +3,8 @@
|
||||||
#include "cocos2d.h"
|
#include "cocos2d.h"
|
||||||
#include "SimpleAudioEngine.h"
|
#include "SimpleAudioEngine.h"
|
||||||
#include "ScriptingCore.h"
|
#include "ScriptingCore.h"
|
||||||
#include "generated/jsb_cocos2dx_auto.hpp"
|
#include "jsb_cocos2dx_auto.hpp"
|
||||||
#include "generated/jsb_cocos2dx_extension_auto.hpp"
|
#include "jsb_cocos2dx_extension_auto.hpp"
|
||||||
#include "jsb_cocos2dx_extension_manual.h"
|
#include "jsb_cocos2dx_extension_manual.h"
|
||||||
#include "cocos2d_specifics.hpp"
|
#include "cocos2d_specifics.hpp"
|
||||||
#include "js_bindings_chipmunk_registration.h"
|
#include "js_bindings_chipmunk_registration.h"
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
# Generate JS bindings for Cocos2D-X
|
# Generate JS and Lua bindings for Cocos2D-X
|
||||||
# ... using Android NDK system headers
|
# ... using Android NDK system headers
|
||||||
# ... and automatically update submodule references
|
# ... and automatically update submodule references
|
||||||
# ... and push these changes to remote repos
|
# ... and push these changes to remote repos
|
||||||
|
@ -8,7 +8,7 @@
|
||||||
# Dependencies
|
# Dependencies
|
||||||
#
|
#
|
||||||
# For bindings generator:
|
# For bindings generator:
|
||||||
# (see ../../../tojs/genbindings.sh
|
# (see ../../../tojs/genbindings.sh and ../../../tolua/genbindings.sh
|
||||||
# ... for the defaults used if the environment is not customized)
|
# ... for the defaults used if the environment is not customized)
|
||||||
#
|
#
|
||||||
# * $PYTHON_BIN
|
# * $PYTHON_BIN
|
||||||
|
@ -19,7 +19,8 @@
|
||||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||||
COCOS2DX_ROOT="$DIR"/../..
|
COCOS2DX_ROOT="$DIR"/../..
|
||||||
TOJS_ROOT=$COCOS2DX_ROOT/tools/tojs
|
TOJS_ROOT=$COCOS2DX_ROOT/tools/tojs
|
||||||
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/javascript/bindings/generated
|
TOLUA_ROOT=$COCOS2DX_ROOT/tools/tolua
|
||||||
|
GENERATED_WORKTREE="$COCOS2DX_ROOT"/scripting/auto-generated
|
||||||
COMMITTAG="[AUTO]"
|
COMMITTAG="[AUTO]"
|
||||||
|
|
||||||
# Exit on error
|
# Exit on error
|
||||||
|
@ -42,10 +43,21 @@ else
|
||||||
sudo apt-get --force-yes --yes install python-yaml python-cheetah
|
sudo apt-get --force-yes --yes install python-yaml python-cheetah
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "$GEN_JSB"x != "YES"x ]; then
|
generate_bindings_glue_codes()
|
||||||
|
{
|
||||||
|
echo "Create auto-generated jsbinding glue codes."
|
||||||
pushd "$TOJS_ROOT"
|
pushd "$TOJS_ROOT"
|
||||||
./genbindings.sh
|
./genbindings.sh
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
echo "Create auto-generated luabinding glue codes."
|
||||||
|
pushd "$TOLUA_ROOT"
|
||||||
|
./genbindings.sh
|
||||||
|
popd
|
||||||
|
}
|
||||||
|
|
||||||
|
if [ "$GEN_JSB"x != "YES"x ]; then
|
||||||
|
generate_bindings_glue_codes
|
||||||
exit 0
|
exit 0
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@ -55,11 +67,11 @@ git config user.email ${GH_EMAIL}
|
||||||
git config user.name ${GH_USER}
|
git config user.name ${GH_USER}
|
||||||
popd
|
popd
|
||||||
|
|
||||||
# Update submodule of auto-gen JSBinding repo.
|
# Update submodule of auto-gen Binding repo.
|
||||||
pushd "$GENERATED_WORKTREE"
|
pushd "$GENERATED_WORKTREE"
|
||||||
|
|
||||||
git checkout -B master
|
git checkout -B master
|
||||||
#Set git user for the submodule of 'scripting/javascript/bindings/generated'
|
echo "Set git user for the submodule of ${GENERATED_WORKTREE}"
|
||||||
git config user.email ${GH_EMAIL}
|
git config user.email ${GH_EMAIL}
|
||||||
git config user.name ${GH_USER}
|
git config user.name ${GH_USER}
|
||||||
#Set remotes
|
#Set remotes
|
||||||
|
@ -67,16 +79,14 @@ git remote add upstream https://${GH_USER}:${GH_PASSWORD}@github.com/folecr/coco
|
||||||
|
|
||||||
echo "Delete all directories and files except '.git' and 'README'."
|
echo "Delete all directories and files except '.git' and 'README'."
|
||||||
ls -a | grep -E -v ^\[.\]\{1,2\}$ | grep -E -v ^\.git$ | grep -E -v ^README$ | xargs -I{} rm -rf {}
|
ls -a | grep -E -v ^\[.\]\{1,2\}$ | grep -E -v ^\.git$ | grep -E -v ^README$ | xargs -I{} rm -rf {}
|
||||||
echo "Show files in scripting/javascript/bindings/generated folder."
|
echo "Show files in ${GENERATED_WORKTREE} folder."
|
||||||
ls -a
|
ls -a
|
||||||
popd
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# 1. Generate JS bindings
|
# 1. Generate JS bindings
|
||||||
pushd "$TOJS_ROOT"
|
generate_bindings_glue_codes
|
||||||
./genbindings.sh
|
|
||||||
popd
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo Bindings generated successfully
|
echo Bindings generated successfully
|
||||||
|
@ -98,7 +108,7 @@ echo Using "$ELAPSEDSECS" in the branch names for pseudo-uniqueness
|
||||||
GENERATED_BRANCH=autogeneratedbindings_"$ELAPSEDSECS"
|
GENERATED_BRANCH=autogeneratedbindings_"$ELAPSEDSECS"
|
||||||
|
|
||||||
|
|
||||||
# 2. In JSBindings repo, Check if there are any files that are different from the index
|
# 2. In Bindings repo, Check if there are any files that are different from the index
|
||||||
|
|
||||||
pushd "$GENERATED_WORKTREE"
|
pushd "$GENERATED_WORKTREE"
|
||||||
|
|
||||||
|
@ -130,13 +140,13 @@ fi
|
||||||
# Exit on error
|
# Exit on error
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
# 3. In JSBindings repo, Check out a branch named "autogeneratedbindings" and commit the auto generated bindings to it
|
# 3. In Bindings repo, Check out a branch named "autogeneratedbindings" and commit the auto generated bindings to it
|
||||||
git checkout -b "$GENERATED_BRANCH"
|
git checkout -b "$GENERATED_BRANCH"
|
||||||
git add --verbose .
|
git add --verbose .
|
||||||
git add --verbose -u .
|
git add --verbose -u .
|
||||||
git commit --verbose -m "$COMMITTAG : autogenerated bindings"
|
git commit --verbose -m "$COMMITTAG : autogenerated bindings"
|
||||||
|
|
||||||
# 4. In JSBindings repo, Push the commit with generated bindings to "master" of the auto generated bindings repository
|
# 4. In Bindings repo, Push the commit with generated bindings to "master" of the auto generated bindings repository
|
||||||
git push -fq upstream "$GENERATED_BRANCH":${TRAVIS_BRANCH}_${ELAPSEDSECS} 2> /dev/null
|
git push -fq upstream "$GENERATED_BRANCH":${TRAVIS_BRANCH}_${ELAPSEDSECS} 2> /dev/null
|
||||||
|
|
||||||
popd
|
popd
|
||||||
|
@ -148,7 +158,7 @@ pushd "${DIR}"
|
||||||
|
|
||||||
# 5. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings
|
# 5. In Cocos2D-X repo, Checkout a branch named "updategeneratedsubmodule" Update the submodule reference to point to the commit with generated bindings
|
||||||
cd "${COCOS2DX_ROOT}"
|
cd "${COCOS2DX_ROOT}"
|
||||||
git add scripting/javascript/bindings/generated
|
git add ${GENERATED_WORKTREE}
|
||||||
git checkout -b "$COCOS_BRANCH"
|
git checkout -b "$COCOS_BRANCH"
|
||||||
git commit -m "$COMMITTAG : updating submodule reference to latest autogenerated bindings"
|
git commit -m "$COMMITTAG : updating submodule reference to latest autogenerated bindings"
|
||||||
#Set remotes
|
#Set remotes
|
||||||
|
|
Loading…
Reference in New Issue