Skip to content

Commit 0d45851

Browse files
committed
Merge pull request #1261 from cocos2d/develop
Update master to 3.2 Final
2 parents 594cd04 + bf16c23 commit 0d45851

File tree

278 files changed

+11526
-7284
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

278 files changed

+11526
-7284
lines changed

AUTHORS

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,10 +58,17 @@ tkowalski @tkowalski Add missing affine transform functions renam
5858
Minh Quy @MQuy Fix url matching regex issue
5959

6060
Park Hyun Chen @sincntx Fix cc.ScrollView constructor issue in JSB
61+
Added cc.rectOverlapsRect function in JSB
6162

6263
Vincent Chou @go3k Update README.md, add submodule update command suggestion
6364
Fix bug: Runtime.cpp protobuf object parseFromString may result in an incomplete protobuf object
65+
Fix bug: PrebuiltRuntime ios version can't support portrait orientation.
6466

67+
Igor Mats @IgorMats Added outline shader sample
68+
69+
G17hao @G17hao Fixed an typo issue in jsb_boot.js
70+
71+
Simon de Lang @simondel Fixed use of deprecated cc, ccs and ccui create functions.
6572

6673
Cocos2d-JS can not grow so fast without the active community.
6774
Thanks to all developers who report & trace bugs, discuss the engine usage in forum & QQ groups!

CHANGELOG

Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,83 @@
11
ChangeLog:
22

