Skip to content

Commit

Permalink
Merge 3.17.2 (#19755)
Browse files Browse the repository at this point in the history
* 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)
  • Loading branch information
minggo authored May 27, 2019
1 parent dd99b1c commit 767134c
Show file tree
Hide file tree
Showing 18 changed files with 108 additions and 51 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -182,3 +182,4 @@ temp/

# external libs zip
*.zip
**/simulator/
24 changes: 24 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,27 @@
cocos2d-x-3.17.2 May.21 2019

[NEW] Network: added clear requests and responses method to httpclient
[NEW] UI: VideoPlayer added ability to enable/disable looping, resonding user input
[NEW] UI: VideoPlayer added function to set style
[NEW] IMEDispacher: added a function to check if any IME dispatcher is active
[NEW] Renderer: add a function to get current clearing color
[NEW] Lua: added binding codes for `EventDispathcer::addCustomEventListener()`

[REFINE] Android: added optimization codes for OPPO devcies
[REFINE] Network: improved websocket traces
[REFINE] Android: supported Android P cutout area
[REFINE] FontAtlas: font atlas texture initialization delayed
[REFINE] LOG: CCLOG may block thread on windows

[FIX] FileUtils:fixed a bug that `listFiles()` can not work correctly if the file path starts with `assets/` on Android
[FIX] AssetsManager: fixed a bug that `_percent` is always be 0 during the update process
[FIX] Texture2D: fixed memory leak if `Texture2D::setAlphaTexture()` is invoked many times
[FIX] FontAtlasCache: avoided crash if a file path is too long
[FIX] Audio: fixed crash on iOS
[FIX] UI: VideoPlayer could not play video in obb file on Android
[FIX] SpriteFrame: fixed performance issue in parsing plist files
[FIX] 3rd: unzip failed to uncompress files

cocos2d-x-3.17.1 Nov.19 2018

[REFINE] Renderer: properly reduce clear buffer times to save energy
Expand Down
2 changes: 1 addition & 1 deletion cocos/cocos2d.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ NS_CC_BEGIN

CC_DLL const char* cocos2dVersion()
{
return "cocos2d-x-3.17.1";
return "cocos2d-x-3.17.2";
}

NS_CC_END
Expand Down
2 changes: 1 addition & 1 deletion cocos/cocos2d.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ THE SOFTWARE.

// 0x00 HI ME LO
// 00 03 08 00
#define COCOS2D_VERSION 0x00031701
#define COCOS2D_VERSION 0x00031702

