mirror of
https://github.com/cocos/cocos4.git
synced 2026-12-03 09:32:38 +08:00
d2c3429f95
* OH could use v8 now. * napi addon works. * Use Napi addon to refactor code. * Fix compilation errors. * tweak * Refactor oh platform, remove some hacking for oh. * Fix log in runScript. * Fix the issues in napi mode. * Revert. * Remove an unused comment. * Refactor log output in NapiHelper.cpp and OpenHarmonyPlatform.cpp * Update oh template. * Remove unused code. * Remove unused debug log in jsb-gfx.js * Update include * Revert Screen::isDisplayStats. * update OH template for v8 backend * update * Update CMakeLists.txt for OH * Fix a compilation error in NapiHelper.cpp while switching to NAPI mode * Keep the symbol of entry function. * Add -Wl,--gc-sections and add -Wl,-s for release mode. * Update external to 3.8.2-1 * Don't use `console.assert` directly. * Remove oh specific methods ( getInnerWidth/Height, getWindowHandle ) in Device class. --------- Co-authored-by: PP_Pro <chinese1236@qq.com>
cocos-engine native part
It is the native backend of Cocos Creator. It works on iOS, Android, macOS and Windows.
Coding format and coding style
The coding format file is .clang-format, and the coding style format file is .clang-tidy. Please use clang-format to format the codes and use clang-tidy to fix the coding style before committing codes. See the linter auto-fix guide for more information.
Build Requirements
- Xcode 11.5+ to build mac games
- or Visual Studio 2017 15.7+ / Visual Studio 2019 to build win64 games
- NDK 21-22 is required to build Android games (23+ is not supported)
- Cmake 3.8+ is required
System Requirements
- macOS 10.14+
- iOS 11.0+
- iOS Simulator 13.0+
- 64-bit Windows 7+
- with vulkan 1.0 to 1.2 if want to run with vulkan
- Android 4.4+
- Android 7+ if want to run with vulkan
C++ related
Use C++17.
These C++17 features are tested and supported by all platforms
std::string_viewconstexpr if
The following features are not supported
std::optionalis not supported by iOS 11.
Other C++17 features are not tested.