3+
Cocos2d-JS v3.2 @ Dec.29, 2014
4+
5+
* Replaced `transform` function with `setTransform` function under canvas render mode for better performance.
6+
* Added a timer in `cc.audioEngine` to check audio element loading event, prevent the loading process being stucked when load audio file failed.
7+
* Added some new browser types to `cc.sys`.
8+
* Added some audio resource loading codes to ensure compatibility with Wechat browser.
9+
* Added check for WebAudio support to ensure compatibility.
10+
* [JSB]Upgraded Cocos2d-x to v3.3 Final.
11+
* [JSB]Added `getSearchPaths` API to `jsb.Manifest` to support better script hot update.
12+
* [JSB]Polished restart game feature.
13+
* [JSB]Added a sample usage case for `jsb.AssetsManager`'s script hot update ability.
14+
* [JSB]Skipped FlatBuffer related bindings.
15+
* [JSB]Canceled modifications in Spine due to License restriction and removed new constructor for `sp.SkeletonAnimation`.
16+
17+
* Bug fixes:
18+
1. Fixed an issue that `cc.InputManager` doesn't trigger touch event on chrome mobile emulator.
19+
2. Fixed an issue that `cc.game.setFrameRate` doesn't work.
20+
3. Fixed an issue that `cc.view` can't remove resize event listener.
21+
4. Fixed an issue that `cc.EventManager` didn't set register flag to false when a listener is removed.
22+
5. Fixed an issue that `cc.audioEngine` doesn't play some audios on some iOS devices.
23+
6. Fixed an issue of ccui controls that their `setColor` doesn't work when cascade color is enabled.
24+
7. Fixed an issue that `ccs.Armature`'s `setColor` doesn't work in canvas render mode.
25+
8. Fixed an issue that `ccs.Armature` crashes when adding a child to it.
26+
9. Fixed an issue that `cc.SpriteBatchNode`'s status is incorrect in WebGL render mode.
27+
10. Fixed an issue of `cc.Layer` that its position is incorrect under bake mode.
28+
11. Fixed an issue of `ccui.RichText` that its `setContentSize` doesn't work.
29+
12. Fixed an issue of `cc.LabelTTF` that its `setColor` doesn't work when cascade color is enabled.
30+
13. Fixed an issue of spine that its skeletons position is incorrect when scaleX equals to -1 and scaleY equals to 1.
31+
14. Fixed `sp.Skeleton`'s API inconsistence by renaming `boundingBox` to `getBoundingBox`.
32+
15. Removed all usages of deprecated create functions in the test cases.
33+
16. [JSB]Fixed an issue of `ccui.ScrollView`'s `innerWidth` and `innerHeight` properties.
34+
17. [JSB]Fixed an issue that setting `cc.Node`'s userData property will crash.
35+
18. [JSB]Fixed API inconsistence by renaming `jsb.fileUtils`'s `getByteArrayFromFile` to `getDataFromFile`.
36+
19. [JSB]Fixed a script file cache check issue in ScriptingCore.cpp.
37+
20. [JSB]Fixed an issue of `ccs.Armature`'s constructore.
38+
39+
Cocos2d-JS v3.2 RC0 @ Dec.11, 2014
40+
41+
* Refactoration of web engine by separating the render logic, the arthictecture level refactoration is now completed and brounght great performance improvement.
42+
* Refactoration of web engine's resolution adaptation and audio engine with polyfilled adaptation logics for different devices and browsers. This ensures better compatibility and better extensibility for future needs.
43+
* Added `setRotation` method to `ccui.ImageView`.
44+
* Added a function that fill sprite with repeated texture in Canvas mode.
45+
* Added `setLineHeight` method to `cc.LabelTTF`.
46+
* Added `dumpAudioInfo` to `cc.audioEngine` for debugging purpose on mobile browser.
47+
* Removed Cocos Studio's Protobuffer support from the framework.
48+
* Added an outline shader sample.
49+
* [JSB] Supported modulization for JSB.
50+
* [JSB] Added restart game feature.
51+
* [JSB] Bound all missed chipmunk API in JSB and added test cases for new features, fix some potential memory leak issues.
52+
* [JSB] Added `cc.sys.cleanScript` API to remove a script's cache.
53+
* [JSB] Upgrade Cocos2d-x to v3.3 RC1.
54+
* [JSB] Change default Android compiler to gcc.
55+
* [JSB] Added manual bindings for `cc.Node#pause`.
56+
* [JSB] Added missing constants and functions.
57+
58+
* Bug fixes:
59+
1. Fixed an issue of `cc.Sprite` that its rendering is incorrect without texture.
60+
2. Fixed an issue of `cc.ClippingNode` that its stencil drawing is incorrect on Canvas Mode.
61+
3. Fixed an issue of `TextFieldReader` that it will throw an error when 'areaWidth' and 'areaHeight' equal to zero.
62+
4. Fixed an issue of `ccui.CheckBox` that its getSelectedState doesn't return its state.
63+
5. Fixed an issue of `cc.LabelTTF` that it doesn't update the string when its string become to empty string.
64+
6. Fixed an issue of `cc.ParticleSystem` that it can't change its texture mode and shape type in Canvas mode.
65+
7. Fixed an issue of `cc.Layer`'s bake function that its position is incorrect when cc.view's scale isn't 1.
66+
8. Fixed an issue of `ccs.ArmatureAnimation`'s `setMovementEventCallFunc` and `setFrameEventCallFunc`.
67+
9. Fixed an issue of `console.log` that it isn't a funtion on IE9.
68+
10. Fixed an issue of `CSLoader` that it will add duplicate resources to sprite frame cache.
69+
11. Fixed an issue of `cc.ProgressTimer` that its setColor is not taking effect.
70+
12. Fixed an issue of `cc.loader` that it will throw an error when loading a remote texture.
71+
13. Upgrade html5 version chipmunk to the latest release.
72+
14. [JSB] Fixed an issue that the string return value can not be accessed in JavaScript to Objective-C reflection.
73+
15. [JSB] Fixed potential memory leaks in JavaScriptJavaBridge.
74+
16. [JSB] Fixed libcurl's relocation overflow linker issue in Android release mode.
75+
17. [JSB] Fixed an issue of `ccui.CheckBox`'s _ctor function.
76+
18. [JSB] Made `cc.MenuSpriteImage`'s set functions support sprite frame name as parameter.
77+
19. [JSB] Made ccui's `addEventListener` functions support one argument.
78+
20. [JSB] Made `ccs.ArmatureAnimation`'s `setFrameEventCallFunc` and `setMovementEventCallFunc` accepts one parameter.
79+
21. [JSB] Made project.json's configs - `frameRate` and `debugMode` take effect in JSB.
80+
381
Cocos2d-JS v3.1 @ Oct.22, 2014
482

583
* Released Facebook Integration for Cocos2d-JS v1.0, all APIs have been significantly polished and stabilized. Improved test cases for Facebook with more features demonstrated.

CMakeLists.txt

Lines changed: 139 additions & 62 deletions
Original file line numberDiff line numberDiff line change
@@ -23,23 +23,23 @@
2323
# ****************************************************************************/
2424