//
// all cocos2d include files
Expand Down
2 changes: 1 addition & 1 deletion cocos/platform/CCFileUtils.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1517,7 +1517,7 @@ std::vector<std::string> FileUtils::listFiles(const std::string& dirPath) const
{
std::vector<std::string> files;
std::string fullpath = fullPathForDirectory(dirPath);
if (isDirectoryExist(fullpath))
if (!fullpath.empty() && isDirectoryExist(fullpath))
{
tinydir_dir dir;
std::string fullpathstr = fullpath;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
****************************************************************************/


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

#include <android/log.h>

Expand Down
2 changes: 1 addition & 1 deletion cocos/scripting/lua-bindings/proj.android/Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ LOCAL_MODULE_FILENAME := libluaccandroid
LOCAL_ARM_MODE := arm

LOCAL_SRC_FILES := ../manual/platform/android/CCLuaJavaBridge.cpp \
../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp
../manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp

LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../.. \
$(LOCAL_PATH)/../manual \
Expand Down
2 changes: 1 addition & 1 deletion cocos/scripting/lua-bindings/proj.android/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ project(${target_name})

set(${target_name}_src
../manual/platform/android/CCLuaJavaBridge.cpp
../manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp
../manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp
)

add_library(${target_name} STATIC
Expand Down
22 changes: 8 additions & 14 deletions docs/RELEASE_NOTES.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

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

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

# Cocos2d-x 3.17.1 Release Notes #
# Cocos2d-x 3.17.2 Release Notes #

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

## Highlights

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

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)
More detail change log please refer to [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG).
22 changes: 8 additions & 14 deletions docs/RELEASE_NOTES_CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,26 +2,20 @@
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*

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

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

# Cocos2d-x 3.17.1 Release Notes #
# Cocos2d-x 3.17.2 Release Notes #

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

## 版本变动

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

当前版本包含 45 项 bugs 修复和 34 项小改进,不再列举,请参考 [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)
详细的改动请参考 [ChangeLog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)
2 changes: 1 addition & 1 deletion docs/doxygen.config
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ PROJECT_NAME = Cocos2d-x
# could be handy for archiving the generated documentation or if some version
# control system is used.

PROJECT_NUMBER = v3.17.1
PROJECT_NUMBER = v3.17.2

# Using the PROJECT_BRIEF tag one can provide an optional one line description
# for a project that appears at the top of each page and should give viewer a
Expand Down
4 changes: 2 additions & 2 deletions templates/cocos2dx_files.json
Original file line number Diff line number Diff line change
Expand Up @@ -5517,8 +5517,8 @@
"cocos/scripting/lua-bindings/manual/physics3d/lua_cocos2dx_physics3d_manual.h",
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.cpp",
"cocos/scripting/lua-bindings/manual/platform/android/CCLuaJavaBridge.h",
"cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.cpp",
"cocos/scripting/lua-bindings/manual/platform/android/jni/Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.h",
"cocos/scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.cpp",
"cocos/scripting/lua-bindings/manual/platform/android/jni/Cocos2dxLuaJavaBridge.h",
"cocos/scripting/lua-bindings/manual/platform/ios/CCLuaObjcBridge.h",
"cocos/scripting/lua-bindings/manual/platform/ios/CCLuaObjcBridge.mm",
"cocos/scripting/lua-bindings/manual/spine/LuaSkeletonAnimation.cpp",
Expand Down
2 changes: 1 addition & 1 deletion tests/cpp-tests/Classes/FileUtilsTest/FileUtilsTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1465,7 +1465,7 @@ void TestIsFileExistRejectFolder::onEnter()
auto isDirectory = FileUtils::getInstance()->isDirectoryExist("NavMesh/maps");

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

}
Expand Down
22 changes: 19 additions & 3 deletions tests/cpp-tests/proj.ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -33,12 +33,28 @@
</dict>
<key>UIAppFonts</key>
<array>
<string>fonts/A Damn Mess.ttf</string>
<string>fonts/Abberancy.ttf</string>
<string>fonts/American Typewriter.ttf</string>
<string>fonts/Abduction.ttf</string>
<string>fonts/ThonburiBold.ttf</string>
<string>fonts/Fingerpop.ttf</string>
<string>fonts/Paint Boy.ttf</string>
<string>fonts/Schwarzwald.ttf</string>
<string>fonts/A Damn Mess.ttf</string>
<string>fonts/Schwarzwald Regular.ttf</string>
<string>fonts/Courier New.ttf</string>
<string>fonts/Japanese.ttf</string>
<string>fonts/xingkai-incomplete.ttf</string>
<string>fonts/arial.ttf</string>
<string>fonts/Scissor Cuts.ttf</string>
<string>fonts/FingerpopGap.ttf</string>
<string>fonts/NotoEmoji-Regular.ttf</string>
<string>fonts/Marker Felt.ttf</string>
<string>fonts/Schwarzwald.ttf</string>
<string>fonts/cyril.ttf</string>
<string>fonts/tahoma.ttf</string>
<string>fonts/HKYuanMini.ttf</string>
<string>fonts/cyrillic.ttf</string>
<string>fonts/Abberancy.ttf</string>
<string>fonts/Thonburi.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
24 changes: 18 additions & 6 deletions tests/js-tests/project/proj.ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -55,18 +55,30 @@
</dict>
<key>UIAppFonts</key>
<array>
<string>res/fonts/A Damn Mess.ttf</string>
<string>res/fonts/Abberancy.ttf</string>
<string>res/fonts/Abduction.ttf</string>
<string>res/ccb/comic andy.ttf</string>
<string>res/fonts/American Typewriter.ttf</string>
<string>res/fonts/Courier New.ttf</string>
<string>res/fonts/Marker Felt.ttf</string>
<string>res/fonts/Abduction.ttf</string>
<string>res/fonts/ThonburiBold.ttf</string>
<string>res/fonts/Fingerpop.ttf</string>
<string>res/fonts/Paint Boy.ttf</string>
<string>res/fonts/A Damn Mess.ttf</string>
<string>res/fonts/Schwarzwald Regular.ttf</string>
<string>res/fonts/Courier New.ttf</string>
<string>res/fonts/Japanese.ttf</string>
<string>res/fonts/xingkai-incomplete.ttf</string>
<string>res/fonts/arial.ttf</string>
<string>res/fonts/Scissor Cuts.ttf</string>
<string>res/fonts/FingerpopGap.ttf</string>
<string>res/fonts/NotoEmoji-Regular.ttf</string>
<string>res/fonts/Marker Felt.ttf</string>
<string>res/fonts/Schwarzwald.ttf</string>
<string>res/fonts/cyril.ttf</string>
<string>res/fonts/tahoma.ttf</string>
<string>res/fonts/HKYuanMini.ttf</string>
<string>res/fonts/cyrillic.ttf</string>
<string>res/fonts/Abberancy.ttf</string>
<string>res/fonts/Thonburi.ttf</string>
<string>res/fonts/ThonburiBold.ttf</string>
<string>res/resjs/ccb/comic andy.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
22 changes: 19 additions & 3 deletions tests/lua-tests/project/proj.ios_mac/ios/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -42,12 +42,28 @@
</dict>
<key>UIAppFonts</key>
<array>
<string>fonts/A Damn Mess.ttf</string>
<string>fonts/Abberancy.ttf</string>
<string>fonts/American Typewriter.ttf</string>
<string>fonts/Abduction.ttf</string>
<string>fonts/ThonburiBold.ttf</string>
<string>fonts/Fingerpop.ttf</string>
<string>fonts/Paint Boy.ttf</string>
<string>fonts/Schwarzwald.ttf</string>
<string>fonts/A Damn Mess.ttf</string>
<string>fonts/Schwarzwald Regular.ttf</string>
<string>fonts/Courier New.ttf</string>
<string>fonts/Japanese.ttf</string>
<string>fonts/xingkai-incomplete.ttf</string>
<string>fonts/arial.ttf</string>
<string>fonts/Scissor Cuts.ttf</string>
<string>fonts/FingerpopGap.ttf</string>
<string>fonts/NotoEmoji-Regular.ttf</string>
<string>fonts/Marker Felt.ttf</string>
<string>fonts/Schwarzwald.ttf</string>
<string>fonts/cyril.ttf</string>
<string>fonts/tahoma.ttf</string>
<string>fonts/HKYuanMini.ttf</string>
<string>fonts/cyrillic.ttf</string>
<string>fonts/Abberancy.ttf</string>
<string>fonts/Thonburi.ttf</string>
</array>
<key>UILaunchStoryboardName</key>
<string>LaunchScreen</string>
Expand Down
2 changes: 1 addition & 1 deletion tools/cocos2d-console
Submodule cocos2d-console updated 1 files
+9 −2 plugins/plugin_compile/project_compile.py

0 comments on commit 767134c

Please sign in to comment.