这个工作量还是很大的,-x可能会直接升级到JSB 2.0,就是封装了各个JS引擎的接口,同时也升级了SpiderMonkey。不过短期内没有资源做这块,而且2.0也还没完成。如果你自己移植的话,一下是panda的给一个国外开发者的建议
It could be quite a challenge to upgrade Spidermonkey, they modify many APIs and design through v33 to v52. We have achieved it in Cocos2d-x-lite used by Cocos Creator, you can refer to that repo to see what we have done.
Briefly, you need to do the following
1. Upgrade the spider monkey builds, we built it for win32(vs2015), mac os, iOS, android, you can find it all here
https://github.com/cocos-creator/cocos2d-x-lite-external
for each platform, you will need the headers in include/spidermonkey/ and libjs_static.a & libmozglue.a (this is new in v52) in libs/
2. Upgrade bindings-generator with this branch, this can help to generate all the auto bindings directly
https://github.com/cocos-creator/bindings-generator/tree/runtime
3. Upgrade all the manual bindings, this is the hardest part, you can compare the cocos2d/scripting/js-bindings/manual/ folder between cocos2d-x and cocos2d-x-lite (v1.6 branch) to see the difference
https://github.com/cocos-creator/cocos2d-x-lite/tree/v1.6
We are not making the upgrade for chipmunk bindings, because we removed it from creator, if you are not using it neither, great news, otherwise, it's also a heavy task because all chipmunk bindings can only be upgraded manually.
The merge process could be hard, so you can refer to the PRs we made step by step:
Major one:
https://github.com/cocos-creator/cocos2d-x-lite/pull/675
Bug fixes:
https://github.com/cocos-creator/cocos2d-x-lite/pull/682
https://github.com/cocos-creator/cocos2d-x-lite/pull/703
https://github.com/cocos-creator/cocos2d-x-lite/pull/704
https://github.com/cocos-creator/cocos2d-x-lite/pull/705
https://github.com/cocos-creator/cocos2d-x-lite/pull/718
https://github.com/cocos-creator/cocos2d-x-lite/pull/719
https://github.com/cocos-creator/cocos2d-x-lite/pull/720
https://github.com/cocos-creator/cocos2d-x-lite/pull/726
https://github.com/cocos-creator/cocos2d-x-lite/pull/727
https://github.com/cocos-creator/cocos2d-x-lite/pull/728
https://github.com/cocos-creator/cocos2d-x-lite/pull/729
https://github.com/cocos-creator/cocos2d-x-lite/pull/730
https://github.com/cocos-creator/cocos2d-x-lite/pull/731
https://github.com/cocos-creator/cocos2d-x-lite/pull/733
https://github.com/cocos-creator/cocos2d-x-lite/pull/739
https://github.com/cocos-creator/cocos2d-x-lite/pull/742
https://github.com/cocos-creator/cocos2d-x-lite/pull/743
https://github.com/cocos-creator/cocos2d-x-lite/pull/745
https://github.com/cocos-creator/cocos2d-x-lite/pull/747
https://github.com/cocos-creator/cocos2d-x-lite/pull/748
There are also many PRs about project adjustment, please just refer to the history in repo.
4. Last one, if you want to use jsc compiler, you need to use binaries in this repo
https://github.com/cocos2d/console-binary/tree/creator/plugins/plugin_jscompile/bin