2525
cmake_minimum_required(VERSION 2.8)
26-
project (Cocos2djs)
26+
project (Cocos2d-JS)
2727

2828
# The version number
29-
#set(Cocos2djsSamples_VERSION_MAJOR 3)
30-
#set(Cocos2djsSamples_VERSION_MINOR 0)
31-
32-
include(frameworks/js-bindings/cocos2d-x/cmake/BuildHelpers.CMakeLists.txt)
29+
set(Cocos2d_JS_Samples_VERSION_MAJOR 3)
30+
set(Cocos2d_JS_Samples_VERSION_MINOR 2)
3331

32+
set(CMAKE_MODULE_PATH ${CMAKE_MODULE_PATH} "${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cmake/Modules/")
33+
include(CocosBuildHelpers)
3434

3535
option(USE_CHIPMUNK "Use chipmunk for physics library" ON)
3636
option(USE_BOX2D "Use box2d for physics library" OFF)
3737
option(DEBUG_MODE "Debug or release?" ON)
38-
option(BUILD_LIBS_LUA "Build lua libraries" ON)
3938
option(BUILD_EXTENSIONS "Build extension library" ON)
4039
option(BUILD_EDITOR_SPINE "Build editor support for spine" ON)
4140
option(BUILD_EDITOR_COCOSTUDIO "Build editor support for cocostudio" ON)
4241
option(BUILD_EDITOR_COCOSBUILDER "Build editor support for cocosbuilder" ON)
42+
option(USE_PREBUILT_LIBS "Use prebuilt libraries in external directory" ON)
4343

4444
option(BUILD_JSTests "build TestJS sample" ON)
4545
option(BUILD_JSMOONWARRIORS "build MoonWarriors sample" ON)
@@ -70,7 +70,7 @@ elseif(APPLE)
7070

7171

7272
else()#Linux
73-
ADD_DEFINITIONS(-DLINUX)
73+
ADD_DEFINITIONS(-DLINUX -DCC_RESOURCE_FOLDER_LINUX="/")
7474
endif()
7575

7676

@@ -111,82 +111,159 @@ else() # Assume Linux
111111
set(PLATFORM_FOLDER linux)
112112
endif()
113113

114+
set(COCOS_EXTERNAL_DIR ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external)
115+
116+
114117
include_directories(
115-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x
116118
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos
117-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform
118-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform/desktop
119-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform/${PLATFORM_FOLDER}
120-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/audio/include
121-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/editor-support
122-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/auto
123-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/scripting/lua-bindings/manual
119+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/
120+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/deprecated
121+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/cocos/platform
124122
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/extensions
125123
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external
126-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tinyxml2
127-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/unzip
128-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/edtaa3func
129-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/chipmunk/include/chipmunk
130-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/jpeg/include/${PLATFORM_FOLDER}
131-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/png/include/${PLATFORM_FOLDER}
132-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tiff/include/${PLATFORM_FOLDER}
133-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/webp/include/${PLATFORM_FOLDER}
134-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/glfw3/include/${PLATFORM_FOLDER}
135-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/freetype2/include/${PLATFORM_FOLDER}
136-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/websockets/include/${PLATFORM_FOLDER}
137-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/xxhash
138-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/external/spidermonkey/include/${PLATFORM_FOLDER}
139124
)
140125

141-
if(WIN32)
142-
include_directories(
143-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/gles/include/OGLES
144-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/icon/include
145-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/zlib/include
146-
external/curl/include/${PLATFORM_FOLDER}
147-
)
148-
elseif(APPLE)
149-
include_directories(
150-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/curl/include/${PLATFORM_FOLDER}
151-
)
152-
else()
153-
include_directories(
154-
/usr/include
155-
/usr/include/GLFW
156-
/usr/local/include/GLFW
157-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/fmod/include/${ARCH_DIR}
158-
)
126+
if(USE_PREBUILT_LIBS)
127+
include(CocosUsePrebuiltLibs)
159128
endif()
160129

130+
# GLFW3 used on Mac, Windows and Linux desktop platforms
131+
if(LINUX OR MACOSX OR WINDOWS)
132+
cocos_find_package(OpenGL OPENGL REQUIRED)
161133

134+
if(LINUX OR WINDOWS)
135+
cocos_find_package(GLEW GLEW REQUIRED)
136+
endif()
162137

