From 3b2a7328d318bbdeea894966223239eff65fc66a Mon Sep 17 00:00:00 2001 From: lihex Date: Mon, 10 Mar 2014 11:14:11 +0800 Subject: [PATCH 1/7] update submodule --- tools/cocos2d-console | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/cocos2d-console b/tools/cocos2d-console index edac62683a..34729e5ad8 160000 --- a/tools/cocos2d-console +++ b/tools/cocos2d-console @@ -1 +1 @@ -Subproject commit edac62683a544f8a1f43ffb8744c98f003daf80d +Subproject commit 34729e5ad89431407d1607b510b328dde97f590b From bdd66ee0fd77a21f56ee6e780c321fb09d0ec189 Mon Sep 17 00:00:00 2001 From: lm Date: Mon, 10 Mar 2014 16:35:55 +0800 Subject: [PATCH 2/7] [Jenkins] fix the crash in comment trigger --- tools/jenkins-scripts/job-comment-trigger.py | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/tools/jenkins-scripts/job-comment-trigger.py b/tools/jenkins-scripts/job-comment-trigger.py index bd478d4386..5d1bfd1493 100644 --- a/tools/jenkins-scripts/job-comment-trigger.py +++ b/tools/jenkins-scripts/job-comment-trigger.py @@ -14,6 +14,12 @@ def main(): #parse to json obj payload = json.loads(payload_str) + issue = payload['issue'] + #get pull number + pr_num = issue['number'] + print 'pr_num:' + str(pr_num) + payload_forword = {"number":pr_num} + comment = payload['comment'] #get comment body comment_body = comment['body'] @@ -23,12 +29,6 @@ def main(): if result is None: print 'skip build for pull request #' + str(pr_num) return(0) - - issue = payload['issue'] - #get pull number - pr_num = issue['number'] - print 'pr_num:' + str(pr_num) - payload_forword = {"number":pr_num} #build for pull request action 'open' and 'synchronize', skip 'close' action = issue['state'] From 23f42da5486efa785157bd7f972f2c4fc40a0dde Mon Sep 17 00:00:00 2001 From: boyu0 Date: Tue, 11 Mar 2014 05:09:08 +0800 Subject: [PATCH 3/7] closed #4324: fix double free bug. move _preContactData to PhysicsContact class, add PhysicsContact::getPreContactData() method. --- cocos/physics/CCPhysicsContact.cpp | 16 +++++++--------- cocos/physics/CCPhysicsContact.h | 10 ++++------ 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/cocos/physics/CCPhysicsContact.cpp b/cocos/physics/CCPhysicsContact.cpp index 0f5967f9a7..f1ea5d5478 100644 --- a/cocos/physics/CCPhysicsContact.cpp +++ b/cocos/physics/CCPhysicsContact.cpp @@ -44,11 +44,11 @@ PhysicsContact::PhysicsContact() , _eventCode(EventCode::NONE) , _info(nullptr) , _notificationEnable(true) -, _begin(false) , _result(true) , _data(nullptr) , _contactInfo(nullptr) , _contactData(nullptr) +, _preContactData(nullptr) { } @@ -57,6 +57,7 @@ PhysicsContact::~PhysicsContact() { CC_SAFE_DELETE(_info); CC_SAFE_DELETE(_contactData); + CC_SAFE_DELETE(_preContactData); } PhysicsContact* PhysicsContact::construct(PhysicsShape* a, PhysicsShape* b) @@ -96,7 +97,8 @@ void PhysicsContact::generateContactData() } cpArbiter* arb = static_cast(_contactInfo); - CC_SAFE_DELETE(_contactData); + CC_SAFE_DELETE(_preContactData); + _preContactData = _contactData; _contactData = new PhysicsContactData(); _contactData->count = cpArbiterGetCount(arb); for (int i=0; i<_contactData->count && igetShapeA(), contact->getShapeB())) { - contact->_begin = true; contact->generateContactData(); ret = onContactBegin(*contact); } @@ -232,8 +231,7 @@ void EventListenerPhysicsContact::onEvent(EventCustom* event) if (onContactPreSolve != nullptr && hitTest(contact->getShapeA(), contact->getShapeB())) { - PhysicsContactPreSolve solve(contact->_begin ? nullptr : contact->_contactData, contact->_contactInfo); - contact->_begin = false; + PhysicsContactPreSolve solve(contact->_contactInfo); contact->generateContactData(); ret = onContactPreSolve(*contact, solve); diff --git a/cocos/physics/CCPhysicsContact.h b/cocos/physics/CCPhysicsContact.h index c6b574fca8..2ead410803 100644 --- a/cocos/physics/CCPhysicsContact.h +++ b/cocos/physics/CCPhysicsContact.h @@ -78,6 +78,8 @@ public: inline PhysicsShape* getShapeB() const { return _shapeB; } /** get contact data */ inline const PhysicsContactData* getContactData() const { return _contactData; } + /** get previous contact data */ + inline const PhysicsContactData* getPreContactData() const { return _preContactData; } /** get data. */ inline void* getData() const { return _data; } /** @@ -112,12 +114,12 @@ private: EventCode _eventCode; PhysicsContactInfo* _info; bool _notificationEnable; - bool _begin; bool _result; void* _data; void* _contactInfo; PhysicsContactData* _contactData; + PhysicsContactData* _preContactData; friend class EventListenerPhysicsContact; friend class PhysicsWorldCallback; @@ -146,14 +148,10 @@ public: void ignore(); private: - PhysicsContactPreSolve(PhysicsContactData* data, void* contactInfo); + PhysicsContactPreSolve(void* contactInfo); ~PhysicsContactPreSolve(); private: - float _elasticity; - float _friction; - Point _surfaceVelocity; - PhysicsContactData* _preContactData; void* _contactInfo; friend class EventListenerPhysicsContact; From 725440fe3ff0a164d52b75e3c8a7d3b1139089d0 Mon Sep 17 00:00:00 2001 From: CocosRobot Date: Tue, 11 Mar 2014 02:52:22 +0000 Subject: [PATCH 4/7] [AUTO]: updating luabinding automatically --- cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua | 5 +++++ .../auto/lua_cocos2dx_physics_auto.cpp.REMOVED.git-id | 2 +- .../lua-bindings/auto/lua_cocos2dx_physics_auto.hpp | 1 + 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua index ae4cd514c0..5bbe33c633 100644 --- a/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua +++ b/cocos/scripting/lua-bindings/auto/api/PhysicsContact.lua @@ -11,6 +11,11 @@ -- @param self -- @return PhysicsContact::EventCode#PhysicsContact::EventCode ret (return value: cc.PhysicsContact::EventCode) +-------------------------------- +-- @function [parent=#PhysicsContact] getPreContactData +-- @param self +-- @return PhysicsContactData#PhysicsContactData ret (return value: cc.PhysicsContactData) + -------------------------------- -- @function [parent=#PhysicsContact] getShapeA -- @param self diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp.REMOVED.git-id b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp.REMOVED.git-id index fc065ab321..d8a7787694 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp.REMOVED.git-id +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.cpp.REMOVED.git-id @@ -1 +1 @@ -6f6bb7571ab92f9757a753c243a5061fd64a3fbd \ No newline at end of file +9ee0235aac42ea657853d56947716b3fc8fee2c2 \ No newline at end of file diff --git a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp index 3f9e257c26..58175d4bf4 100644 --- a/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp +++ b/cocos/scripting/lua-bindings/auto/lua_cocos2dx_physics_auto.hpp @@ -261,6 +261,7 @@ int register_all_cocos2dx_physics(lua_State* tolua_S); + #endif // __cocos2dx_physics_h__ From e522f3b03bcdd5cf39c35979af6ebb9953fb3657 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 11 Mar 2014 10:52:28 +0800 Subject: [PATCH 5/7] Update CHANGELOG [ci skip] --- CHANGELOG.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.REMOVED.git-id b/CHANGELOG.REMOVED.git-id index 45fe9fdf87..5ca6d51e19 100644 --- a/CHANGELOG.REMOVED.git-id +++ b/CHANGELOG.REMOVED.git-id @@ -1 +1 @@ -780fb6720d1919356d3fac951ed0f86cfb85c6bd \ No newline at end of file +727d9ca089cf00365014b23ae2cf63341316ba7d \ No newline at end of file From c72586ddbe61f6bd216dbce4a849c85656fae3e6 Mon Sep 17 00:00:00 2001 From: minggo Date: Tue, 11 Mar 2014 11:57:51 +0800 Subject: [PATCH 7/7] ask to set ANT_ROOT, and add more redeable information --- setup.py | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/setup.py b/setup.py index 45d275b6b6..11f90fe908 100755 --- a/setup.py +++ b/setup.py @@ -277,26 +277,6 @@ class SetEnvVar(object): else: return False - def _is_ant_exists(self): - - try: - os.environ[ANT_ROOT] - return True - except Exception: - pass - - ant_found = False - commands = ['ant', '-version'] - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - for line in child.stdout: - if 'Ant' in line: - ant_found = True - break - - child.wait() - - return ant_found - def _is_ant_root_valid(self, ant_root): ant_path = '' @@ -391,7 +371,7 @@ class SetEnvVar(object): print "" print '-> Looking for ANT_ROOT envrironment variable...', ant_root_added = False - ant_found = self._is_ant_exists() + ant_found = self._find_environment_variable(ANT_ROOT) if not ant_root and not ant_found: print 'NOT FOUND' @@ -427,7 +407,12 @@ class SetEnvVar(object): if ant_root_added: print '\tANT_ROOT was added into %s' % target else: - print '\nCOCOS_CONSOLE_ROOT was already added. Edit "%s" for manual changes' % target + print '\nCOCOS_CONSOLE_ROOT was already added. Edit "%s" for manual changes' % target + + if self._isWindows(): + print '\nPlease restart the terminal to make added system variables take effect' + else: + print '\nPlease execute command: "source %s" to make added system variables take effect' % target if __name__ == '__main__': parser = OptionParser()