Skip to content

Commit 767134c

Browse files
authored
Merge 3.17.2 (#19755)
* modify engine version (#19677) * protect empty string (#19680) * fix twice copy lua scripts error (#19687) (#19691) * rename Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.* to Cocos2dxLuaJavaBridge.* (#19694) * fix get environment (#19690) * update release note and change log (#19711) * [js-tests/cpp-tests] iOS: add fonts to Info.plist (#19708) * add fonts to Info.plist * use tabs instead of spaces * fix lua-tests * Update CHANGELOG * setPercent after initialization (#19718)
1 parent dd99b1c commit 767134c

File tree

18 files changed

+108
-51
lines changed

18 files changed

+108
-51
lines changed

Diff for: .gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -182,3 +182,4 @@ temp/
182182

183183
# external libs zip
184184
*.zip
185+
**/simulator/

Diff for: CHANGELOG

+24
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,27 @@
1+
cocos2d-x-3.17.2 May.21 2019
2+
3+
[NEW] Network: added clear requests and responses method to httpclient
4+
[NEW] UI: VideoPlayer added ability to enable/disable looping, resonding user input
5+
[NEW] UI: VideoPlayer added function to set style
6+
[NEW] IMEDispacher: added a function to check if any IME dispatcher is active
7+
[NEW] Renderer: add a function to get current clearing color
8+
[NEW] Lua: added binding codes for `EventDispathcer::addCustomEventListener()`
9+
10+
[REFINE] Android: added optimization codes for OPPO devcies
11+
[REFINE] Network: improved websocket traces
12+
[REFINE] Android: supported Android P cutout area
13+
[REFINE] FontAtlas: font atlas texture initialization delayed
14+
[REFINE] LOG: CCLOG may block thread on windows
15+
16+
[FIX] FileUtils:fixed a bug that `listFiles()` can not work correctly if the file path starts with `assets/` on Android
17+
[FIX] AssetsManager: fixed a bug that `_percent` is always be 0 during the update process
18+
[FIX] Texture2D: fixed memory leak if `Texture2D::setAlphaTexture()` is invoked many times
19+
[FIX] FontAtlasCache: avoided crash if a file path is too long
20+
[FIX] Audio: fixed crash on iOS
21+
[FIX] UI: VideoPlayer could not play video in obb file on Android
22+
[FIX] SpriteFrame: fixed performance issue in parsing plist files
23+
[FIX] 3rd: unzip failed to uncompress files
24+
125
cocos2d-x-3.17.1 Nov.19 2018
226

327
[REFINE] Renderer: properly reduce clear buffer times to save energy

Diff for: cocos/cocos2d.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,7 @@ NS_CC_BEGIN
3232

3333
CC_DLL const char* cocos2dVersion()
3434
{
35-
return "cocos2d-x-3.17.1";
35+
return "cocos2d-x-3.17.2";
3636
}
3737

3838
NS_CC_END

Diff for: cocos/cocos2d.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ THE SOFTWARE.
3131

3232
// 0x00 HI ME LO
3333
// 00 03 08 00
34-
#define COCOS2D_VERSION 0x00031701
34+
#define COCOS2D_VERSION 0x00031702
3535

3636
//
3737
// all cocos2d include files

Diff for: cocos/platform/CCFileUtils.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1517,7 +1517,7 @@ std::vector<std::string> FileUtils::listFiles(const std::string& dirPath) const
15171517
{
15181518
std::vector<std::string> files;
15191519
std::string fullpath = fullPathForDirectory(dirPath);
1520-
if (isDirectoryExist(fullpath))
1520+
if (!fullpath.empty() && isDirectoryExist(fullpath))
15211521
{
15221522
tinydir_dir dir;
15231523
std::string fullpathstr = fullpath;

Diff for: cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp renamed to cocos/scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
****************************************************************************/
2424

2525

26-
#include "scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.h"
26+
#include "scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.h"
2727

2828
#include <android/log.h>
2929

Diff for: cocos/scripting/lua-bindings/proj.android/Android.mk

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ LOCAL_MODULE_FILENAME := libluaccandroid
99
LOCAL_ARM_MODE := arm
1010

1111
LOCAL_SRC_FILES := ../manual/platform/android/CCLuaJavaBridge.cpp \
12-
../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp
12+
../manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp
1313

1414
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
1515
$(LOCAL_PATH)/../manual \

Diff for: cocos/scripting/lua-bindings/proj.android/CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ project(${target_name})
77

88
set(${target_name}_src
99
../manual/platform/android/CCLuaJavaBridge.cpp
10-
../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp
10+
../manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp
1111
)
1212

1313
add_library(${target_name} STATIC

Diff for: docs/RELEASE_NOTES.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
33
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
44

5-
- [Cocos2d-x 3.17.1 Release Notes](#cocos2d-x-3171-release-notes)
5+
- [Cocos2d-x 3.17.2 Release Notes](#cocos2d-x-3172-release-notes)
66
- [Highlights](#highlights)
77

88
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
99

10-
# Cocos2d-x 3.17.1 Release Notes #
10+
# Cocos2d-x 3.17.2 Release Notes #
1111

12-
The 3.17.1 release focuses on bug fixing.
12+
Version 3.17.2 focuses on bugs fixing and performance opimization on OPPO devices.
1313

1414
## Highlights
1515

16-
- Fix Lua loading performance drop bug introduced in 3.17
17-
- Renderer limit glClear invoke times, reduce power consuming
18-
- optimize CMake script,fix some linking issues
19-
- Android use CMake as default PROP_BUILD_TYPE value
20-
- Android upgrade Gradle to 4.6, SDK 28, android gradle plugin 3.1.0
21-
- upgrade LuaJIT to 2.1.0-beta3, fix random crash in 3.17 Lua release mode
22-
- upgrade libwebsockets to 2.4.2
23-
- FileUtils provide thread-safe implementation and add missing cross-platform interfaces
24-
- limit Labels text length to fix render error
25-
- add Downloader binding to Lua
16+
- Performance optimization on OPPO devices
17+
- Fixed bug that`FileUtils::listFiles()` can not work correctly if the file path starts with `assets/` on Android
18+
- Fixed crash caused by Audio on iOS
19+
- Fixed bug that `VideoPlayer` can not play video in obb file on Android
2620

27-
This release contains more than 45 bugs fixed and 34 misc improvements, please refer to [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)
21+
More detail change log please refer to [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG).

Diff for: docs/RELEASE_NOTES_CN.md

+8-14
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@
22
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
33
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
44

5-
- [Cocos2d-x 3.17.1 Release Notes](#cocos2d-x-3171-release-notes)
5+
- [Cocos2d-x 3.17.2 Release Notes](#cocos2d-x-3172-release-notes)
66
- [版本变动](#%E7%89%88%E6%9C%AC%E5%8F%98%E5%8A%A8)
77

88
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
99

10-
# Cocos2d-x 3.17.1 Release Notes #
10+
# Cocos2d-x 3.17.2 Release Notes #
1111

12-
Cocos2d-x 3.17.1 侧重于稳定性的提升, 已有问题的修复
12+
Cocos2d-x 3.17.2 侧重于稳定性的提升, 已有问题的修复和针对 OPPO 手机的性能优化
1313

1414
## 版本变动
1515

16-
- 修复 3.17 引入的 Lua 加载性能下降的 BUG
17-
- 减少渲染中 glClear 的调用次数,降低电量消耗
18-
- CMake 脚本优化,解决存在的链接问题
19-
- Android 默认启用 CMake 方式编译
20-
- Android 升级 Gradle 到 4.6, SDK 28, plugin 3.1.0
21-
- 升级 LuaJIT 到 2.1.0-beta3,修复 3.17 Lua 项目的闪退问题
22-
- 升级 libwebsockets 到 2.4.2
23-
- FileUtils 内部加锁,增加线程安全,完善接口实现
24-
- 限制 Label 长度,避免绘制错误
25-
- 增加 Downloader 的 Lua 绑定
16+
- 针对 OPPO 手机的性能优化
17+
- 修复 bug:在安卓设备,当文件路径开头为 `assets/` 时, `FileUtils::listFiles()` 无法正常工作
18+
- 修复了 Audio 在 iOS 设备上的崩溃问题
19+
- 修复了在安卓设备, `VideoPlayer` 无法播放 OBB 包里的视频文件的问题
2620

27-
当前版本包含 45 项 bugs 修复和 34 项小改进,不再列举,请参考 [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)
21+
详细的改动请参考 [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)

Diff for: docs/doxygen.config

+1-1
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ PROJECT_NAME = Cocos2d-x
3838
# could be handy for archiving the generated documentation or if some version
3939
# control system is used.
4040

41-
PROJECT_NUMBER = v3.17.1
41+
PROJECT_NUMBER = v3.17.2
4242

4343
# Using the PROJECT_BRIEF tag one can provide an optional one line description
4444
# for a project that appears at the top of each page and should give viewer a

Diff for: templates/cocos2dx_files.json

+2-2
Original file line numberDiff line numberDiff line change
@@ -5517,8 +5517,8 @@
55175517
"cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h",
55185518
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp",
55195519
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h",
5520-
"cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp",
5521-
"cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.h",
5520+
"cocos/scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp",
5521+
"cocos/scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.h",
55225522
"cocos/scripting/lua-bindings/manual/platform/ios/CCLuaObjcBridge.h",
55235523
"cocos/scripting/lua-bindings/manual/platform/ios/CCLuaObjcBridge.mm",
55245524
"cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp",

Diff for: tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1465,7 +1465,7 @@ void TestIsFileExistRejectFolder::onEnter()
14651465
auto isDirectory = FileUtils::getInstance()->isDirectoryExist("NavMesh/maps");
14661466

14671467
char cntBuffer[200] = { 0 };
1468-
snprintf(cntBuffer, 200, "isDir: %s, isFile: %s, %s", isDirectory ? "true": "false" , exists ? "true" : "false", exists ? "failure!" : "ok!" );
1468+
snprintf(cntBuffer, 200, "isDir: %s, isFile: %s", isDirectory ? "true": "false" , exists ? "true" : "false");
14691469
cntLabel->setString(cntBuffer);
14701470

14711471
}

Diff for: tests/cpp-tests/proj.ios/Info.plist

+19-3
Original file line numberDiff line numberDiff line change
@@ -33,12 +33,28 @@
3333
</dict>
3434
<key>UIAppFonts</key>
3535
<array>
36-
<string>fonts/A Damn Mess.ttf</string>
37-
<string>fonts/Abberancy.ttf</string>
36+
<string>fonts/American Typewriter.ttf</string>
3837
<string>fonts/Abduction.ttf</string>
38+
<string>fonts/ThonburiBold.ttf</string>
39+
<string>fonts/Fingerpop.ttf</string>
3940
<string>fonts/Paint Boy.ttf</string>
40-
<string>fonts/Schwarzwald.ttf</string>
41+
<string>fonts/A Damn Mess.ttf</string>
42+
<string>fonts/Schwarzwald Regular.ttf</string>
43+
<string>fonts/Courier New.ttf</string>
44+
<string>fonts/Japanese.ttf</string>
45+
<string>fonts/xingkai-incomplete.ttf</string>
46+
<string>fonts/arial.ttf</string>
4147
<string>fonts/Scissor Cuts.ttf</string>
48+
<string>fonts/FingerpopGap.ttf</string>
49+
<string>fonts/NotoEmoji-Regular.ttf</string>
50+
<string>fonts/Marker Felt.ttf</string>
51+
<string>fonts/Schwarzwald.ttf</string>
52+
<string>fonts/cyril.ttf</string>
53+
<string>fonts/tahoma.ttf</string>
54+
<string>fonts/HKYuanMini.ttf</string>
55+
<string>fonts/cyrillic.ttf</string>
56+
<string>fonts/Abberancy.ttf</string>
57+
<string>fonts/Thonburi.ttf</string>
4258
</array>
4359
<key>UILaunchStoryboardName</key>
4460
<string>LaunchScreen</string>

Diff for: tests/js-tests/project/proj.ios/Info.plist

+18-6
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,30 @@
5555
</dict>
5656
<key>UIAppFonts</key>
5757
<array>
58-
<string>res/fonts/A Damn Mess.ttf</string>
59-
<string>res/fonts/Abberancy.ttf</string>
60-
<string>res/fonts/Abduction.ttf</string>
58+
<string>res/ccb/comic andy.ttf</string>
6159
<string>res/fonts/American Typewriter.ttf</string>
62-
<string>res/fonts/Courier New.ttf</string>
63-
<string>res/fonts/Marker Felt.ttf</string>
60+
<string>res/fonts/Abduction.ttf</string>
61+
<string>res/fonts/ThonburiBold.ttf</string>
62+
<string>res/fonts/Fingerpop.ttf</string>
6463
<string>res/fonts/Paint Boy.ttf</string>
64+
<string>res/fonts/A Damn Mess.ttf</string>
6565
<string>res/fonts/Schwarzwald Regular.ttf</string>
66+
<string>res/fonts/Courier New.ttf</string>
67+
<string>res/fonts/Japanese.ttf</string>
68+
<string>res/fonts/xingkai-incomplete.ttf</string>
69+
<string>res/fonts/arial.ttf</string>
6670
<string>res/fonts/Scissor Cuts.ttf</string>
71+
<string>res/fonts/FingerpopGap.ttf</string>
72+
<string>res/fonts/NotoEmoji-Regular.ttf</string>
73+
<string>res/fonts/Marker Felt.ttf</string>
74+
<string>res/fonts/Schwarzwald.ttf</string>
75+
<string>res/fonts/cyril.ttf</string>
6776
<string>res/fonts/tahoma.ttf</string>
77+
<string>res/fonts/HKYuanMini.ttf</string>
78+
<string>res/fonts/cyrillic.ttf</string>
79+
<string>res/fonts/Abberancy.ttf</string>
6880
<string>res/fonts/Thonburi.ttf</string>
69-
<string>res/fonts/ThonburiBold.ttf</string>
81+
<string>res/resjs/ccb/comic andy.ttf</string>
7082
</array>
7183
<key>UILaunchStoryboardName</key>
7284
<string>LaunchScreen</string>

Diff for: tests/lua-tests/project/proj.ios_mac/ios/Info.plist

+19-3
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,28 @@
4242
</dict>
4343
<key>UIAppFonts</key>
4444
<array>
45-
<string>fonts/A Damn Mess.ttf</string>
46-
<string>fonts/Abberancy.ttf</string>
45+
<string>fonts/American Typewriter.ttf</string>
4746
<string>fonts/Abduction.ttf</string>
47+
<string>fonts/ThonburiBold.ttf</string>
48+
<string>fonts/Fingerpop.ttf</string>
4849
<string>fonts/Paint Boy.ttf</string>
49-
<string>fonts/Schwarzwald.ttf</string>
50+
<string>fonts/A Damn Mess.ttf</string>
51+
<string>fonts/Schwarzwald Regular.ttf</string>
52+
<string>fonts/Courier New.ttf</string>
53+
<string>fonts/Japanese.ttf</string>
54+
<string>fonts/xingkai-incomplete.ttf</string>
55+
<string>fonts/arial.ttf</string>
5056
<string>fonts/Scissor Cuts.ttf</string>
57+
<string>fonts/FingerpopGap.ttf</string>
58+
<string>fonts/NotoEmoji-Regular.ttf</string>
59+
<string>fonts/Marker Felt.ttf</string>
60+
<string>fonts/Schwarzwald.ttf</string>
61+
<string>fonts/cyril.ttf</string>
62+
<string>fonts/tahoma.ttf</string>
63+
<string>fonts/HKYuanMini.ttf</string>
64+
<string>fonts/cyrillic.ttf</string>
65+
<string>fonts/Abberancy.ttf</string>
66+
<string>fonts/Thonburi.ttf</string>
5167
</array>
5268
<key>UILaunchStoryboardName</key>
5369
<string>LaunchScreen</string>

Diff for: tools/cocos2d-console

Submodule cocos2d-console updated 1 file

0 commit comments

Comments
 (0)