138+
cocos_find_package(GLFW3 GLFW3 REQUIRED)
139+
include_directories(${GLFW3_INCLUDE_DIRS})
163140

164-
link_directories(
165-
/usr/local/lib
166-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/chipmunk/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
167-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/jpeg/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
168-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tiff/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
169-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/webp/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
170-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/png/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
171-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/freetype2/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
172-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/websockets/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
173-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/${PLATFORM_FOLDER}-specific/fmod/prebuilt/${ARCH_DIR}
174-
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
175-
)
141+
if(LINUX)
142+
set(CMAKE_THREAD_PREFER_PTHREAD TRUE)
143+
find_package(Threads REQUIRED)
144+
set(THREADS_LIBRARIES ${CMAKE_THREAD_LIBS_INIT})
145+
146+
#cocos_find_package(FMODEX FMODEX REQUIRED)
147+
cocos_find_package(Fontconfig FONTCONFIG REQUIRED)
148+
endif()
149+
150+
if(WINDOWS)
151+
cocos_find_package(Vorbis VORBIS REQUIRED)
152+
cocos_find_package(MPG123 MPG123 REQUIRED)
153+
cocos_find_package(OpenAL OPENAL REQUIRED)
154+
# because FindOpenAL.cmake set include dir for '#include <al.h>' for portability (not for '#include <AL/al.h>'
155+
set(OPENAL_DEFINITIONS "-DOPENAL_PLAIN_INCLUDES")
156+
endif()
157+
endif(LINUX OR MACOSX OR WINDOWS)
176158

159+
# Freetype required on all platforms
160+
cocos_find_package(Freetype FREETYPE REQUIRED)
161+
162+
# WebP required if used
163+
if(USE_WEBP)
164+
cocos_find_package(WebP WEBP REQUIRED)
165+
endif(USE_WEBP)
166+
167+
# Chipmunk
168+
if(USE_CHIPMUNK)
169+
cocos_find_package(Chipmunk CHIPMUNK REQUIRED)
170+
add_definitions(-DCC_ENABLE_CHIPMUNK_INTEGRATION=1)
171+
if(IOS OR MACOSX)
172+
# without this chipmunk will try to use apple defined geometry types, that conflicts with cocos
173+
add_definitions(-DCP_USE_CGPOINTS=0)
174+
endif()
175+
else(USE_CHIPMUNK)
176+
add_definitions(-DCC_USE_PHYSICS=0)
177+
endif(USE_CHIPMUNK)
178+
179+
# Box2d (not prebuilded, exists as source)
180+
if(USE_BOX2D)
181+
if(USE_PREBUILT_LIBS)
182+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/Box2D)
183+
set(Box2D_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/box2d/include)
184+
set(Box2D_LIBRARIES box2d)
185+
else()
186+
find_package(Box2D REQUIRED CONFIG)
187+
# actually Box2D in next line is not a library, it is target exported from Box2DConfig.cmake
188+
set(Box2D_LIBRARIES Box2D)
189+
endif()
190+
message(STATUS "Box2D include dirs: ${Box2D_INCLUDE_DIRS}")
191+
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=1)
192+
else()
193+
add_definitions(-DCC_ENABLE_BOX2D_INTEGRATION=0)
194+
endif(USE_BOX2D)
195+
196+
# Tinyxml2 (not prebuilded, exists as source)
197+
if(USE_PREBUILT_LIBS)
198+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/tinyxml2)
199+
set(TinyXML2_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/tinyxml2)
200+
set(TinyXML2_LIBRARIES tinyxml2)
201+
else()
202+
cocos_find_package(TinyXML2 TinyXML2 REQUIRED)
203+
endif()
204+
message(STATUS "TinyXML2 include dirs: ${TinyXML2_INCLUDE_DIRS}")
205+
206+
# libjpeg
207+
cocos_find_package(JPEG JPEG REQUIRED)
208+
cocos_find_package(ZLIB ZLIB REQUIRED)
209+
210+
# minizip (we try to migrate to minizip from https://github.com/nmoinvaz/minizip)
211+
# only msys2 currently provides package for this variant, all other
212+
# dists have packages from zlib, thats very old for us.
213+
# moreover our embedded version modified to quick provide
214+
# functionality needed by cocos.
215+
if(USE_PREBUILT_LIBS OR NOT MINGW)
216+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/unzip)
217+
set(MINIZIP_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/unzip)
218+
set(MINIZIP_LIBRARIES unzip)
219+
message(STATUS "MINIZIP include dirs: ${MINIZIP_INCLUDE_DIRS}")
220+
else()
221+
cocos_find_package(MINIZIP MINIZIP REQUIRED)
222+
# double check that we have needed functions
223+
include(CheckLibraryExists)
224+
check_library_exists(${MINIZIP_LIBRARIES} "unzGoToFirstFile2" "" MINIZIP_HAS_GOTOFIRSTFILE2)
225+
if(NOT MINIZIP_HAS_GOTOFIRSTFILE2)
226+
message(FATAL_ERROR "Minizip library on you system very old. Please use recent version from https://github.com/nmoinvaz/minizip or enable USE_PREBUILT_LIBS")
227+
endif()
228+
add_definitions(-DMINIZIP_FROM_SYSTEM)
229+
endif()
230+
231+
cocos_find_package(PNG PNG REQUIRED)
232+
cocos_find_package(TIFF TIFF REQUIRED)
233+
cocos_find_package(WEBSOCKETS WEBSOCKETS REQUIRED)
234+
cocos_find_package(CURL CURL REQUIRED)
235+
236+
# protobuf-lite (not prebuilded, exists as source)
237+
# TODO: for now we can't use upstream protobuf because these files:
238+
# cocos/editor-support/cocostudio/CSParseBinary.pb.h
239+
# cocos/editor-support/cocostudio/CSParseBinary.pb.cc
240+
# was generated by concrete version of protobuf compiler
241+
# and source file not provided. So these files can be
242+
# compiled only with our in-source version of protobuf-lite
243+
## if(USE_PREBUILT_LIBS)
244+
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/protobuf-lite)
245+
set(PROTOBUF_LITE_INCLUDE_DIRS ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/cocos2d-x/external/protobuf-lite/src)
246+
set(PROTOBUF_LITE_LIBRARIES protobuf)
247+
## else()
248+
## cocos_find_package(Protobuf REQUIRED PROTOBUF_LITE_LIBRARIES)
249+
## set(PROTOBUF_LITE_INCLUDE_DIRS ${PROTOBUF_INCLUDE_DIRS})
250+
## endif()
251+
message(STATUS "Protobuf lite libs: ${PROTOBUF_LITE_LIBRARIES}")
252+
message(STATUS "Protobuf include dirs: ${PROTOBUF_LITE_INCLUDE_DIRS}")
177253

