Skip to content

Commit de7b5c3

Browse files
RhaylithPatriceJiangdrelaptopCocosRobotcrazyhappygame
authored
V3 (#1)
* [lua android] use luajit & template cmake update (cocos2d#19239) * [lua android] use luajit & template cmake update * update external to v150 * update external to 151 * fix small type error in ScriptingCore (cocos2d#19244) * [lua-tests] fix LuaJavaBridge crash on release mode (cocos2d#19248) * [external] update to v152 (cocos2d#19247) * [external] update to v152 * luaL_reg -> luaL_Reg * [lua tests]fix evalJs 'alert' frozen (cocos2d#19249) * update CHANGELOG (cocos2d#19250) * update CHANGELOG * fix typo * fix typo 2 * [lua-tests] use math.fmod & lua downloader binding clear stack (cocos2d#19255) * [lua] add lua_downloader comments, use luaL_register * chage math.mod to math.fmod * fix stack error * [lua] remove luaL_error, which kill process (cocos2d#19257) * [vs2017] upgrade 3rd party libs to support vs2017 in release mode (cocos2d#19259) * [uibutton] fix size init order (cocos2d#19260) * increase cmake stability , remove tests/CMakeLists.txt (cocos2d#19261) * Update changelog and release note (cocos2d#19264) * add ReleaseNotes * update versoin code (cocos2d#19265) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19267) * standardize pause & resume logic on GLSurfaceView (cocos2d#19256) * fix spritecache plist parsing issue (cocos2d#19269) * cmake win32 Precompiled header (cocos2d#19273) * Precompiled header * Fix * Precompiled header for cocos * Precompiled header jscocos2d * Ability to get low coupling inheritance (cocos2d#19276) It is necessary for flexible inheritance from the base class. * [3rd-libs] upgrade to version 154 (cocos2d#19282) * Install ninja (cocos2d#19298) * Install ninja * Fix android_cocos_new_test * update 3rd libs & console, fix file issues (cocos2d#19284) * trigger compile * update libs * update 3rd party libs version * Fix for COCOS2D_DEBUG is always 1 on Android (cocos2d#19291) Related cocos2d#19289 * revert ndk-build final target, others need it (cocos2d#19296) * Add clear request and responses method to httpclient (cocos2d#19294) * Added functionality to clear pending responses and requests in the http client * Responses and Requests now are processed in similar way * Fix for clearing the http requests * Added tests for HttpClient::clearResponseAndRequestQueue * ReFix bug: PremultipliedAlpha is not working for png (cocos2d#19138) * Ui video player new style looping input options (cocos2d#19297) * Implemented looping and disable user input for uiVideoPlayer * Fixes on how to handle sub states * Added UI Video Player Demo for Loop, style and user input enabled options * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19320) * cmake support set iOS Deployment Target for root project (cocos2d#19315) * support set ios deployment target for root project * update gitignore * refine cmake, add iOS sign config (cocos2d#19327) * refine cmake, add ios sign config * switch the interface orientations order at info.plist * refine cmake, allow developer switch Debug/Release in IDE (cocos2d#19329) * refine cmake, support multi configuration when generate Xcode/VS * docs update * cmake, update multi config condition * remove custom target property: CC_DEPEND_DLLS * cmake, adapt res copy to multi config types * move "APP_RES_DIR" up, and improve setup_cocos_app_config * move repeat comments into docs * notify user the copy file process * target_link_options isn't supported until cmake 3.13 * cmake readme update * Add Android P cutout area support (cocos2d#19286) * Add Android P cutout area support Related cocos2d#19285 * coding style fix * Update AppActivity.java Fix android build * suppress lint new api errors * update change log, "allow cleartext HTTP traffic" don't include template * Adds Configuration::getInfoAsMap() (cocos2d#19381) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19390) * Checking, does the touch is within the height of the line, not the height of the sprite? (cocos2d#19394) * If path to file is tool long crash is possible. (cocos2d#19383) * If path to file is tool long crash is possible. If path to file is tool long crash is possible, because of chart buffer overflow. * Incorrect replacement. Using iterator is better. * Style fix * Correct naming * Font atlas texture initialization delayed (cocos2d#19384) If you will try to create CCLabel with True Type font, enabling it's outline and change it's font size with separate commands you will create multiple textures for font atlases, one for label second for label with outline, and third for label with another font size. Moving texture initialization from constructor and calling it later, right before usage will cause large memory economy, because even if atlases will be created they won't create textures of allocate memory for current page data. * fix header path include style (cocos2d#19395) * Fix memory leak if invoking Texture2D::setAlphaTexture many times. (cocos2d#19400) * need to generate binding codes for all targets (cocos2d#19424) * need to generate binding codes for all targets * all targets depend on ndk, for gen bindings * fix lack python module * remove unneeded codes (cocos2d#19421) * remove unneeded codes * remove winrt and win8.1 * fix compiling error on android * refine travis, don't generate binding codes for cpp only target (cocos2d#19430) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19431) * Lua: add manual bindings for EventDispatcher::addCustomEventListener (cocos2d#19405) * Lua: add manual bindings for EventDispatcher::addCustomEventListener * Lua: Testcase for EventDispatcher::addCustomEventListener * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19439) * fix the member parameter:_percent is always be 0 during the update process. (cocos2d#19419) * Method to check if any IME dispatcher is active. (cocos2d#19451) Useful feature to know if any text field or custom IME dispatcher is active * [Android] fix FileUtils::listFiles with path 'assets/' (cocos2d#19457) * Getting current clearing color in Renderer Will be useful. * Tabs to spaces * Tabs to spaces * Methods of changing clearing color * Getting clearing color from Director interface * Ability to change title position * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically * Only send the ON_PERCENTAGE_CHANGED if and only if the percentage value has actually changed. * Only send the ON_PERCENTAGE_CHANGED if and only if the percentage value has actually changed. (cocos2d#19556) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19563) * [windows] use PostMessage to replace SendMessage (cocos2d#19569) * revert threads (cocos2d#19572) * Update CCArmature.cpp (cocos2d#19579) There is an unmatched ");" in the file at line 720. * use CC_SAFE_DELETE_ARRAY instead of CC_SAFE_DELETE (cocos2d#19580) * Fix bug: can't play video in obbfile. (cocos2d#19476) * Fix bug: can't play video in obbfile. * Change check order. * fix base/CMakeLists.txt (cocos2d#19575) * fix static token array in headfile (cocos2d#19164) The token array shouldn't be static in CCPUScriptTranslator.h, otherwise including it will generate duplicate token array. * End the NS_CC properly. (cocos2d#19603) * Update UIDeprecated.cpp There is no need of this last "}". * End the NS_CC properly. Change the "}" with NS_CC_END to avoid misunderstandings. * add build test option for cmake (cocos2d#19608) * add build test option for cmake * configure build test option for cmake * Optimize calls to std::string::find() and friends when the needle passed is a single character string literal. The character literal overload is more efficient. (cocos2d#19614) * fix outdated documentation [ci skip] (cocos2d#19618) * prefer delegate constructor over new(this) (cocos2d#19613) * rewrite parseIntegerList with better performance (cocos2d#19619) * update binding generator (cocos2d#19625) * move parseIntegerList to a free function in ccUtils, add few testcases (cocos2d#19634) * remove redundant user-defined copy constructor and destructor, (cocos2d#19636) as compiler auto-generated ones are working fine. * Changed shader data types mediump to highp to remove possible sprite joggling on some Android phones. (cocos2d#19633) * Optimize cases where loop variable is unecessarily copied in a range-for loop. (cocos2d#19637) Pass by const reference when appropriate. * Make precheader files PRIVATE, otherwise they leak to the game project (e.g. precheader.cpp visible in MyGame's Visual Studio project). * add optimization for OPPO. (cocos2d#19631) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19644) * add clang-tidy support (cocos2d#19643) * add clang-tidy support * move clang_tidy_test up in travis yaml file so that it's run first * use dump-config to generate .clang-tidy file * use flexible way to find run-clang-tidy.py clang-tidy and run-clang-tidy.py shares common ancester directory. find the script dynamically rather than hard-coding it. * place clang-tidy check options in separate lines * clang_tidy_test target clean up * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19648) * fix FastTMXLayer with anchor point * fix FastTMXLayer does not reflect Opacity * fix Sprite update_blend_func (cocos2d#19649) * minor refactoring of AudioEngine * emplace_back accept constructor args directly * use reserve * remove superfluous null pointer check * add null pointer check * The scene stack should be cleared in a LIFO manner, which allows for releasing the allocated resources in the correct order, being last in, first out, as is the purpose of the stack. * Gradle.5.1.1 (cocos2d#19657) * gradle-5.1.1 * update bindings-generator * classpath 'com.android.tools.build:gradle:3.4.0' * enable more clang-tidy performance options (cocos2d#19656) * enable more clang-tidy performance options * fix warning: performance-type-promotion-in-math-fn prefer c++ math functions, as it handles float and double case correctly. For example, std::sin has overload for both float and double, but sin only has double argument. C++ math functions avoids unnecessary floating point type conversions. * add missing cmath headers * change log to std::log * fix concave polygon bug in DrawNode (cocos2d#19641) * add concave polygon support to DrawNode * change to cocos2d-x coding style * add the url of the code comes from * move test code to a seperate class * add new clang-tidy option (cocos2d#19670) * add new clang-tidy option * readability-container-size-empty * minor fix for UnitTest * clang-tidy: filter external directory * add comment on python regular expression [ci skip] * add new clang-tidy option (cocos2d#19682) * add new clang-tidy option * readability-delete-null-pointer * more fix for readability-delete-null-pointer * modify fdGetter (cocos2d#19671) * modify fdGetter * Check whether a music file is in the OBB file * fix twice copy lua scripts error (cocos2d#19687) * FIX ios bug : You don’t have permission to save the file “Documents_temp” The iOS side, eg:Writable directory is "**/Documents/",old code will get "**/Documents_temp/", However, due to the sandbox mechanism of iOS, you do not have the permission of this directory, so instead fixed it to "**/Documents/_temp/" * fix toupper function call * Original pointer cast does nothing, as it doesn't change signature * toupper arugment type should be unsigned char Reference: https://en.cppreference.com/w/cpp/string/byte/toupper * setPercent after initialization (cocos2d#19689) * refactor CCIMEDispatcher (cocos2d#19688) * remove superfluous destructor * use range-based for loop * correct some documentation * add new clang-tidy option (cocos2d#19698) * readability-redundant-control-flow * Fix APK not have assets folder (cocos2d#19679) * Fix APK not have assets folder * Android project: copy all res to assets folder * remove duplicate function call in cmake (cocos2d#19697) * AssureOutOfSourceBuilds() is called in module file. No need to call it in root cmake file. * fix for cocos2d#19713 (cocos2d#19714) cocos2d#19713 * add missing header * fix string append (cocos2d#19717) * add new clang-tidy option (cocos2d#19699) * readability-redundant-string-cstr * use string::append change name * fix assign nullptr to std::string (cocos2d#19615) * Support new Mali GPUs (cocos2d#19411) * Support new Mali GPUs Some new Mali GPUs use FP16 for matrix that is not precise enough. Should be FP32. Tested on Mali-T880. The same issue is described here: https://discuss.cocos2d-x.org/t/critical-issue-regarding-rendering-on-devices-with-renderer-type-mali/45568 * More convenient way to fix the shader precision. * [Change] the CC_64BITS macro to 64-bit decision. (cocos2d#19723) * fix wrong buffer type (cocos2d#19724) * new clang-tidy option: readability-string-compare (cocos2d#19742) * [Android] gradle copy resources to assets folder before `preDebug|ReleaseBuild` (cocos2d#19732) * fix get environment * update gradle.scripts * fix error * remove extract modifications * remove redundant semicolon (cocos2d#19743) * render state of technique shuold be saved in technique (cocos2d#19725) * fix (cocos2d#19749) * add clang-tidy-bugprone options (cocos2d#19750) * add clang-tidy-bugprone options * bugprone-argument-comment * bugprone-bool-pointer-implicit-conversion * bugprone-dangling-handle * bugprone-fold-init-type * bugprone-forward-declaration-namespace * enable more clang-tidy bugprone options * bugprone-forwarding-reference-overload * bugprone-inaccurate-erase, * bugprone-incorrect-roundings, * Merge 3.17.2 (cocos2d#19755) * modify engine version (cocos2d#19677) * protect empty string (cocos2d#19680) * fix twice copy lua scripts error (cocos2d#19687) (cocos2d#19691) * rename Java_org_cocos2dx_lib_Cocos2dxLuaJavaBridge.* to Cocos2dxLuaJavaBridge.* (cocos2d#19694) * fix get environment (cocos2d#19690) * update release note and change log (cocos2d#19711) * [js-tests/cpp-tests] iOS: add fonts to Info.plist (cocos2d#19708) * add fonts to Info.plist * use tabs instead of spaces * fix lua-tests * Update CHANGELOG * setPercent after initialization (cocos2d#19718) * remove void arg in func delcaration and reformat (cocos2d#19758) f(void) is same as f() in C++ (but not in C), hence removing void. And reformat the code around f(void) a bit. * refactor CCBundle3DData (cocos2d#19756) * remove superfluous constructor and non-virtual destructor destructor should be trivial if it doesn't manage resource. A vector member clears itself automatically. No need to call `clear` in destructor. * refactor CCScene (cocos2d#19767) * refactor-CCScene prefer in-class initialization * in-class initialization of pointer to nullptr * Added support for saving images with non-premultiplied alpha (cocos2d#19782) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19796) * skip shapes of 0 area in processTriangles (cocos2d#19791) * [Android]Override removeDirectory function in FileUtilsAndroid, fix "rm not found" error on OPPO ColorOS (cocos2d#19790) * Override removeDirectory function in FileUtilsAndroid,use JRE method instead of "rm -r path". Because We found that on OPPO's ColorOS, the environment variable PATH may not always correct, it could be ":/sbin" sometimes, then cause an error "rm not found", afterwards the directory could not be deleted。 * omitted variable while call removeDirectoryJNI * rename RemoveDirectory->renameDirectory obey the coding rule * rename childFile to childrenFile * more clang-tidy perf options (cocos2d#19783) * performance-move-constructor-init * performance-unnecessary-copy-initialization Disable warnings on RefPtr refcount test case. * fix return value in EditBoxImpl-linux (cocos2d#19798) also remove some redundant semicolon * refactor use const reference * android_allowBackup2 * update log_ref (cocos2d#19840) * update travis ci configuration (cocos2d#19841) * install g++6.0 in travis (cocos2d#19842) * refactor AudioEngine-Linux (cocos2d#19822) * refactor AudioEngine and AudioEngine-linux * map::erase() can handle case if key doesn't exist. * use map::iterator when it has already obtained. * mapChannelInfo[id].channel is nullptr befor resume(). Don't dereference it. * FMOD::System::release() calls close, so calling close before release is not necessary. * use std::map::insert properly. * remove unnecessary null check on _audioEngineImpl * add comment on nullptr dereference * refactor CCGeometry (cocos2d#19847) * remove redundant copy constructor and copy assignment operator * use delegate constructor to simply code * fix a documentation error * fix memory leak in CCUserDefault (cocos2d#19853) fastSet makes the Data object managing a new memory area in [bytes, bytes + size), but it doesn't releasing the old data it managed. Failure to release the old data causes memory leak. The default constructed Data manages null memory, so calling fastSet on it is fine. Because `Data ret = defaultValue;` malloc new memory, we might have better performance without it. * update oppo sdk. (cocos2d#19864) * update to 3.17.2 (cocos2d#19869) just in case developer clones repo and then uses version as a conditional..... * Speed up post build step by disabling unnecessary cmake command (cocos2d#19873) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Disabled unnecessary console output from CMake for each and every resource file being copied, which was slowing down builds when there is a large amount of resource names to print out. Simply having "copying resources..." before the process begins is sufficient. The disabled code was just commented out, so can be re-enabled for debugging purposes if required. * [JSB] Some fixes for cc.DrawNode: (cocos2d#19889) - It was using the same _drawColor field for all instances - drawSegment() was not checking the optional parameters the way web does, which led to different outcomes * clang-tidy: performance-unnecessary-value-param (cocos2d#19870) * clang-tidy: performance-unnecessary-value-param * Reference: https://releases.llvm.org/7.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/performance-unnecessary-value-param.html * perfer pass by const reference If a object is passed by value and moved to new value. Prefer passing it by reference and copy it, if allowed. * Add the ability to set global Z order of physics debug draw node (cocos2d#19885) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Added the ability to set the global Z order of the debug node, since it may not be visible if utilizing global Z in objects within a scene. * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19895) * fix Wformat warnings (cocos2d#19893) * add setOptimise function for c++ (cocos2d#19882) * refactor ObjectFactory (cocos2d#19902) * remove redundant copy constructor, copy assignment operator, and destructor in TInfo. * prefer in-class member initialization. * default construct std::function, and use `default` * fix overload resolution * return early in multiple conditionals * remove unimplemented removeAll() * remove typedef that's only used in one place and in private scope * clang tidy modernize redundant void arg (cocos2d#19900) * add new clang-tidy option above * fix warnings from performance-unnecessary-value-param Reference: https://releases.llvm.org/7.0.0/tools/clang/tools/extra/docs/clang-tidy/checks/modernize-redundant-void-arg.html * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#19920) * fix ZipUtils memory-malloc succ check error. (cocos2d#19923) * fix lua arg check error. (cocos2d#19924) * Fix cocos2d-js issue: Font height was not getting calculated properly in iOS. (cocos2d#19926) * disable clang-tidy checks on script bindings code (cocos2d#19928) * Fix divide by zero in ui::Slider (cocos2d#19957) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * [UISlider.cpp] Divide by 0 error if _maxPercent is equal to 0, which is an allowed value. * Small performance boost in using Mat4::operator*= instead of operator* (cocos2d#19960) This avoids creating a new temporary Mat4 transform in operator* https://github.com/cocos2d/cocos2d-x/blob/v3/cocos/math/Mat4.inl#L60 * fix android crash in special http request header (cocos2d#19899) only crash clang + c++_static * clang-tidy clang-tidy-modernize-use-emplace (cocos2d#19955) * clang-tidy clang-tidy-modernize-use-emplace * Reference: https://clang.llvm.org/extra/clang-tidy/checks/modernize-use-emplace.html * use vector.reserve * remove app from recent apps when exit (cocos2d#19961) * Update 3rd party lib references (cocos2d#19959) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Update to v3-deps-159 * refactor-CCDrawNode (cocos2d#19969) * remove unecessary intermediate temp variables * remove redundant pointer cast * remove redundant memset, as the values are assigned immediately in a for loop. * minor formatting * Revert "Small performance boost in using Mat4::operator*= instead of operator* (cocos2d#19960)" (cocos2d#19975) This reverts commit a242a79. * refactor CCDrawNode: part2 (cocos2d#19972) This commit deletes all v2xx static free functions. All these changes are contained within the file. * replace v2fzero with Vec2::ZERO * remove __v2f, as it does nothing * rename __t to v2ToTex2F to reflect what the function does * remove the rest of functions, as Vec2 already includes them as member functions * upgrade glfw to 3.3 (cocos2d#19971) * Support interface only libraries (cocos2d#19855) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Added support for interface-only libraries being linked to application via target_link_libraries. Certain library properties cannot be accessed if it is an interface only library, so we need to check if they are valid library types before accessing those properties. * Fixed formatting. * remove MainMenu.xib file. (cocos2d#19968) * remove MainMenu.xib file. * fix compile error * don't invoke super.onPause() to prevent egl context lost (cocos2d#19996) * fix v3 travis compiling error (cocos2d#20002) * in Node::enumerateChildren, searchFromParent shouldn't search from children (cocos2d#20007) * searchFromParent shouldn't search from grand children * fix RotateTo animation when angle is bigger than 360 (cocos2d#20009) * fix crash when plist filename hasn't suffix (cocos2d#19999) * [v3] add renderer performance test (cocos2d#20010) * refactor Quaternion class (cocos2d#20031) * remove redundant copy constructor and destructor * Fixing a bug in Node::enumerateChildren (cocos2d#20045) This patch fixes an issue that if both // (recursive enumeration) and .. (starting from parent node) are specified, Node::enumerateChildren does not honor the latter and starts searching from current node rather than parent node. * update deps (cocos2d#20051) * fix FastTMXLayer (cocos2d#20066) * update external (cocos2d#20068) * [bugfix] v3 Fileutils iOS isDirectory (cocos2d#20080) * use AVPlayerController instead (cocos2d#20085) * Ios webview (cocos2d#20098) * Use external-deps-163 (cocos2d#20114) * fix memory leak (cocos2d#20110) * uses the same precision for uniforms (cocos2d#20107) * fix bug that system font is not rendered correctly on macOS Catalina (cocos2d#20124) * Fix error with update line height (cocos2d#19914) After movig font atlas `reinit()` (cocos2d#19384) there was indused a problem: the first display of text with a outline in the label does not update line height. This is because the atlas `reinit()` does not occur when the outline is activated. In this case, a new atlas will be created, but the line height will not be taken from it, because line height calculate in `updateContent()`. I propose line height calculating to return to the font atlas constructor. * Fix include order for Win32. * Remove tinyxml2 from CCSaxParser implement. (cocos2d#20141) * Fix RenderTexture PMA setting (cocos2d#20143) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Corrects the PMA setting on the internal Texture2D instance created by RenderTexture. * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20148) * set software mode will slow down performance (cocos2d#20152) * Sprite and RenderTexture blending mode set based off texture premultiplied alpha setting (cocos2d#20154) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * [CCSprite.cpp] Sprite:initWithTexture() should set the blend mode depending on the texture premultiplied alpha setting. [CCRenderTexture.cpp] Sprite::setOpacityModifyRGB() is set based on the premultiplied alpha setting. * Fix for incorrect _opacityModifyRGB on non-PMA. * [CCSprite.cpp] Removed redundant code related to blending mode and opacityModifyRGB when creating a sprite with a texture. * Make luabindings framework compat with lua52 & lua53. (cocos2d#20157) * Make luabindings framework compat with lua52 & lua53. * Remove link from static lib, let user can choose which lua version hi want. * Add lua51.lib dependencies for win32. * [v3] update submodule cocos2d-console (cocos2d#20132) * [v3] update submodule cocos2d-console recompile luajit-mac with -DLUAJIT_ENABLE_GC64 * update ref * Rename cocos2d::MessageBox to cocos2d::ccMessageBox. (cocos2d#20159) * Rename cocos2d::MessageBox to cocos2d::ccMessageBox to avoid confilicit with win32 API macro 'MessageBox'. * Sync non-win32 platforms. * fix OpenGL ERROR 0x0502 cannot delete VAO 0 (cocos2d#20178) * Upgrade minizip to 1.2.0 (cocos2d#20158) * Added JS stack trace (cocos2d#20168) * Update ZipUtils.cpp (cocos2d#20192) * Update deps to 167 (cocos2d#20194) * fix text wrong warp issue (cocos2d#20225) * fix issue: TextField can not receive characters(non number or english… (cocos2d#20209) * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20231) * PostMessage to SendMessage (cocos2d#20199) * fix issue that can not receive Chinese characters with system input m… (cocos2d#20232) * update bullet (cocos2d#20240) * add missing function (cocos2d#20250) * Revert "fix RotateTo animation when angle is bigger than 360 (cocos2d#20009)" (cocos2d#20256) This reverts commit c840544. * update Node::getTag comment (cocos2d#20255) this fixes a typo where getTag should suggest to use getName, like setTag and removeChildrenByTag does. * add default CFBundleShortVersionString value to info.plist * Unify the effect of printing multiline logs. Now all platforms will have the same lines. * Fixes so that in the web view we are able to navigate different links correctly <Deep> (cocos2d#20266) * remove extern "C" from base/base64.h for avoiding base64 function symbols conflict at linking libraries. (cocos2d#20276) * fix lua header path including error (cocos2d#20277) * fix lua header path error Include both lua header file and luajit header file may cause problem. * fix textfield issues (cocos2d#20294) * don't set glview transparent, it many cause afterimage (cocos2d#20298) * Allow game code to override BM Font parsing and support rotated font atlas textures (cocos2d#20300) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * [CCFontFNT.cpp/.h] Allow game to override FNT file parsing for extended formats. [CCFontAtlas] Added flag to indicated if a texture is rotated in FontLetterDefinition. This will allow for embedding a font atlas image inside a larger image atlas that supports rotation. [CCLabel.cpp] Ensure that the rotated flag in the font letter definition is used when creating a sprite for the letter. * [CCFontFNT.h] Fixed missing include statements. * Recompile luajit (cocos2d#20306) * Recompile luajit upgrade luajit in mac & ios * target_link_options is not supported until 3.13 * update external * update exteral, luajit -fPIC * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20312) * [iOS]Screen Time would makes App stuck sometimes (cocos2d#20313) * Screen Time would prevent UIApplicationDidBecomeActiveNotification and UIApplicationWillResignActiveNotification from being fired until reboot the iPad. * code format fix * fixed broken links, removed outdated links. (cocos2d#20318) fixed broken links, removed outdated links. * Cmake mult config (cocos2d#20317) * MINSIZEREL_RELWITHDEBINFO_Support * Remove DEBUG_MODE * Fix clang-tidy * Improve bmfont api (cocos2d#20309) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * Added support for adding bitmap font atlas image sub-textures in a larger image atlas. Also supports sub-texture rotation (90 degrees to the right, which is the default of the PLIST atlas format). * [LabelTest.cpp] Updated BMFontOneAtlas test to support new BMFont label API * [CCFontFNT.cpp] Added missing include statement. * Updated LUA and JS bindings for the new BMFont code. [CCLabelBMFont] This deprecated class required some modifications to work with the manual LUA bindings. * [CCLabelBMFont] Reverted the API to the original interface since this class is deprecated. Updated JS bindings. * [LabelTest/LabelTest.cpp] Reverted usage of deprecated API. * Re-added old API for creating bitmap font labels, but prefixed them as deprecated, in order to keep backwards compatibility. * Fix for incorrect usage of variable that may be null. * Added two new label tests for BM Font labels. One tests a shared atlas with no rotated textures, and the other uses a PLIST atlas with rotated textures. Added resources for these tests. * Moved variable definitions outside of loop. * [ci skip][AUTO]: updating luabinding & jsbinding & cocos_file.json automatically (cocos2d#20325) * fix issues of textfield (cocos2d#20303) * fix infinite loop * fix issue that touch event does not match If click area ouside keyboard, then engine only receive touch begin event witouth touch end or touch cancled event. * Fixing a crash in iOS 9.3.5 when we have a layer with WebView getting deallocated (cocos2d#20285) * In case of iOS 9.3.5 when we show a web view and deallocate the layer it is trying to release memory associated with WKWebView instance, but it hadn’t retained it in the first place. This results in a crash. This commit fixes that crash. * Removing the autorelease and retain parts from the WKWebView instantiation. * Changes so that we can remove the retain from the property declaration and depend only on manual retain and release of memory <Deep> * fix videoplayer crash in release mode (cocos2d#20327) (cocos2d#20330) * [v3] fix asan reported errors (cocos2d#20335) * manually maintain reference count (cocos2d#20329) (cocos2d#20337) * fix issue that can not close keyboard if using EditBox on iOS (cocos2d#20336) * close keyboard when Done is pressed (cocos2d#20341) * close keyboard when Done is pressed * Added tmx animated tile support, with test case. (cocos2d#20315) * Added tmx animated tile support, with test case. Tile animation are disabled by default, if user didn't enable it, the TMXTiledMap class will do just the same as this support not exists, no additional render resources needed. The tile animations are still rendered through SpriteBatchNode, no additional draw call needed. * changed tileset tococos own's * used cocos2dx own's tileset * changed return type of TMXLayer::getAnimTileCoord to pointer for lua api converting * deleted useless code, improved api * re-generated script binding * added CC_DLL to new classes, solved some problem posted on pull request * changed return type of getTasks to pointer * made TileAnimTask inherit form Ref * removed a fixed FIXME * added const to getTasks, deleted unneeded empty lines, re-generated script bindings * deleted empty lines in TMXXMLParser * Fix ui::Layout scissor clipping (cocos2d#20352) * Added RenderTexture::saveToFileAsNonPMA() to save images without PMA. Set the PMA parameter to true when calling initWithRawData() inside RenderTexture::newImage(), since textures are PMA. Renamed Image::premultipliedAlpha() to Image::premultiplyAlpha() to better reflect it's action, and made it public. Added Image::reversePremultipliedAlpha() to allow the reversing of the PMA. Updated CCImage-ios.mm to set the correct bitmapInfo for PMA and non-PMA images before saving a file. Updated RenderTextureTest::RenderTextureSave() to cater for non-PMA file saving. * [CCImage-ios.mm] Fixed indentation. * [UILayout.cpp] Fix for incorrect SCISSOR clipping rectangle calculation. [UILayoutTest.cpp] Test added to reproduce issue with SCISSOR clipping. * Get reference to clipping rectangle instead of a copy. * UIVideoPlayer-ios.mm regression fix. (cocos2d#20368) [UIVideoViewWrapperIos clean] shouldn't reset _videoPlayer pointer, since it is called in setUrl method and leaves instance in invalid state. Subsequent calls to play, pause, etc. end up with crash. * Fix visual studio console output (cocos2d#20357) * Fix to properly delete easingParams array (cocos2d#20374) * Fix isVariable method buffer overflow. (cocos2d#20376) Co-authored-by: Arnold <[email protected]> Co-authored-by: leda <[email protected]> Co-authored-by: CocosRobot <[email protected]> Co-authored-by: CHP <[email protected]> Co-authored-by: gestern <[email protected]> Co-authored-by: Andrew V. Belousoff <[email protected]> Co-authored-by: Benjamin Prieto <[email protected]> Co-authored-by: chongchaoyu <[email protected]> Co-authored-by: kasandko <[email protected]> Co-authored-by: sbrednikhin <[email protected]> Co-authored-by: minggo <[email protected]> Co-authored-by: James Chen <[email protected]> Co-authored-by: Jimmy Yin <[email protected]> Co-authored-by: Eric.Ding <[email protected]> Co-authored-by: RH <[email protected]> Co-authored-by: larisand <[email protected]> Co-authored-by: HALX99 <[email protected]> Co-authored-by: Xrysnow <[email protected]> Co-authored-by: Xiang.Lin <[email protected]> Co-authored-by: deflinhec <[email protected]> Co-authored-by: John <[email protected]> Co-authored-by: Ryan B <[email protected]> Co-authored-by: Ali Kämäräinen <[email protected]> Co-authored-by: kenshin <[email protected]> Co-authored-by: kacky <[email protected]> Co-authored-by: ShadowJobs <[email protected]> Co-authored-by: Alexander Huang <[email protected]> Co-authored-by: yang1500313979 <[email protected]> Co-authored-by: Pinchuk Aleksei <[email protected]> Co-authored-by: AIGRIND <[email protected]> Co-authored-by: WangHe <[email protected]> Co-authored-by: Slack-Moehrle <[email protected]> Co-authored-by: Ricardo Petrére <[email protected]> Co-authored-by: ggggamer <[email protected]> Co-authored-by: vaibhavgohel <[email protected]> Co-authored-by: TankorSmash <[email protected]> Co-authored-by: zoxin <[email protected]> Co-authored-by: coulsonwang <[email protected]> Co-authored-by: dzj0821 <[email protected]> Co-authored-by: Nhan Khong <[email protected]> Co-authored-by: Vyshnav S Deepak <[email protected]> Co-authored-by: dodo <[email protected]> Co-authored-by: Deep Shah <[email protected]> Co-authored-by: Naruto TAKAHASHI <[email protected]> Co-authored-by: DEAGS3000 <[email protected]> Co-authored-by: dave-ori <[email protected]> Co-authored-by: Saber Haj Rabiee <[email protected]>
1 parent c8c5fc7 commit de7b5c3

File tree

2,315 files changed

+20142
-36555
lines changed

Some content is hidden

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

2,315 files changed

+20142
-36555
lines changed

Diff for: .appveyor.yml

+3-2
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ environment:
88
PYTHON_VERSION: "2.7.13"
99
PYTHON_ARCH: "32"
1010
matrix:
11-
- build_type: windows32_cocos_new_test
12-
- build_type: windows32
11+
- build_type: windows32_cmake_test
12+
- build_type: windows32_sln_test
1313
- build_type: android_cpp_tests
14+
- build_type: android_lua_tests
1415
# - build_type: android_cocos_new_test
1516
# - build_type: android_cpp_empty_test
1617
# - build_type: android_gen_libs

Diff for: .clang-tidy

+33
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
Checks: >
3+
-*,
4+
performance-faster-string-find,
5+
performance-for-range-copy,
6+
performance-implicit-conversion-in-loop,
7+
performance-inefficient-algorithm,
8+
performance-inefficient-vector-operation,
9+
performance-move-const-arg,
10+
performance-move-constructor-init,
11+
performance-type-promotion-in-math-fn,
12+
performance-unnecessary-copy-initialization,
13+
performance-unnecessary-value-param,
14+
readability-container-size-empty,
15+
readability-delete-null-pointer,
16+
readability-redundant-control-flow,
17+
readability-redundant-string-cstr,
18+
readability-string-compare,
19+
bugprone-argument-comment,
20+
bugprone-bool-pointer-implicit-conversion,
21+
bugprone-dangling-handle,
22+
bugprone-fold-init-type,
23+
bugprone-forward-declaration-namespace,
24+
bugprone-forwarding-reference-overload,
25+
bugprone-inaccurate-erase,
26+
bugprone-incorrect-roundings,
27+
modernize-redundant-void-arg,
28+
modernize-use-emplace,
29+
30+
WarningsAsErrors: '*'
31+
HeaderFilterRegex: '/(?!external)/.*'
32+
AnalyzeTemporaryDtors: false
33+
FormatStyle: none

Diff for: .gitignore

+17
Original file line numberDiff line numberDiff line change
@@ -166,3 +166,20 @@ tests/lua-tests/project/proj.tizen/res/
166166
*-build/
167167
# Ignore the CLion build folder, such as cmake-build-debug
168168
cmake-build-*/
169+
.vs
170+
cmake_build*
171+
172+
# tmp android build files
173+
cocos/platform/android/libcocos2dx/.project
174+
tests/lua-tests/project/proj.android/.project
175+
tests/lua-tests/project/proj.android/app/.project
176+
tests/*/proj.android/.settings/org.eclipse.buildship.core.prefs
177+
tests/*/project/proj.android/.settings/org.eclipse.buildship.core.prefs
178+
179+
# tmp folder for temp usage
180+
tmp/
181+
temp/
182+
183+
# external libs zip
184+
*.zip
185+
**/simulator/

Diff for: .travis.yml

+61-11
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ matrix:
22
include:
33
# linux
44
- os: linux
5+
dist: xenial
56
env:
67
- BUILD_TARGET=linux
78
- GEN_BINDING_AND_COCOSFILE=true
@@ -10,46 +11,92 @@ matrix:
1011
- secure: M5lyDs0qai15mWHzJdkh0WPfVJJmVZu6SWtYULxatukGPXVwoQvmEtYAwAW+iz6aM+tXksQ/mk6nW5L8UFbHm+n6yrsa5bZU9sGXjilPE8p8bLFYDmIbPRazU+E6pBP3J2CDoAm0XnWkiYQ8feTxKTo6ysLnHAEjyaHTw0+Q1GM=
1112
sudo: required
1213
language: cpp
14+
# clang-tidy
15+
- os: linux
16+
dist: xenial
17+
env: BUILD_TARGET=linux_clang_tidy
18+
language: cpp
19+
sudo: required
1320
# mac_cmake
1421
- os: osx
1522
env: BUILD_TARGET=mac_cmake
1623
language: cpp
17-
osx_image: xcode8.3
24+
osx_image: xcode9.3
1825
sudo: required
1926
# iOS_cmake
2027
- os: osx
2128
env: BUILD_TARGET=ios_cmake
2229
language: cpp
23-
osx_image: xcode8.3
30+
osx_image: xcode9.3
31+
sudo: required
32+
# android ndk-build
33+
- os: linux
34+
dist: xenial
35+
env: BUILD_TARGET=android_cpp_ndk-build
36+
language: android
2437
sudo: required
25-
# android
38+
# android_lua ndk-build
2639
- os: linux
27-
env: BUILD_TARGET=android
40+
dist: xenial
41+
env: BUILD_TARGET=android_lua_ndk-build
2842
language: android
2943
sudo: required
30-
# android_lua
44+
addons:
45+
apt:
46+
sources:
47+
- ubuntu-toolchain-r-test
48+
packages:
49+
- g++-6
50+
# android cmake
3151
- os: linux
32-
env: BUILD_TARGET=android_lua
52+
dist: xenial
53+
env: BUILD_TARGET=android_cpp_cmake
3354
language: android
3455
sudo: required
56+
# android_lua cmake
57+
- os: linux
58+
dist: xenial
59+
env: BUILD_TARGET=android_lua_cmake
60+
language: android
61+
sudo: required
62+
addons:
63+
apt:
64+
sources:
65+
- ubuntu-toolchain-r-test
66+
packages:
67+
- g++-6
68+
# android_js cmake
69+
- os: linux
70+
dist: xenial
71+
env: BUILD_TARGET=android_js_cmake
72+
language: android
73+
sudo: required
74+
addons:
75+
apt:
76+
sources:
77+
- ubuntu-toolchain-r-test
78+
packages:
79+
- g++-6
3580
# mac
3681
- os: osx
3782
env: BUILD_TARGET=mac
3883
language: cpp
39-
osx_image: xcode8.3
84+
osx_image: xcode9.3
4085
sudo: required
4186
# iOS
4287
- os: osx
4388
env: BUILD_TARGET=ios
4489
language: cpp
45-
osx_image: xcode8.3
90+
osx_image: xcode9.3
4691
sudo: required
4792
- os: linux
48-
env: BUILD_TARGET=android_cocos_new_test
49-
language: cpp
93+
dist: xenial
94+
env: BUILD_TARGET=android_cocos_new_cpp_test
95+
language: android
5096
sudo: required
5197
- os: linux
52-
env: BUILD_TARGET=linux_cocos_new_test
98+
dist: xenial
99+
env: BUILD_TARGET=linux_cocos_new_lua_test
53100
language: cpp
54101
sudo: required
55102

@@ -58,6 +105,9 @@ script:
58105
before_install:
59106
- tools/travis-scripts/before-install.sh
60107

108+
jdk:
109+
- oraclejdk8
110+
61111
cache:
62112
bundler: true
63113

Diff for: CHANGELOG

+108-1
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,110 @@
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+
25+
cocos2d-x-3.17.1 Nov.19 2018
26+
27+
[REFINE] Renderer: properly reduce clear buffer times to save energy
28+
[REFINE] Engine: improve the reuse logic of sprite frames cache
29+
[REFINE] Engine: add `GLView::setCursor` for desktop platforms
30+
[REFINE] Engine: add methods to change icons for desktop platforms
31+
[REFINE] UI: improve iPhone X home indicator handling behavior
32+
[REFINE] UI: add line spacing support for system font on iOS and Android
33+
[REFINE] UI: add support for pressed and disabled image in EditBox
34+
[REFINE] UI: shrink extra label text if too long, prevent label too long crash
35+
[REFINE] LUA: add binding code for cocos2d::Downloader
36+
[REFINE] Android: add supporting SafeArea for most edge screens devices
37+
[REFINE] Android: change default value of PROP_BUILD_TYPE from ndk-build to CMake
38+
[REFINE] Android: update project config to gradle 4.6, sdk 28, android gradle plugin 3.1.0
39+
[REFINE] Android: add ability to not stop music on game start in android
40+
[REFINE] Windows: refine CCDevice-win32 BitmapDC
41+
[REFINE] Windows: improve binary folder structure, copy resources to "Resources/" folder
42+
[REFINE] Action: add ui::LoadingBar support to Progress actions
43+
[REFINE] Network: support multiple parameters in SocketIO emit/send method
44+
[REFINE] FileUtils: improve thread safety (use single recursive_mutex)
45+
[REFINE] FileUtils: add getFileSize impl for Windows
46+
[REFINE] FileUtils: add listFiles impl for Android and Windows platform
47+
[REFINE] FileUtils: exact fullPathForDirectory from fullPathForFilename, fullPathForFilename should not accept directory
48+
[REFINE] CMake: improve libraries link, compile options config
49+
[REFINE] CMake: remove un-elegant prebuilt feature at internal cmake build scripts
50+
[REFINE] 3rd: upgrade libwebsockets to 2.4.2 with libuv enabled
51+
[REFINE] 3rd: improve cmake build scripts for external libs
52+
[REFINE] 3rd: upgrade luajit to 2.1.0-beta3, fix random crash in Android release mode
53+
[REFINE] 3rd: external/lua/lua is not referenced in cmake and it will be removed in the near future
54+
[REFINE] Tests: add websocket latency test
55+
[REFINE] Tests: add download multi task test case
56+
[REFINE] Tests: improve part test cases UI shows
57+
[REFINE] cocos console: disable "gen-libs" command
58+
[REFINE] Others: add another xbox 360 configuration
59+
[REFINE] Others: remove ANT_ROOT env check on setup.py
60+
[REFINE] Others: improve cmake tests in travis CI scripts
61+
62+
[FIX] Renderer: handle opengl recreate event for CameraBackgroundDepthBrush
63+
[FIX] Renderer: fix some EVENT_RENDERER_RECREATED problem
64+
[FIX] Engine: fix the last update time was not corrected if next delta time was zeroed
65+
[FIX] Engine: be safe to handle operator= in CCData
66+
[FIX] Engine: aviod reading outside of the buffer when print log
67+
[FIX] Engine: avoid duplicate find action when already found
68+
[FIX] Engine: prevent free _bytes when src and dest are identical in CCData
69+
[FIX] Engine: fix Console::loop() consumes 100% of CPU usage
70+
[FIX] Engine: fix Action doesn't work when follow Node added PhysicsBody
71+
[FIX] UI: fix locate image path relative to tsx file error in TiledMap
72+
[FIX] UI: fix several bugs with button's title, include memory leak
73+
[FIX] UI: fix LabelLetter::isVisible always return false
74+
[FIX] UI: fix not support sprite frame when ignoreContentAdaptWithSize is false
75+
[FIX] UI: fix out of range access in Label
76+
[FIX] UI: fix Widget::getAncestorWidget error
77+
[FIX] UI: fix iOS editbox EndAction wrong when single line mode (UITextField)
78+
[FIX] UI: Fix for Label and UIRichEdit text trailing space trimming
79+
[FXI] JavaScript: fix crash if garbage collection runs between TouchStart and TouchEnd event
80+
[FIX] Audio: fix AudioEngine rotateBufferThread crash on iOS
81+
[FIX] Audio: add extra init checks in pcm audio service, avoid crash in PcmAudioService
82+
[FIX] Audio: fix AVAudioSessionErrorCodeCannotStartPlaying error may occur on Apple
83+
[FIX] Audio: fix background music may resumes even the application is on the background on Android
84+
[FIX] Audio: fix AudioCache* holding invalid pointer value
85+
[FIX] Network: fix memory leaks in WebSocket
86+
[FIX] Network: fix websocket memory zereoing size error
87+
[FIX] Network: fix https downloader timeout on win/mac
88+
[FIX] Network: fix "cc.loader.load" convert url error
89+
[FIX] iOS: fix project build warnings in Xcode
90+
[FIX] iOS: fix crash when saving gray colorspace image
91+
[FIX] iOS: `js/lua tests` fix double free issue on app exits.
92+
[FIX] Android: shorten C++ build path, reduce long path error on Windows
93+
[FIX] Android: keep cocos2dx activity at task root by mark "singleTask" in manifest
94+
[FIX] Android: fix crash caused by JNIEnv null pointer in getStringUTFCharsJNI function
95+
[FIX] Android: use 'Binary names' style on JNI for ClassLoader.loadClass
96+
[FIX] Android: allow cleartext HTTP traffic by default for all tests project
97+
[FIX] Windows: Support VS2017 in release mode
98+
[FIX] Action: fix repeat CallFunc for some times, may never stop
99+
[FIX] Physics: fix PhysicsJointMotor setRate and getRate Bad Access Crash
100+
[FIX] FileUtils: fix removeDirectory() failure on win32
101+
[FIX] FileUtils: let getContents return an error code when the filename is a directory
102+
[FIX] FileUtils: let isFileExistInternal return false when folder as parameter on Linux
103+
[FIX] LUA: performance drop bug introduced in 3.17
104+
[FIX] CMake: fix project name always be "TemplateCpp" when create a new project
105+
[FIX] Tests: fix auto test stop in cpp-tests project
106+
[FIX] cocos console: do uninstall only when that app is installed for android
107+
1108
cocos2d-x-3.17 May.21 2018
2109

3110
[HIGHLIGHT] Android: support Android Studio 3.0, NDK 16
@@ -1164,7 +1271,7 @@ cocos2d-x-3.7rc0 July.1 2015
11641271
[NEW] C++: Added ActionFloat
11651272
[NEW] C++: Supported physical keyboard on WinRT
11661273
[NEW] FileUtils: checked filename case characters on windows
1167-
[NEW] FileUitls: added supporting loading files that which file path include utf-8 characters
1274+
[NEW] FileUtils: added supporting loading files that which file path include utf-8 characters
11681275
[NEW] PhysicsShape: added sensor property
11691276
[NEW] Sprite: used triangle command
11701277
[NEW] 3d: Added `getFarPlane` and `getNearPlane` in `Camera` class

Diff for: CMakeLists.txt

+18-5
Original file line numberDiff line numberDiff line change
@@ -26,23 +26,36 @@
2626

2727
# build engine library and all tests
2828

29-
cmake_minimum_required(VERSION 3.1)
29+
cmake_minimum_required(VERSION 3.6)
3030

3131
project(Cocos2d-x)
3232

3333
# cocos2dx root path
3434
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
3535
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
3636

37+
# prevent in-source-build
38+
include(PreventInSourceBuilds)
39+
3740
# works before build libcocos2d
3841
include(CocosBuildSet)
3942

43+
# build options
44+
option(BUILD_TESTS "Build tests" ON)
45+
4046
# default tests include lua, js test project, so we set those option on to build libs
4147
set(BUILD_LUA_LIBS ON)
4248
set(BUILD_JS_LIBS ON)
4349

44-
if(NOT USE_COCOS_PREBUILT)
45-
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
50+
add_subdirectory(${COCOS2DX_ROOT_PATH}/cocos ${ENGINE_BINARY_PATH}/cocos/core)
51+
52+
# prevent tests project to build "cocos2d-x/cocos" again
53+
set(BUILD_ENGINE_DONE ON)
54+
# add engine all tests project
55+
if (BUILD_TESTS)
56+
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-empty-test ${ENGINE_BINARY_PATH}/tests/cpp-empty-test)
57+
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/cpp-tests ${ENGINE_BINARY_PATH}/tests/cpp-tests)
58+
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/js-tests/project ${ENGINE_BINARY_PATH}/tests/js-tests)
59+
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-empty-test/project ${ENGINE_BINARY_PATH}/tests/lua-empty-test)
60+
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests/lua-tests/project ${ENGINE_BINARY_PATH}/tests/lua-test)
4661
endif()
47-
add_subdirectory(${COCOS2DX_ROOT_PATH}/tests ${ENGINE_BINARY_PATH}/tests)
48-

0 commit comments

Comments
 (0)