diff --git a/CHANGELOG b/CHANGELOG index e3e79d7ac688..8bf48bdb1ee0 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,106 @@ +cocos2d-x-3.17 May.21 2018 + +[HIGHLIGHT] Android: support Android Studio 3.0, NDK 16 +[HIGHLIGHT] iOS: support full screen for iPhone X and uses Storyboard for launch screen +[HIGHLIGHT] 3rd: upgrade Spine runtime to v3.6.39 +[HIGHLIGHT] 3rd: upgrade GLFW to 3.2.1 +[HIGHLIGHT] CMake support all platforms, and support prebuilt engine libs + +[NEW] Engine: multisampling support +[NEW] Label: support non-breaking characters +[NEW] Label: support belarusian language +[NEW] UI: add blend function for Text +[NEW] UI: add ScrollView API to stop overall scroll +[NEW] iOS: add auto hide home indicator for iPhone X +[NEW] iOS: provides an interface for getting SafeArea +[NEW] Andorid: add one more android return button types + +[REFINE] Engine: support reading object.rotation attribute in TMX +[REFINE] Engine: make the sort behavior is same on 32bit and 64bit +[REFINE] Engine: static analize fixes +[REFINE] Engine: improve comments in ccConfig.h, JniHelper.h +[REFINE] Engine: remove plugin submodule +[REFINE] Engine: improve StringUtils::format implementation +[REFINE] Label: don't count spaces at the end of line as part of the line width +[REFENE] UI: partial cursor support with system font in TextField +[REFINE] UI: support BMFont in TextField +[REFINE] UI: improve EditBox on win32 platform +[REFINE] UI: RichText improvements, get the real height by automatically customize ContentSize, refactor split algorithm +[REFINE] UI: remove autorelease mark from UIWebViewWrapper and manage memory manually +[REFINE] Lua: implementation conversion Lua table to ObjC Dictionary +[REFINE] Lua: improve loader, support standerd Lua package require +[REFINE] Web: upgrade Spine Javascript runtime to v3.6.39 +[REFINE] Windows: speed up build by supporting precompiled header +[REFINE] Windows: remove Visual Studio 2013 support +[REFINE] Windows: Windows 10 update compiler to PlatformToolset v141 +[REFINE] iOS: uses Images.xcassets instead of several icon png files +[REFINE] Android: support Android Studio 3.0.0, switch to libc++, simplify PROP_* valuse, add default Proguard Config for cocos +[REFINE] Android: remove ant project +[REFINE] Android: update NDK from r14 to r16 +[REFINE] Andorid: improve Android.mk, not have to set NDK_MODULE_PATH in project settings +[REFINE] Android: detail comments for cddandroidAndroidJavaEngine.h, Cocos2dxSound.java +[REFINE] Linux: provide prebuilt version of GLFW +[REFINE] cocos console: remove ant build support +[REFINE] cocos console: support building release APK without key information +[REFINE] 3rd: remove Visual Studio 2013 libs +[REFINE] 3rd: remove Android armeabi libs since it is deprecated and will be removed in r17 +[REFINE] 3rd: rebuild all Android libs with clang in ndk-r16 +[REFINE] 3rd: cmake build support for partial libs +[REFENE] 3rd: update Box2D to latest commit f655c603ba9d83 +[REFINE] 3rd: use prebuilt Box2D + +[FIX] Engine: capture image loses quality when using RenderTexture +[FIX] Engine: RenderTexture DepthAndStencil issue on Android +[FIX] Engine: race condition resulting in deadlock infrequently in TextureCache +[FIX] Engine: CCConsole.cpp compile error with C++17 and clang +[FIX] Engine: TrianglesCommand hashing technique doesn't take padding into account +[FIX] Engine: default GLView bit depth is too low on desktop +[FIX] Engine: cocos2d::log va_list re-use bug +[FIX] Engine: cocos2d::Image::saveImageToPNG saves image in wrong PNG format +[FIX] Engine: CameraBackgroundColorBrush cannot use alpha +[FIX] Engine: crash in Allocator if there are no allocated pages +[FIX] Engine: crash when the UserDefault.xml file is empty +[FIX] Engine: memory leak in ObjectFactory destroyInstance, UserDefault::deleteValueForKey +[FIX] Engine: replace ptr_fun with lambda, fix compile error with C++17 and clang +[FIX] Engine: fix some warning issues +[FIX] Label: memory leak when using TTF labels +[FIX] Label: memory leak in FontFreeType::create +[FIX] Label: Non-TTF Label Shadow issue, make it follow Label opacity +[FIX] UI: RichText issue caused by Label when its string is very long +[FIX] UI: EditBox right padding error +[FIX] UI: win32 EditBox has wrong scale factor +[FIX] UI: TableView button click event not response when the button is a cell +[FIX] UI: correct bugs with cursor in TextField +[FIX] UI: Android EditBox use 'setSelection' error when the text beyond the border +[FIX] UI: iOS EditBox will penetrate the underlying UI event +[FIX] UI: use setTextColor for EditBox placeholder +[FIX] UI: returning UNKNOWN event for return type key SEARCH/SEND in EditBox +[FIX] UI: crash when call TextFieldTTF::setCursorFromPoint +[FIX] UI: ListView, avoid of type overflow while list size calculation +[FIX] Audio: miss return value of onWavClose function +[FIX] Audio: wrong header include in mp3reader.cpp, apple/AudioEngine-inl.h +[FIX] Audio: wrong status check in apple/AudioDecoder.mm +[FIX] Lua: should set listener to null when unregister spine event handler +[FIX] Lua: event condition bugs on ParticleTest.lua +[FIX] JSB: some memory leaks and crashes +[FIX] JSB: miss GetterSetter define for the placeHolder of TextField +[FIX] Web: out-of-date submodule commmit of cocos2d-html5 repo +[FIX] Web: bugs for Performance Test for Spine on WebGL +[FIX] iOS: fix bug about delayed creation UIWebView on iOS +[FIX] Andorid: infinite loop when counting text lines on Android in some situations +[FIX] Android: crash when network error message is too long +[FIX] Android: JniHelper no longer thread safe +[FIX] Android: proguard-rules.pro error for tests project +[FIX] Andorid: some violations about I/O operation on UI thread, which may lead to ANR +[FIX] Android: AppAcitivity is recreated which causes crash +[FIX] Android: Emulator blank screen 0x501 and 0x502 problems +[FIX] Android: Emulator stensil fix +[FIX] Android: Fix endian detection (node render order) +[FIX] Android: issue with not stable 60 fps +[FIX] Android: issue with accelerometer on Android on reverse landscape/portrait +[FIX] WinRT: fix keyBoard bug when input chinese +[FIX] cocos console: fix archive issue with Xcode 9 + cocos2d-x-3.16 Oct.9 2017 [NEW] Add RadialGradientLayer [NEW] Web: Add GLProgramState and upgrade web shader usage APIs diff --git a/README.md b/README.md index 8040d1bdcb7a..69792438afd5 100644 --- a/README.md +++ b/README.md @@ -119,6 +119,8 @@ Cocos2d-x supports CMake, a cross-platform build system. Example usage: $ mkdir cmake-build && cd cmake-build $ cmake .. +* [Detail CMake Guide](cmake/README.md) + Documentations and samples ------------- * [All Docs in a single place!](http://cocos2d-x.org/docs/) @@ -163,17 +165,17 @@ Build Requirements ------------------ * Mac OS X 10.7+, Xcode 8+ -* or Ubuntu 12.10+, CMake 2.6+ +* or Ubuntu 14.04+, CMake 3.1+ * or Windows 7+, VS 2015 -* Python 2.7.5 +* Python 2.7.5+(NOT Python 3) * NDK r16+ is required to build Android games -* Android Studio 2.3.3+ to build Android games(tested with 2.3.3) +* Android Studio 3.0.0+ to build Android games(tested with 3.0.0) * JRE or JDK 1.6+ is required for web publishing Runtime Requirements -------------------- * iOS 8.0+ for iPhone / iPad games - * Android 2.3.3+ for Android + * Android 3.0.0+ for Android * OS X v10.9+ for Mac games * Windows 7+ for Win games * Modern browsers and IE 9+ for web games @@ -210,20 +212,20 @@ $ open cocos2d_tests.xcodeproj ``` $ cd cocos2d-x/build $ ./install-deps-linux.sh -$ cmake .. -$ make +$ mkdir linux-build +$ cd linux-build +$ cmake ../.. ``` Run Samples ``` -$ bin/cpp-empty-test/cpp-empty-test +$ bin/Debug/cpp-empty-test/cpp-empty-test or -$ bin/lua-empty-test/lua-empty-test +$ bin/Debug/lua-empty-test/lua-empty-test ``` - You may meet building errors when building libGLFW.so. It is because libGL.so directs to an error target, - you should make it to direct to a correct one. `install-deps-linux.sh` only has to be run once. +> You may meet building errors when building libGLFW.so. It is because libGL.so directs to an error target, you should make it to direct to a correct one. `install-deps-linux.sh` only has to be run once. * For Windows @@ -239,7 +241,7 @@ $ adb install ../tests/cpp-empty-test/proj.android/bin/CppEmptyTest-debug.apk Then click item on Android device to run tests. Available value of `-p` is the API level, cocos2d-x supports from level 14. -* [Detail CMake Guide](cmake/README.md) +Or you can import the project located at `tests/cpp-empty-test/proj.android` using Android Studio 3.0.0+. Learning Resources -------------------------------- @@ -269,15 +271,16 @@ You can see exactly what we are planning to do with the Cocos family of products Where to get help -------------------------------- -* [Forums](http://discuss.cocos2d-x.org) +* [English Forums](http://discuss.cocos2d-x.org) +* [中文社区](http://forum.cocos.com/c/cocos2d-x) * [Bug Tracker](https://github.com/cocos2d/cocos2d-x/issues) +* [API Reference](http://cocos2d-x.org/docs/api-ref/index.html). +* [Latest Release Note](https://github.com/cocos2d/cocos2d-x/blob/v3/docs/RELEASE_NOTES.md) +* [Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) * IRC. We are in [Freenode](https://webchat.freenode.net/) in the _#cocos2d_ channel * `cpp-tests` project. This project is our basis for testing. Use this project to learn how we implement the functionality of the engine. This project is located in __cocos2d-x_root/build.__ -* [API Reference](http://cocos2d-x.org/docs/api-ref/index.html). -* [Latest Release Note](https://github.com/cocos2d/cocos2d-x/blob/v3/docs/RELEASE_NOTES.md) -* [Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) Contributing to the Project -------------------------------- diff --git a/cmake/Modules/CocosPickLibs.cmake b/cmake/Modules/CocosPickLibs.cmake index 595e7d4c73f1..5849dcfa56a7 100644 --- a/cmake/Modules/CocosPickLibs.cmake +++ b/cmake/Modules/CocosPickLibs.cmake @@ -226,6 +226,7 @@ foreach(_lib ${all_prebuilt_libs}) endif(EXISTS ${_dir}) endforeach() if(include_dirs) + list(REMOVE_DUPLICATES include_dirs) set(${_prefix}_INCLUDE_DIRS ${include_dirs} CACHE PATH "Path to includes for ${_prefix}" FORCE) message(STATUS "${_lib} ${_prefix}_INCLUDE_DIRS: ${${_prefix}_INCLUDE_DIRS}") # don't find lib, if not find include in once ${_root} search diff --git a/cmake/Modules/CocosUseLibs.cmake b/cmake/Modules/CocosUseLibs.cmake index 2b869a22bdb8..7b29d8231fd5 100644 --- a/cmake/Modules/CocosUseLibs.cmake +++ b/cmake/Modules/CocosUseLibs.cmake @@ -5,7 +5,7 @@ macro(cocos2d_depend_libs) set(PREBUILT_SPECIFIC_LIBS) if(WINDOWS) - foreach(_pkg OPENGL GLEW GLFW3 VORBIS MPG123 OPENAL) + foreach(_pkg OPENGL GLEW GLFW3 VORBIS MPG123 OPENAL SQLITE3) list(APPEND PREBUILT_SPECIFIC_LIBS ${_pkg}) endforeach() list(APPEND PLATFORM_SPECIFIC_LIBS ws2_32 winmm Version Iphlpapi) @@ -15,7 +15,7 @@ macro(cocos2d_depend_libs) elseif(LINUX) # need review those libs: X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m list(APPEND PLATFORM_SPECIFIC_LIBS dl X11 Xi Xrandr Xxf86vm Xinerama Xcursor rt m) - foreach(_pkg OPENGL GLEW GLFW3 FMOD FONTCONFIG THREADS GTK3) + foreach(_pkg OPENGL GLEW GLFW3 FMOD FONTCONFIG THREADS GTK3 SQLITE3) list(APPEND PREBUILT_SPECIFIC_LIBS ${_pkg}) endforeach() elseif(ANDROID) @@ -77,7 +77,7 @@ macro(cocos2d_depend_libs) endif() endif() - foreach(_pkg ZLIB MINIZIP TinyXML2 FREETYPE WEBSOCKETS CURL FLATBUFFERS XXHASH SQLITE3) + foreach(_pkg ZLIB MINIZIP TinyXML2 FREETYPE WEBSOCKETS CURL FLATBUFFERS XXHASH) list(APPEND PREBUILT_SPECIFIC_LIBS ${_pkg}) endforeach() @@ -166,6 +166,7 @@ macro(jscocos2d_depend_libs) if(APPLE) find_library(GAME_CONTROLLER GameController) list(APPEND PLATFORM_SPECIFIC_LIBS ${GAME_CONTROLLER}) + list(APPEND PREBUILT_SPECIFIC_LIBS SQLITE3) endif() endmacro() diff --git a/cmake/README.md b/cmake/README.md index 982975dcdc36..ff9dd33ec7f2 100644 --- a/cmake/README.md +++ b/cmake/README.md @@ -1,17 +1,20 @@ - # CMake Guide -CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generate native makefiles and workspaces that can be used in the compiler environment of your choice. +CMake is an open-source, cross-platform family of tools designed to build, test and package software. CMake is used to control the software compilation process using simple platform and compiler independent configuration files, and generates native makefiles and workspaces that can be used in the compiler environment of your choice. ## Requirement -1. Open your terminal, input `cmake --version`, if the cmake version is lower than 3.1, please upgrade +1. Open your terminal and execute: + ```sh + cmake --version + ``` +if the CMake version is lower than 3.1, please upgrade. -2. You should use out-of-source build, that is said you need to create a different directory from `cocos2d-x` to execute cmake command. +2. You should use __out-of-source__ builds, this means you need to create a different directory than __cocos2d-x__ to execute the `cmake` command. ## Step by Step -### Build in Linux +### Linux ```sh cd cocos2d-x @@ -22,7 +25,7 @@ make Execute `make help` to see all build targets, `make ` build specified target -### Generate Visual Studio project +### Generate Visual Studio projects ```sh cd cocos2d-x @@ -30,7 +33,7 @@ mkdir win32-build && cd win32-build cmake .. -G"Visual Studio 15 2017" -Tv141 ``` -Execute `cmake --build .` to compile, or open `Cocos2d-x.sln` in Explorer to use the generated project. +Execute `cmake --build .` to compile, or open __Cocos2d-x.sln__ in Explorer to use the generated project. ### Generate macOS Project @@ -50,11 +53,11 @@ cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.toolchain.cmake open Cocos2d-x.xcodeproj ``` -The default build is for iOS device, if you want to run on simulator, please add `-DIOS_PLATFORM=SIMULATOR` for architecture i386 or `-DIOS_PLATFORM=SIMULATOR64` for x86_64. +The default build is for running on actual iOS hardware, if you want to run in the simulator, please add `-DIOS_PLATFORM=SIMULATOR` for architecture i386 or `-DIOS_PLATFORM=SIMULATOR64` for x86_64. -### CMake in Android Studio +### Android Studio -We use the Gradle to Android applacition, and Gradle use cmake to build the native code, see the [property](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/gradle.properties#L38): `PROP_NDK_MODE`, it control the way of native build +We use the Gradle for Android applications, and Gradle use cmake to build the native code, see [gradle.properties](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/gradle.properties#L38): `PROP_NDK_MODE`, it controls how native builds work. ```sh # android native code build type @@ -64,15 +67,15 @@ We use the Gradle to Android applacition, and Gradle use cmake to build the nati PROP_BUILD_TYPE=ndk-build ``` -If you want to add cmake build arguments, please add it at [externalNativeBuild](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L25) block of [app/build.gradle] file. +If you want to add cmake build arguments, please add it at [external Native Build](https://github.com/cocos2d/cocos2d-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L25) block of __app/build.gradle__ file. -## Prebuilt feature +## Prebuilt libraries feature -To solve the problem that compiling engine sources spends too long time, we add the feature of pre-builds libs. Using this feature you only need build engine sources once for a specific environment. +To solve long compilation times of the engine source code one can use prebuilt libraries. Using this feature you only need build engine sources once for a specific environment or again when the engine version changes and you wish to utilize the new version. ### Example -This is an example of build cpp libs once, and use it in different cpp project. +This is an example of building c++ libs once, and use them in different c++ projects. ```sh cocos new -l cpp -p my.pack.app1 test_app1 @@ -81,7 +84,7 @@ cmake ../test_app1 -DGEN_COCOS_PREBUILT=ON make prebuilt ``` -Close option `GEN_COCOS_PREBUILT` and open `USE_COCOS_PREBUILT` to use prebuilt in the same project +Change option `GEN_COCOS_PREBUILT` and use instead `USE_COCOS_PREBUILT` to use prebuilt in the same project ```sh cmake ../test_app1 -DGEN_COCOS_PREBUILT=OFF -DUSE_COCOS_PREBUILT=ON @@ -98,13 +101,14 @@ cmake ../test_app2 -DUSE_COCOS_PREBUILT=ON make TemplateCpp open bin/TemplateCpp.app ``` + > Any other cpp project can use prebuilt in this way -Using this feature on Android exists a little difference, for CMake can't find system environment when build in Gradle. So you need to [supply a path](https://github.com/cocos2d/cocos2d-x/blob/c087be314c2c56a757bf66163b173746b5d6ad34/tests/cpp-empty-test/proj.android/app/build.gradle#L34) as the location of prebuilt libs. +When using the prebuilt libraries on Android there is a small difference as CMake can't find system environment when built using Gradle. You need to [supply a path](https://github.com/cocos2d/cocos2d-x/blob/c087be314c2c56a757bf66163b173746b5d6ad34/tests/cpp-empty-test/proj.android/app/build.gradle#L34) as the location of prebuilt libs. ## Build Options -### CMake Common +### CMake Common Build Options 1. __`-G`__, generate native build project you specified, for example @@ -141,8 +145,8 @@ Using this feature on Android exists a little difference, for CMake can't find s ## Useful Links -* Official website: [cmake.org](https://cmake.org/) +* CMake Official website: [cmake.org](https://cmake.org/) -* Documentation: [cmake.org/documentation](https://cmake.org/documentation/) +* CMake Documentation: [cmake.org/documentation](https://cmake.org/documentation/) * CMake FAQ: [Wiki/CMake_FAQ](https://cmake.org/Wiki/CMake_FAQ) \ No newline at end of file diff --git a/docs/RELEASE_NOTES.md b/docs/RELEASE_NOTES.md index 448494d1c841..da4ca4b8055f 100644 --- a/docs/RELEASE_NOTES.md +++ b/docs/RELEASE_NOTES.md @@ -2,100 +2,69 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [Cocos2d-x 3.16 Release Notes](#cocos2d-x-316-release-notes) -- [Misc Information](#misc-information) -- [v3.16](#v316) +- [Cocos2d-x 3.17 Release Notes](#cocos2d-x-317-release-notes) + - [Android requirements](#android-requirements) - [Highlights](#highlights) - - [Highlights in detail](#highlights-in-detail) - - [Better support [`creator_to_cocos2dx`][1]](#better-support-creator_to_cocos2dx1) - - [LayerRaidalGradient](#layerraidalgradient) - - [Lua app crashed on iOS simulator with Xcode 8.0+](#lua-app-crashed-on-ios-simulator-with-xcode-80) - - [Cocos Studio](#cocos-studio) - - [Improve compiling speed](#improve-compiling-speed) - - [Remove some platforms support](#remove-some-platforms-support) + - [added support for iPhone X](#added-support-for-iphone-x) + - [added support Android Studio 3.0+](#added-support-android-studio-30) + - [CMake is now supported on all platforms](#cmake-is-now-supported-on-all-platforms) + - [upgrade 3rd-party libraries](#upgrade-3rd-party-libraries) + - [remove outdated](#remove-outdated) + - [misc bugs fix and stability improvements](#misc-bugs-fix-and-stability-improvements) -# Cocos2d-x 3.16 Release Notes # +# Cocos2d-x 3.17 Release Notes # +The 3.17 release focuses on stability and increased performance with some under the hood enhancements that will make cross-platform development easier. -# Misc Information +## Android requirements -* [Full Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) - -# v3.16 - -Android tool version tested in this version: - -- Android Studio 2.3.3 -- NDK r14 +v3.17 has been tested using Android Studio (3.0, 3.1, 3.1.1) with NDK r16 ## Highlights -- better support [`creator_to_cocos2dx`][1] creator plugin -- add __LayerRadiaGradientLayer__ -- update to support Android Studio 2.3.3 -- fix the issue that lua projects will crash on iOS simulator with Xcode 8.0+ -- revert CocosStudio reader and flatbuffer -- fix compling error with iOS 11 -- use prebuit bullet to improve compiling speed -- remove supporting of Windows 10 metro, Windows Phones and Tizen -- update to Spine v3.5.35 and support skeleton batching in web engine - -## Highlights in detail - -### Better support [`creator_to_cocos2dx`][1] - -[`creator_to_cocos2dx`][1] is a [Cocos Creator][2] plugin that will export Scene information created by [Cocos Creator][2] for cocos2d-x C++/Lua projects. We mention it as __plugin__ following. - -With this plugin, you can use [Cocos Creator][2] as Scene editor for cocos2d-x. Curretly, the plugin supports [these features](3), and will continue to add more features. As you can see, RichText img tag support only works in cocos2d-x v3.16+ because of cocos2d-x's limitation. So cocos2d-x will continue to be improved to support more [Cocos Creator][2] features. - -More detail information and usage please refer to plugin's [the README][1]. You are appreciated if you can use it and give feedback. - -![][4] -__Scene effect in cocos creator__ - -![][5] -__Scene effect in cocos2d-x__ - -### LayerRaidalGradient +- added support for iPhone X +- added support Android Studio 3.0+ +- CMake is now supported on all platforms +- upgraded Spine runtime to v3.6.39 +- upgraded GLFW to 3.2.1 +- misc bugs fix and stability improvements -LayerRadialGradient is similar to LayerColor, but will only draw color in a circle. +### added support for iPhone X -![][6] +3.17 brings support for iPhone X including supporting full screen mode, using Storyboards for launch images, __safe area__ API and support for auto hiding the Home indicator. It is important to note exactly what and where the safe area is: -### Lua app crashed on iOS simulator with Xcode 8.0+ +

+ +

-After updating to Xcode 8.0+, lua projects will crash on iOS simulator. It is a bug of luagit. In this version, the bug it is fixed. You can just update [luajit][7] if you don't want to update cocos2d-x. +Developers can get the safe area easily by calling: `Director::getSafeAreaRect()`. -### Fix compiling error with iOS 11 +### added support Android Studio 3.0+ -Before cocos2d-x v3.16, `CCFileUtils` uses `system()` to remove a directory. iOS 11 remove `system`, so will cause compiling error with iOS 11. This version fixes this issue. The corresponding PR for this issue is [here](https://github.com/cocos2d/cocos2d-x/pull/17921), you can apply this PR to fix it if you don't want to upgrade to v3.16. +Android Studio is the only official IDE for Google's Android operating system. +Cocos2d-x supports Android Studio using NDK version r16 to r16. Gradle configurations have been updated, including simplifying Gradle PROP_* values, changing the deprecated `compile` to the new `implementation`in dependency declaration, and added Proguard configuration to reduce Release package size. -### Cocos Studio +### CMake is now supported on all platforms -coocs2d-x v3.15 updates flatbuffer, which breaks compatibility of Cocos Studio. In this version, we revert flatbuffer and Cocos Studio reader. +CMake is now supported on all platforms, including Android(NDK), iOS, macOS, Windows (VC++ compiler), Linux. Supports precompile libraries for engine, and reusing precompiled libraries in the new build process. Your projects build time will be greatly reduced. For detailed usage, please refer to [CMake Doc](https://github.com/cocos2d/cocos2d-x/blob/v3/cmake/README.md) -If you don't want to update cocos2d-x, you can replace flatbuffer and Cocos Studio reader shift in this version. +### upgrade 3rd-party libraries -### Improve compiling speed +Spine skeleton animation is widely used in games developed by Cocos2d-x. Spine runtime has been upgraded to 3.6.39 to keep current. -As bullet is not needed for most developers, so we use prebuilt bullet. It will speed up compiling speed, and we will continue to use more prebuilt 3rd party libraries, such as 3d particles, Box2D and so on to speed up compiling speed. +GLFW has been upgraded to 3.2.1 to help fix joystick issues. You can also now use GLFW as a precompiled library. -We also fix many warnings too in this version. As some warnings are imported by 3rd party libaries, so we can not treat warnings as error, but we will continue to achieve it. +Box2D hasn't been updated in quite some time. A new production version has yet to be released so far in 2018. We felt GitHub commit f655c603ba9d83 was stable. You can also now use Box2D as a precompiled library. -### Remove some platforms support +Each Cocos2d-x release comes with a specific version of third-party libraries. If you want to upgrade third-party libraries due to your projects needs, please refer to: [3rd-party Doc](https://github.com/cocos2d/cocos2d-x-3rd-party-libs-src/blob/v3/README.md) -As we are lack of human resources, so we remove some platforms. +### remove outdated -MS maintians Win10 related platform, but it doesn't continue to maintain it. So we remove it. Which means cocos2d-x based games can not run on Win10 metro mode and Windows Phones, but you can run it in Win32 mode. +Google officially deprecated ant build support starting in [Android SDK Tools 25.3.0](http://tools.android.com/recent/androidsdktoolsrevision2530feb2017). The old ant based `proj.android` and been dropped and now `proj.android` is an Android Studio project. The default architecture is changed from `armeabi` to `armeabi-v7a`. -Tizen platform is removed too because of huaman resources. +Visual Studio 2013 support has been dropped. Visual Studio 2015/2017 are still currently supported. The existing win32 project files is quite suitable for 2015. To use 2017, you can open a 2015 project file, modify the configuration to suit your needs, or use CMake (See above). +### misc bugs fix and stability improvements -[1]: https://github.com/cocos2d/creator_to_cocos2dx -[2]: http://cocos2d-x.org/creator -[3]: https://github.com/cocos2d/creator_to_cocos2dx#limitations -[4]: https://raw.githubusercontent.com/minggo/Pictures/master/creator-ui-effect.png -[5]: https://raw.githubusercontent.com/minggo/Pictures/master/cocos2dx-ui-effect.png -[6]: https://raw.githubusercontent.com/minggo/Pictures/master/layerradialgradient.png -[7]: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/tree/v3/lua/luajit/prebuilt/ios "luajit.a" +This release contains more than 51 bugs fixed and 33 misc improvements, please refer to [Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) diff --git a/docs/RELEASE_NOTES_CN.md b/docs/RELEASE_NOTES_CN.md index 00ad82407e58..e8cb6991cca5 100644 --- a/docs/RELEASE_NOTES_CN.md +++ b/docs/RELEASE_NOTES_CN.md @@ -2,102 +2,79 @@ **Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)* -- [Cocos2d-x 3.16 Release Notes](#cocos2d-x-316-release-notes) -- [改动列表](#%E6%94%B9%E5%8A%A8%E5%88%97%E8%A1%A8) -- [v3.16](#v316) - - [特性](#%E7%89%B9%E6%80%A7) - - [特性介绍](#%E7%89%B9%E6%80%A7%E4%BB%8B%E7%BB%8D) - - [更好地支持 [`creator_to_cocos2dx`][1]](#%E6%9B%B4%E5%A5%BD%E5%9C%B0%E6%94%AF%E6%8C%81-creator_to_cocos2dx1) - - [LayerRaidalGradient](#layerraidalgradient) - - [Lua工程在Xcode 8.0+模拟器崩溃问题](#lua%E5%B7%A5%E7%A8%8B%E5%9C%A8xcode-80%E6%A8%A1%E6%8B%9F%E5%99%A8%E5%B4%A9%E6%BA%83%E9%97%AE%E9%A2%98) - - [修复iOS 11编译错误](#%E4%BF%AE%E5%A4%8Dios-11%E7%BC%96%E8%AF%91%E9%94%99%E8%AF%AF) - - [Cocos Studio](#cocos-studio) - - [提高编译速度](#%E6%8F%90%E9%AB%98%E7%BC%96%E8%AF%91%E9%80%9F%E5%BA%A6) - - [去除支持一些平台](#%E5%8E%BB%E9%99%A4%E6%94%AF%E6%8C%81%E4%B8%80%E4%BA%9B%E5%B9%B3%E5%8F%B0) +- [Cocos2d-x 3.17 Release Notes](#cocos2d-x-317-release-notes) + - [测试环境](#%E6%B5%8B%E8%AF%95%E7%8E%AF%E5%A2%83) + - [版本特性](#%E7%89%88%E6%9C%AC%E7%89%B9%E6%80%A7) + - [详细介绍](#%E8%AF%A6%E7%BB%86%E4%BB%8B%E7%BB%8D) + - [支持 iPhone X](#%E6%94%AF%E6%8C%81-iphone-x) + - [支持 Android Studio 3.0+](#%E6%94%AF%E6%8C%81-android-studio-30) + - [CMake 支持全平台](#cmake-%E6%94%AF%E6%8C%81%E5%85%A8%E5%B9%B3%E5%8F%B0) + - [升级第三方库](#%E5%8D%87%E7%BA%A7%E7%AC%AC%E4%B8%89%E6%96%B9%E5%BA%93) + - [移除过时的内容](#%E7%A7%BB%E9%99%A4%E8%BF%87%E6%97%B6%E7%9A%84%E5%86%85%E5%AE%B9) + - [Bugs 修复,提高稳定性](#bugs-%E4%BF%AE%E5%A4%8D%E6%8F%90%E9%AB%98%E7%A8%B3%E5%AE%9A%E6%80%A7) -# Cocos2d-x 3.16 Release Notes # +# Cocos2d-x 3.17 Release Notes # -# 改动列表 +Cocos2d-x 3.17 版本着重于工具链的更新,和稳定性的增强。 -* [Full Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG) +## 测试环境 -# v3.16 + Android 平台使用 Android Studio (3.0, 3.1, 3.1.1) 和 NDK r16 进行测试。 -该版本使用如下的Android工具链进行测试: +## 版本特性 -- Android Studio 2.3.3 -- NDK r14 +- 支持 iPhone X +- 支持 Android Studio 3.0+ +- CMake 支持全平台,支持预编译引擎库 +- 升级 Spine runtime 至 v3.6.39 +- 升级 GLFW 至 3.2.1,并提供预编译库 +- 更新 Box2D,并提供预编译库 +- 去除 Android 的 ant 工程 +- 去除 Visual Studio 2013 的支持 -## 特性 +## 详细介绍 -- 更好地支持 [`creator_to_cocos2dx`][1] 这个Cocos Creator的插件 -- 新增 __LayerRadiaGradientLayer__ -- 支持 __Android Studio 2.3.3__ -- 修复lua工程在Xcode 8.0+模拟器崩溃问题 -- 回退CocosStudio的reader和flatbuffer -- 修复iOS 11编译错误 -- 使用bullet的预编译库以加快编译速度 -- 去除Windows 10 metor模式、Windows Phone和Tizen的支持 -- Web引擎更新Spine runtime到v3.5.35 +### 支持 iPhone X -## 特性介绍 +3.17 带来对 iPhone X 的支持,包含支持全屏模式,支持自动隐藏 Home 指示器,改用 Storyboard 作为启动屏幕,和增加获取 Safe Area 的接口。在开发支持 iPhone X 的应用时,最需要了解清楚的就是 Safe Area: -### 更好地支持 [`creator_to_cocos2dx`][1] +

+ +

-[`creator_to_cocos2dx`][1]是一个[Cocos Creator][2]的插件。该插件用于导出Creator创建的场景内容给cocos2d-x的C++/Lua工程使用。下文的 - __插件__ 就是指这个插件。 +开发者可以通过调用 `Director::getSafeAreaRect()` 来获取 Safe Area 区域。 -通过使用该插件,可以把[Cocos Creator][2]当成cocos2d-x的场景编辑器。该插件目前支持[这些特性](3),会持续支持其他新的特性。有些特性只在v3.16+版本支持,比如RichText img标签。 +### 支持 Android Studio 3.0+ -插件的详细使用方法可以参考插件仓库的[the READE][1],欢迎使用并给与反馈。 +Android Studio 是 Google 官方唯一支持的 Android 开发 IDE。 -![][4] -__Scene effect in cocos creator__ +该版本增加了对 Android Studio 3.0+ 的支持。在支持的过程中,同时将 NDK 版本从 r14 升级到 r16。对 Gradle 工程配置也进行了诸多改进,包括简化 Gradle 变量 PROP_*,将依赖声明中弃用的 `compile` 改为新的 `implementation`,增加用以削减 Release 包体积的 Proguard 文件。 -![][5] -__Scene effect in cocos2d-x__ +### CMake 支持全平台 -### LayerRaidalGradient +扩展 CMake 构建支持至全平台,包括 Android (NDK)、iOS、macOS、Linux、Windows(VC++ compiler)。支持将引擎部分进行预编译,并在新的构建过程中重用预编译的引擎库。通过使用预编译库,可以极大的缩短工程构建时间。 -LayerRadialGradien和LayerColor类似,它会在制定的圆里绘制颜色,效果如下: +详细的使用方法请参考 [CMake 文档](https://github.com/cocos2d/cocos2d-x/blob/v3/cmake/README.md) -![][6] +### 升级第三方库 -### Lua工程在Xcode 8.0+模拟器崩溃问题 +Spine 骨骼动画广泛用于 Cocos2d-x 开发的游戏,引擎跟进 Spine 的升级,升级 Runtime 至 3.6.39。 -v3.16版本之前,Lua工程在Xcode 8.0+模拟器会崩溃。这是luajit本身的一个bug,v3.16版本修复了这个问题。如果不想更新引擎,也可以直接更新[luajit][7]。 +升级 GLFW 至 3.2.1 以修复支持游戏手柄时存在的问题,同时提供 GLFW 预编译库。 -### 修复iOS 11编译错误 +社区希望引擎升级 Box2D,可 Box2D 的新版本迟迟未发布,根据反馈 GitHub 提交 f655c603ba9d83 是稳定的,升级 Box2D 至该提交,同时提供 Box2D 的预编译库。 -v3.16版本之前,`CCFileUtils`使用`system()`函数来删除目录。iOS 11删除了`system`,因此导致了编译错误。改版本修复了这个问题。对应的PR链接在[这里](https://github.com/cocos2d/cocos2d-x/pull/17921),如果不想更新引擎的话,可以参考该PR的改动合并以修复这个问题。 +每一次版本发布,都会附带特定版本的第三方预编译库,如果由于项目需要想对第三方库进行定制,请参考: [第三方库文档](https://github.com/cocos2d/cocos2d-x-3rd-party-libs-src/blob/v3/README.md) -### Cocos Studio +### 移除过时的内容 -v3.15更新了flatbuffer,破坏了Cocos Studio reader的兼容性。该版本回退了flatbuffer和Cocos Studio的reader。 +由于 Google 官方自 [Android SDK Tools 25.3.0](http://tools.android.com/recent/androidsdktoolsrevision2530feb2017) 就已放弃 ant 支持。移除旧有的 `proj.android` ant 工程,新的 `proj.android` 是 Android Studio 工程。[NDK r16](https://developer.android.com/ndk/guides/abis) 弃用了 armeabi,引擎调整默认的编译架构从 armeabi 为 armeabi-v7a。 -如果不想更新引擎的话,可以手动从改版本或者v3.15之前的版本拷贝flatbuffer和Cocos Studio的reader。 +在 win32 平台,越来越多的开发者已经使用 Visual Studio 2015/2017 进行开发,移除对年代久远的 2013 的支持。现存的工程配置适合于 2015 ,如果需要使用 2017,可打开现有的 sln 文件,调整配置,或使用 CMake。 -### 提高编译速度 +### Bugs 修复,提高稳定性 -大部分的项目不需要bullet,因此这个版本使用bullet的预编译库以加快编译速度。后续还会继续使用更多预编译库,比如Box2D,3D粒子系统等以加快编译速度。 +改版本包含 51 项 bugs 修复和 33 项小改进,不再列举,请参考 [Changelog](https://github.com/cocos2d/cocos2d-x/blob/v3/CHANGELOG)。 -该版本同时修复了大量的warning,后续版本也会持续修复warning。 - -### 去除支持一些平台 - -由于人力资源问题,改版本删除了一些平台的支持。 - -Windows 10的metro模式和Windows Phone平台一直是微软的员工在负责维护了,但是他们决定不再继续维护了,而我们人力资源不足,因此去除支持这两个平台。不过在Windows 10仍然可以使用Win32工程。 - -同样由于人力资源问题,该版本去除了Tizen平台的支持。 - - -[1]: https://github.com/cocos2d/creator_to_cocos2dx -[2]: http://cocos2d-x.org/creator -[3]: https://github.com/cocos2d/creator_to_cocos2dx#limitations -[4]: https://raw.githubusercontent.com/minggo/Pictures/master/creator-ui-effect.png -[5]: https://raw.githubusercontent.com/minggo/Pictures/master/cocos2dx-ui-effect.png -[6]: https://raw.githubusercontent.com/minggo/Pictures/master/layerradialgradient.png -[7]: https://github.com/cocos2d/cocos2d-x-3rd-party-libs-bin/tree/v3/lua/luajit/prebuilt/ios "luajit.a" diff --git a/templates/cocos2dx_files.json b/templates/cocos2dx_files.json index a8cc36eedd5f..04f2147b7f26 100644 --- a/templates/cocos2dx_files.json +++ b/templates/cocos2dx_files.json @@ -34,7 +34,7 @@ "cmake/Modules/FindWebP.cmake", "cmake/Modules/Findflatbuffers.cmake", "cmake/Modules/Findxxhash.cmake", - "cmake/Modules/iOSBundleInfo.plist.in", + "cmake/Modules/iOSBundleInfo.plist.in", "cmake/README.md", "cmake/ios.toolchain.cmake", "cocos/2d/CCAction.cpp",