178254
# build for 3rd party libraries
179255
if(LINUX OR APPLE)
180-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/Box2D)
181-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/unzip)
182256
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/xxhash)
183-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/tinyxml2)
184-
add_subdirectory(frameworks/js-bindings/cocos2d-x/external/protobuf-lite)
185257
endif()
186258

187259
# cocos2d library
188260
add_subdirectory(frameworks/js-bindings/cocos2d-x/cocos)
189261

262+
link_directories(
263+
/usr/local/lib
264+
${CMAKE_CURRENT_SOURCE_DIR}/frameworks/js-bindings/external/spidermonkey/prebuilt/${PLATFORM_FOLDER}/${ARCH_DIR}
265+
)
266+
190267
# jsbindings library
191268
add_subdirectory(frameworks/js-bindings/bindings)
192269

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
<img src="http://www.cocos2d-x.org/attachments/1508/2dh5-logo.png" width=200>
1+
<img src="http://www.cocos2d-x.org/attachments/801/cocos2dx_portrait.png" width=200>
22

33
Cocos2d-JS
44
===========
@@ -39,7 +39,7 @@ Furthermore, JavaScript friendly APIs make your game development experience a br
3939

4040
- Cocos2d-JS v3.0 uses Cocos2d-x 3.2 final as base of JSB solution
4141
- Cocos2d-JS v3.0 is compatible with Cocos Code IDE v1.0.0 RC2+
42-
- Cocos2d-JS v3.0 is compatible with Cocos Studio v1.2 - v1.5.0.1
42+
- Cocos2d-JS v3.0 is compatible with Cocos Studio v1.2 - v2.0
4343

4444
With any problems you might have, our communities are happy to help:
4545

0 commit comments

Comments
 (0)