mirror of https://github.com/axmolengine/axmol.git
Lock name
This commit is contained in:
parent
80ff81e6e8
commit
975ef2ff61
|
@ -28,7 +28,7 @@
|
|||
|
||||
cmake_minimum_required(VERSION 3.6)
|
||||
|
||||
project(cocos-re)
|
||||
project(engine-x)
|
||||
|
||||
# cocos2dx root path
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR})
|
||||
|
|
26
README.md
26
README.md
|
@ -1,11 +1,11 @@
|
|||
# cocos-re - Cocos2dx Refine
|
||||
[![Android Build Status](https://github.com/c4games/cocos-re/workflows/android/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aandroid)
|
||||
[![iOS Build Status](https://github.com/c4games/cocos-re/workflows/ios/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aios)
|
||||
[![Windows Build Status](https://github.com/c4games/cocos-re/workflows/win32/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Awin32)
|
||||
[![Linux Build Status](https://github.com/c4games/cocos-re/workflows/linux/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Alinux)
|
||||
[![macOS Build Status](https://github.com/c4games/cocos-re/workflows/osx/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aosx)
|
||||
# Engine-x
|
||||
[![Android Build Status](https://github.com/c4games/engine-x/workflows/android/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aandroid)
|
||||
[![iOS Build Status](https://github.com/c4games/engine-x/workflows/ios/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aios)
|
||||
[![Windows Build Status](https://github.com/c4games/engine-x/workflows/win32/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Awin32)
|
||||
[![Linux Build Status](https://github.com/c4games/engine-x/workflows/linux/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Alinux)
|
||||
[![macOS Build Status](https://github.com/c4games/engine-x/workflows/osx/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aosx)
|
||||
|
||||
[![dev](https://img.shields.io/badge/v1.0.0-alpha19-yellow.svg)](https://github.com/c4games/cocos-re/releases)
|
||||
[![dev](https://img.shields.io/badge/v1.0.0-alpha19-yellow.svg)](https://github.com/c4games/engine-x/releases)
|
||||
|
||||
**This is another more radical fork of *Cocos2d-x-4.0*, use OpenAL for all platforms, single texture multi GPU texture handler, C++14/17, etc.**
|
||||
|
||||
|
@ -37,7 +37,7 @@
|
|||
* Add ETC2 RGB/RGBA support, if hardware decoder not present, use software decoder
|
||||
* **ImGui integrated, easy to write game embedded tools, very ease to use, please read [ImGuiEXT](extensions/ImGuiEXT/README.md)**
|
||||
|
||||
### [Roadmap](https://github.com/c4games/cocos-re/issues/1)
|
||||
### [Roadmap](https://github.com/c4games/engine-x/issues/1)
|
||||
|
||||
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
* python-2.7.17+, python-3.7+
|
||||
|
||||
#### Prerequisites
|
||||
1. Enter ```cocos-re``` root directory
|
||||
1. Enter ```engine-x``` root directory
|
||||
2. Run ```python download-deps.py```
|
||||
3. Run ```python setup.py```, restart console after finish
|
||||
|
||||
|
@ -55,7 +55,7 @@
|
|||
2. Install Visual Studio 2019 build(we strong recommend you use this version)
|
||||
3. Execute follow command at command line(Console, Window Terminal or Powershell)
|
||||
```bat
|
||||
cd cocos-re\
|
||||
cd engine-x\
|
||||
cmake -S . -B build -G "Visual Studio 16 2019" -A Win32
|
||||
```
|
||||
|
||||
|
@ -63,7 +63,7 @@
|
|||
#### Android
|
||||
1. Install Android Studio 4.0+
|
||||
2. When first start Android Studio, It will guide you to install sdk and other tools, just install them
|
||||
3. Start Android and choose [Open an existing Android Studio Project] to open ```cocos-re\tests\cpp-tests\proj.android```
|
||||
3. Start Android and choose [Open an existing Android Studio Project] to open ```engine-x\tests\cpp-tests\proj.android```
|
||||
4. Start Android Studio and Open [Tools][SDKManager], then switch to ```SDK Tools```, check the ```Show Package Details```, choose follow tools and click the button ```Apply``` to install them:
|
||||
* Android SDK Platform 28 r3
|
||||
* Android SDK Build-Tools 29.0.2
|
||||
|
@ -93,7 +93,7 @@
|
|||
|
||||
5. Notes
|
||||
a. **The code sign required to run ios app on device, just change bundle identifier until the auto manage siging solved**
|
||||
b. **cocos-re only provide armv7,arm64,x86_64 prebuilt libraries for ios**
|
||||
b. **engine-x only provide armv7,arm64,x86_64 prebuilt libraries for ios**
|
||||
|
||||
### Pitfalls
|
||||
* ThreadLocalStorage(TLS)
|
||||
|
@ -102,5 +102,5 @@
|
|||
- the openal-soft maintained by kcat use TLS
|
||||
|
||||
### Reference links
|
||||
* cocos-re: https://github.com/c4games/cocos-re-3rd
|
||||
* engine-x-3rd: https://github.com/c4games/engine-x-3rd
|
||||
* official v4: https://github.com/cocos2d/cocos2d-x
|
||||
|
|
30
README_CN.md
30
README_CN.md
|
@ -1,11 +1,11 @@
|
|||
# cocos-re - Cocos2dx Refine
|
||||
[![Android Build Status](https://github.com/c4games/cocos-re/workflows/android/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aandroid)
|
||||
[![iOS Build Status](https://github.com/c4games/cocos-re/workflows/ios/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aios)
|
||||
[![Windows Build Status](https://github.com/c4games/cocos-re/workflows/win32/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Awin32)
|
||||
[![Linux Build Status](https://github.com/c4games/cocos-re/workflows/linux/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Alinux)
|
||||
[![macOS Build Status](https://github.com/c4games/cocos-re/workflows/osx/badge.svg)](https://github.com/c4games/cocos-re/actions?query=workflow%3Aosx)
|
||||
# Engine-x
|
||||
[![Android Build Status](https://github.com/c4games/engine-x/workflows/android/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aandroid)
|
||||
[![iOS Build Status](https://github.com/c4games/engine-x/workflows/ios/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aios)
|
||||
[![Windows Build Status](https://github.com/c4games/engine-x/workflows/win32/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Awin32)
|
||||
[![Linux Build Status](https://github.com/c4games/engine-x/workflows/linux/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Alinux)
|
||||
[![macOS Build Status](https://github.com/c4games/engine-x/workflows/osx/badge.svg)](https://github.com/c4games/engine-x/actions?query=workflow%3Aosx)
|
||||
|
||||
[![dev](https://img.shields.io/badge/v1.0.0-alpha19-yellow.svg)](https://github.com/c4games/cocos-re/releases)
|
||||
[![dev](https://img.shields.io/badge/v1.0.0-alpha19-yellow.svg)](https://github.com/c4games/engine-x/releases)
|
||||
|
||||
**这是另外一个基于 *Cocos2d-x-4.0* 持续维护的分支, 全平台基于OpenAL, c++14/17...**
|
||||
|
||||
|
@ -38,7 +38,7 @@
|
|||
* 新增硬件压缩纹理格式ETC2 RGB/RGBA支持,支持软解
|
||||
* **ImGui集成,非常方便写游戏内嵌小工具,用法详见[ImGuiEXT](extensions/ImGuiEXT/README.md)**
|
||||
|
||||
### [Roadmap](https://github.com/c4games/cocos-re/issues/1)
|
||||
### [Roadmap](https://github.com/c4games/engine-x/issues/1)
|
||||
|
||||
### 快速开始
|
||||
|
||||
|
@ -46,7 +46,7 @@
|
|||
* python-2.7.17+, python-3.7+都可以
|
||||
|
||||
#### 准备步骤
|
||||
1. 进入引擎```cocos-re```根目录
|
||||
1. 进入引擎```engine-x```根目录
|
||||
2. 执行```python download-deps.py```等待下载第三方库完成
|
||||
3. 执行```python setup.py```后重启控制台
|
||||
|
||||
|
@ -55,15 +55,15 @@
|
|||
2. 确保Visual Studio 2019以正确安装
|
||||
3. 执行下面的命令
|
||||
```bat
|
||||
cd cocos-re
|
||||
cd engine-x
|
||||
cmake -S . -B build -G "Visual Studio 16 2019" -A Win32
|
||||
```
|
||||
4. 之后就可以用vs打开```cocos-re/build/cocos-re.sln```启动cpp-tests等测试工程了
|
||||
4. 之后就可以用vs打开```engine-x/build/engine-x.sln```启动cpp-tests等测试工程了
|
||||
|
||||
#### Android
|
||||
1. 安装 Android Studio 4.0或更高版本
|
||||
2. 第一次启动Android Studio, 会引导安装一些工具,默认安装即可,如果不需要模拟器可以把```Virutal Device```勾选去掉
|
||||
2. 启动 Android Studio并打开cocos-re\tests\cpp-tests\proj.android
|
||||
2. 启动 Android Studio并打开engine-x\tests\cpp-tests\proj.android
|
||||
3. 通过 [Tools][SdkManagers] 打开sdk管理工具,选择如下SDK Platforms和SDK Tools后, 点击按钮 ```Apply``` 一路跟着引导安装即可:
|
||||
* Android SDK Platform 28 r3 (在SDK Platforms页签)
|
||||
* Android SDK Build-Tools 29.0.2
|
||||
|
@ -77,7 +77,7 @@
|
|||
1. 确保已安装xcode11+和[cmake3.6+](https://github.com/Kitware/CMake/releases), 安装CMake命令行支持: ```sudo "/Applications/CMake.app/Contents/bin/cmake-gui" --install```
|
||||
2. 执行如下命令确保cmake能成功生成xcode工程:
|
||||
```sudo xcode-select -switch /Applications/Xcode.app/Contents/Developer```
|
||||
3. 生成xcode工程, 进入cocos-re根目录执行如下命令:
|
||||
3. 生成xcode工程, 进入engine-x根目录执行如下命令:
|
||||
```sh
|
||||
# for device arm64
|
||||
cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake
|
||||
|
@ -98,8 +98,8 @@
|
|||
|
||||
### QQ交流群
|
||||
|
||||
点击链接加入群聊【cocos-re交流群】:https://jq.qq.com/?_wv=1027&k=nvNmzOIY
|
||||
点击链接加入群聊【engine-x交流群】:https://jq.qq.com/?_wv=1027&k=nvNmzOIY
|
||||
|
||||
### 参考链接
|
||||
* cocos-re-3rd: https://github.com/c4games/cocos-re-3rd
|
||||
* engine-x-3rd: https://github.com/c4games/engine-x-3rd
|
||||
* official v4: https://gitee.com/mirrors/cocos2d-x
|
||||
|
|
|
@ -96,7 +96,7 @@ endif()
|
|||
function(use_cocos2dx_compile_define target)
|
||||
target_compile_definitions(${target} PUBLIC $<$<CONFIG:Debug>:COCOS2D_DEBUG=1>)
|
||||
|
||||
# !important cocos-re not use double precision
|
||||
# !important engine-x not use double precision
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_CGTYPES=0)
|
||||
# target_compile_definitions(${target} PUBLIC CP_USE_DOUBLES=0)
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ if the CMake version is lower than 3.6, please upgrade.
|
|||
### Linux
|
||||
|
||||
```sh
|
||||
cd cocos-re
|
||||
cd engine-x
|
||||
mkdir linux-build && cd linux-build
|
||||
cmake ..
|
||||
make
|
||||
|
@ -28,7 +28,7 @@ Execute `make help` to see all build targets, `make <target>` build specified ta
|
|||
### Generate Visual Studio projects
|
||||
|
||||
```sh
|
||||
cd cocos-re
|
||||
cd engine-x
|
||||
mkdir win32-build && cd win32-build
|
||||
cmake .. -G"Visual Studio 16 2019"
|
||||
```
|
||||
|
@ -43,24 +43,24 @@ or open __cocos-re.sln__ in Explorer to use the generated project.
|
|||
### Generate macOS Project
|
||||
|
||||
```sh
|
||||
cd cocos-re
|
||||
cd engine-x
|
||||
mkdir mac-build && cd mac-build
|
||||
cmake .. -GXcode
|
||||
open cocos-re.xcodeproj
|
||||
open engine-x.xcodeproj
|
||||
```
|
||||
|
||||
### Generate iOS Project
|
||||
|
||||
```sh
|
||||
cd cocos-re
|
||||
cd engine-x
|
||||
mkdir ios-build && cd ios-build
|
||||
cmake .. -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake
|
||||
open cocos-re.xcodeproj
|
||||
open engine-x.xcodeproj
|
||||
```
|
||||
|
||||
#### How do I customize the generated Xcode project?
|
||||
|
||||
Xcode project settings that you want to affect both the app project and the cocos-re library project should be passed on the command
|
||||
Xcode project settings that you want to affect both the app project and the engine-x library project should be passed on the command
|
||||
line when invoking `cmake`.
|
||||
|
||||
Xcode project settings that you want to affect the app project only shoudl be put into the its `CMakeLists.txt` file.
|
||||
|
@ -79,7 +79,7 @@ set_xcode_property(${APP_NAME} XXX "Value")
|
|||
|
||||
##### Deployment Target
|
||||
|
||||
As explained above, pass this on the command line so both the app the cocos-re are built using the same version:
|
||||
As explained above, pass this on the command line so both the app the engine-x are built using the same version:
|
||||
|
||||
For iOS pass `-DCMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET=version`, where `version` is `9.0`, `10.0`, etc.
|
||||
|
||||
|
@ -107,7 +107,7 @@ from `cmake`:
|
|||
|
||||
### Android Studio
|
||||
|
||||
We use the Gradle for Android applications, and Gradle use cmake to build the native code, see [gradle.properties](https://github.com/c4games/cocos-re/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/gradle.properties#L38): `PROP_NDK_MODE`, it controls how native builds work.
|
||||
We use the Gradle for Android applications, and Gradle use cmake to build the native code, see [gradle.properties](https://github.com/c4games/engine-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
|
||||
|
@ -117,7 +117,7 @@ We use the Gradle for Android applications, and Gradle use cmake to build the na
|
|||
PROP_BUILD_TYPE=cmake
|
||||
```
|
||||
|
||||
If you want to add cmake build arguments, please add it at [external Native Build](https://github.com/c4games/cocos-re/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/c4games/engine-x/blob/84be684e3858393a6f3efc50e3f95d4e0ac92a20/tests/cpp-empty-test/proj.android/app/build.gradle#L25) block of __app/build.gradle__ file.
|
||||
|
||||
|
||||
## Build Options
|
||||
|
@ -135,7 +135,7 @@ If you want to add cmake build arguments, please add it at [external Native Buil
|
|||
|
||||
1. __`-H -B`__, `-H` specify the CMake project Home directory, `-B` specify CMake-generated project binary directory. for example
|
||||
|
||||
* `-H..\cocos-re -Bmsvc_build` the generated native project's location will be `msvc_build` directory.
|
||||
* `-H..\engine-x -Bmsvc_build` the generated native project's location will be `msvc_build` directory.
|
||||
|
||||
1. __`--build <dir>`__, build a CMake-generated project binary tree, for example
|
||||
|
||||
|
|
|
@ -59,10 +59,10 @@ if(CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
|||
endif()
|
||||
|
||||
# The version number
|
||||
set(COCOSRE_VERSION 1.0)
|
||||
set(ENGINEX_VERSION 1.0)
|
||||
|
||||
if(NOT DEFINED COCOSRE_CORE_LIB)
|
||||
set(COCOSRE_CORE_LIB cocos2d CACHE INTERNAL "The EGNX core lib name" )
|
||||
if(NOT DEFINED ENGINEX_CORE_LIB)
|
||||
set(ENGINEX_CORE_LIB cocos2d CACHE INTERNAL "The engine-x core lib name" )
|
||||
endif()
|
||||
|
||||
if (NOT DEFINED CC_FORCE_USE_GLES)
|
||||
|
@ -118,7 +118,7 @@ set(COCOS_SRC cocos2d.cpp
|
|||
|
||||
list(APPEND COCOS_SRC ${COCOS_HEADER})
|
||||
|
||||
add_library(${COCOSRE_CORE_LIB} ${COCOS_SRC})
|
||||
add_library(${ENGINEX_CORE_LIB} ${COCOS_SRC})
|
||||
|
||||
# if (NOT APPLE)
|
||||
# set_source_files_properties("audio/src/AudioEngineImpl.mm" PROPERTIES LANGUAGE CXX)
|
||||
|
@ -126,16 +126,16 @@ add_library(${COCOSRE_CORE_LIB} ${COCOS_SRC})
|
|||
|
||||
# use external libs
|
||||
add_subdirectory(${COCOS2DX_ROOT_PATH}/external ${ENGINE_BINARY_PATH}/external)
|
||||
target_link_libraries(${COCOSRE_CORE_LIB} external)
|
||||
target_link_libraries(${ENGINEX_CORE_LIB} external)
|
||||
|
||||
# add base macro define and compile options
|
||||
use_cocos2dx_compile_define(${COCOSRE_CORE_LIB})
|
||||
use_cocos2dx_compile_options(${COCOSRE_CORE_LIB})
|
||||
use_cocos2dx_compile_define(${ENGINEX_CORE_LIB})
|
||||
use_cocos2dx_compile_options(${ENGINEX_CORE_LIB})
|
||||
|
||||
# use all platform related system libs
|
||||
use_cocos2dx_libs_depend(${COCOSRE_CORE_LIB})
|
||||
use_cocos2dx_libs_depend(${ENGINEX_CORE_LIB})
|
||||
|
||||
target_include_directories(${COCOSRE_CORE_LIB}
|
||||
target_include_directories(${ENGINEX_CORE_LIB}
|
||||
PUBLIC ${COCOS2DX_ROOT_PATH}
|
||||
PUBLIC ${COCOS2DX_ROOT_PATH}/external
|
||||
PUBLIC ${COCOS2DX_ROOT_PATH}/extensions
|
||||
|
@ -149,12 +149,12 @@ target_include_directories(${COCOSRE_CORE_LIB}
|
|||
INTERFACE ${COCOS2DX_ROOT_PATH}/cocos/platform/${PLATFORM_FOLDER}
|
||||
)
|
||||
|
||||
set_target_properties(${COCOSRE_CORE_LIB}
|
||||
set_target_properties(${ENGINEX_CORE_LIB}
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
RUNTIME_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
VERSION "${COCOSRE_VERSION}"
|
||||
VERSION "${ENGINEX_VERSION}"
|
||||
FOLDER "Internal"
|
||||
)
|
||||
|
||||
|
@ -164,13 +164,13 @@ set_target_properties(${COCOSRE_CORE_LIB}
|
|||
# endif()
|
||||
|
||||
if(XCODE OR VS)
|
||||
cocos_mark_code_files("${COCOSRE_CORE_LIB}")
|
||||
cocos_mark_code_files("${ENGINEX_CORE_LIB}")
|
||||
endif()
|
||||
|
||||
if(WINDOWS)
|
||||
# precompiled header. Compilation time speedup ~4x.
|
||||
target_sources(${COCOSRE_CORE_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp")
|
||||
set_target_properties(${COCOSRE_CORE_LIB} PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h")
|
||||
target_sources(${ENGINEX_CORE_LIB} PUBLIC "${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp")
|
||||
set_target_properties(${ENGINEX_CORE_LIB} PROPERTIES COMPILE_FLAGS "/Yuprecheader.h /FIprecheader.h")
|
||||
set_source_files_properties("${CMAKE_CURRENT_SOURCE_DIR}/precheader.cpp" PROPERTIES COMPILE_FLAGS "/Ycprecheader.h")
|
||||
# compile c as c++. needed for precompiled header
|
||||
set_source_files_properties(${COCOS_SPINE_SRC} base/ccFPSImages.c PROPERTIES LANGUAGE CXX)
|
||||
|
@ -187,5 +187,5 @@ add_subdirectory(${COCOS2DX_ROOT_PATH}/extensions ${ENGINE_BINARY_PATH}/extensio
|
|||
#if(XCODE)
|
||||
# # Later versions of Xcode clang want to compile C++17 with aligned allocation turned on and this is only supported on iOS 11.0+
|
||||
# # TODO: Only turn this off if ${CMAKE_XCODE_ATTRIBUTE_IPHONEOS_DEPLOYMENT_TARGET} < 11.0
|
||||
# target_compile_options(${COCOSRE_CORE_LIB} PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-aligned-allocation>)
|
||||
# target_compile_options(${ENGINEX_CORE_LIB} PUBLIC $<$<COMPILE_LANGUAGE:CXX>:-fno-aligned-allocation>)
|
||||
#endif()
|
||||
|
|
|
@ -71,7 +71,7 @@
|
|||
#endif
|
||||
|
||||
// !FIXME: the previous version of cocos2d::log not thread safe
|
||||
// since cocos-re make it multi-threading safe by default
|
||||
// since engine-x make it multi-threading safe by default
|
||||
#if !defined(CC_LOG_MULTITHREAD)
|
||||
#define CC_LOG_MULTITHREAD 1
|
||||
#endif
|
||||
|
|
|
@ -71,7 +71,7 @@ namespace utils
|
|||
* @param afterCaptured specify the callback function which will be invoked after the snapshot is done.
|
||||
* @param filename specify a filename where the snapshot is stored. This parameter can be either an absolute path or a simple
|
||||
* base filename ("hello.png" etc.), don't use a relative path containing directory names.("mydir/hello.png" etc.).
|
||||
* @since v4.0 with cocos-re
|
||||
* @since v4.0 with engine-x
|
||||
*/
|
||||
CC_DLL void captureScreen(std::function<void(RefPtr<Image>)> imageCallback);
|
||||
|
||||
|
@ -79,7 +79,7 @@ namespace utils
|
|||
* @param startNode specify the snapshot Node. It should be cocos2d::Scene
|
||||
* @param scale
|
||||
* @returns: return a Image, then can call saveToFile to save the image as "xxx.png or xxx.jpg".
|
||||
* @since v4.0 with cocos-re
|
||||
* @since v4.0 with engine-x
|
||||
*/
|
||||
CC_DLL void captureNode(Node* startNode, std::function<void(RefPtr<Image>)> imageCallback, float scale = 1.0f);
|
||||
|
||||
|
|
|
@ -31,10 +31,10 @@ THE SOFTWARE.
|
|||
|
||||
// 0x00 HI ME LO
|
||||
// 00 03 08 00
|
||||
#define COCOSRE_VERSION 0x00010000
|
||||
#define COCOSRE_VERSION 0x00010000
|
||||
|
||||
#define ENGINEX_VERSION 0x00010000
|
||||
#define COCOS2D_VERSION 0x00040000
|
||||
#define ENGINEX_VERSION COCOSRE_VERSION
|
||||
#define EGNX_VERSION ENGINEX_VERSION
|
||||
|
||||
//
|
||||
// all cocos2d include files
|
||||
|
|
|
@ -491,7 +491,7 @@ namespace
|
|||
}
|
||||
|
||||
/*
|
||||
* Notes: PVR file Specification have many pixel formats, cocos2d-x-v2~v4 and cocos-re only support pvrtc and etc1
|
||||
* Notes: PVR file Specification have many pixel formats, cocos2d-x-v2~v4 and engine-x only support pvrtc and etc1
|
||||
* see: https://cdn.imgtec.com/sdk-documentation/PVR+File+Format.Specification.pdf
|
||||
*/
|
||||
static backend::PixelFormat getDevicePVRPixelFormat(backend::PixelFormat format)
|
||||
|
|
|
@ -144,7 +144,7 @@ enum class PixelFormat : uint32_t
|
|||
D24S8,
|
||||
//!!!Please append depth stencil pixel format
|
||||
|
||||
/* the count of pixel format supported by cocos-re */
|
||||
/* the count of pixel format supported by engine-x */
|
||||
COUNT,
|
||||
|
||||
NONE = 0xffff
|
||||
|
|
|
@ -170,7 +170,7 @@ PixelFormat RenderTargetMTL::getColorAttachmentPixelFormat(int index) const
|
|||
}
|
||||
|
||||
PixelFormat RenderTargetMTL::getDepthAttachmentPixelFormat() const
|
||||
{ // FIXME: cocos-re only support D24S8
|
||||
{ // FIXME: engine-x only support D24S8
|
||||
if(bitmask::any(_flags, TargetBufferFlags::DEPTH_AND_STENCIL)) {
|
||||
if(isDefaultRenderTarget() || !_depth)
|
||||
return PixelFormat::D24S8;
|
||||
|
@ -180,7 +180,7 @@ PixelFormat RenderTargetMTL::getDepthAttachmentPixelFormat() const
|
|||
}
|
||||
|
||||
PixelFormat RenderTargetMTL::getStencilAttachmentPixelFormat() const
|
||||
{ // FIXME: cocos-re only support D24S8
|
||||
{ // FIXME: engine-x only support D24S8
|
||||
if(bitmask::any(_flags, TargetBufferFlags::DEPTH_AND_STENCIL)) {
|
||||
if(isDefaultRenderTarget() || !_stencil)
|
||||
return PixelFormat::D24S8;
|
||||
|
|
|
@ -32,12 +32,12 @@ function(setup_cocos_extension_config target_name)
|
|||
"" ${ARGN} )
|
||||
|
||||
if(ANDROID)
|
||||
target_link_libraries(${target_name} INTERFACE ${COCOSRE_CORE_LIB})
|
||||
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${COCOSRE_CORE_LIB},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
target_link_libraries(${target_name} INTERFACE ${ENGINEX_CORE_LIB})
|
||||
target_include_directories(${target_name} PRIVATE $<TARGET_PROPERTY:${ENGINEX_CORE_LIB},INTERFACE_INCLUDE_DIRECTORIES>)
|
||||
# target_compile_definitions(${target_name} PRIVATE CP_USE_CGTYPES=0)
|
||||
# target_compile_definitions(${target_name} PRIVATE CP_USE_DOUBLES=0)
|
||||
else()
|
||||
target_link_libraries(${target_name} ${COCOSRE_CORE_LIB})
|
||||
target_link_libraries(${target_name} ${ENGINEX_CORE_LIB})
|
||||
endif()
|
||||
|
||||
if(BUILD_SHARED_LIBS)
|
||||
|
|
|
@ -160,20 +160,20 @@ endif()
|
|||
|
||||
list(APPEND lua_bindings_files ${lua_bindings_headers})
|
||||
|
||||
set(COCOSRE_LUA_LIB luacocos2d CACHE INTERNAL "The EGNX lua bindings lib name" )
|
||||
set(ENGINEX_LUA_LIB luacocos2d CACHE INTERNAL "The EGNX lua bindings lib name" )
|
||||
|
||||
add_library(${COCOSRE_LUA_LIB} STATIC ${lua_bindings_files})
|
||||
target_link_libraries(${COCOSRE_LUA_LIB} ${COCOSRE_CORE_LIB})
|
||||
add_dependencies(${COCOSRE_LUA_LIB} ${COCOSRE_CORE_LIB})
|
||||
add_library(${ENGINEX_LUA_LIB} STATIC ${lua_bindings_files})
|
||||
target_link_libraries(${ENGINEX_LUA_LIB} ${ENGINEX_CORE_LIB})
|
||||
add_dependencies(${ENGINEX_LUA_LIB} ${ENGINEX_CORE_LIB})
|
||||
|
||||
if(BUILD_YASIO_LUA)
|
||||
target_compile_definitions(${COCOSRE_LUA_LIB} PRIVATE CC_ENABLE_YASIO_LUA=1)
|
||||
target_compile_definitions(${ENGINEX_LUA_LIB} PRIVATE CC_ENABLE_YASIO_LUA=1)
|
||||
endif()
|
||||
|
||||
get_target_property(lua_ext_depend external CC_LUA_DEPEND)
|
||||
target_link_libraries(${COCOSRE_LUA_LIB} ${lua_ext_depend})
|
||||
target_link_libraries(${ENGINEX_LUA_LIB} ${lua_ext_depend})
|
||||
|
||||
target_include_directories(${COCOSRE_LUA_LIB}
|
||||
target_include_directories(${ENGINEX_LUA_LIB}
|
||||
PRIVATE manual/platform/android
|
||||
PRIVATE manual/platform/android/jni
|
||||
PRIVATE ${cocos_root}/extensions/spine/runtime/include
|
||||
|
@ -183,12 +183,12 @@ target_include_directories(${COCOSRE_LUA_LIB}
|
|||
)
|
||||
|
||||
if(WINDOWS)
|
||||
target_compile_definitions(${COCOSRE_LUA_LIB} PUBLIC _USRLUASTATIC)
|
||||
target_compile_definitions(${ENGINEX_LUA_LIB} PUBLIC _USRLUASTATIC)
|
||||
endif()
|
||||
|
||||
target_compile_definitions(${COCOSRE_LUA_LIB} PUBLIC LUA_COMPAT_MODULE)
|
||||
target_compile_definitions(${ENGINEX_LUA_LIB} PUBLIC LUA_COMPAT_MODULE)
|
||||
|
||||
set_target_properties(${COCOSRE_LUA_LIB}
|
||||
set_target_properties(${ENGINEX_LUA_LIB}
|
||||
PROPERTIES
|
||||
ARCHIVE_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
LIBRARY_OUTPUT_DIRECTORY "${CMAKE_BINARY_DIR}/lib"
|
||||
|
@ -196,6 +196,6 @@ set_target_properties(${COCOSRE_LUA_LIB}
|
|||
)
|
||||
|
||||
if(XCODE OR VS)
|
||||
cocos_mark_code_files("${COCOSRE_LUA_LIB}")
|
||||
cocos_mark_code_files("${ENGINEX_LUA_LIB}")
|
||||
endif()
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
{
|
||||
"version": "v79",
|
||||
"zip_file_size": "107642814",
|
||||
"repo_name": "cocos-re-3rd",
|
||||
"repo_name": "engine-x-3rd",
|
||||
"repo_parent": "https://github.com/c4games/",
|
||||
"move_dirs": {
|
||||
}
|
||||
|
|
41
setup.py
41
setup.py
|
@ -26,11 +26,11 @@ THE SOFTWARE.
|
|||
|
||||
'''
|
||||
This script will install environment variables needed to by cocos2d-x. It will set these envrironment variables:
|
||||
* COCOS_RE_CONSOLE_ROOT: used to run cocos console tools, more information about cocos console tools please refer to
|
||||
* ENGINEX_CONSOLE_ROOT: used to run cocos console tools, more information about cocos console tools please refer to
|
||||
https://github.com/cocos2d/cocos2d-console
|
||||
* ANDROID_NDK: used to build android native codes
|
||||
* ANDROID_SDK: used to generate applicatoin on Android through commands
|
||||
* COCOS_RE_ROOT: path where cocos2d-re is installed
|
||||
* ENGINEX_ROOT: path where cocos2d-re is installed
|
||||
|
||||
On Max OS X, when start a shell, it will read these files and execute commands in sequence:
|
||||
|
||||
|
@ -60,8 +60,8 @@ except Exception:
|
|||
pass
|
||||
from optparse import OptionParser
|
||||
|
||||
COCOS_RE_ROOT = 'COCOS_RE_ROOT'
|
||||
COCOS_RE_CONSOLE_ROOT = 'COCOS_RE_CONSOLE_ROOT'
|
||||
ENGINEX_ROOT = 'ENGINEX_ROOT'
|
||||
ENGINEX_CONSOLE_ROOT = 'ENGINEX_CONSOLE_ROOT'
|
||||
|
||||
ANDROID_NDK = 'ANDROID_NDK'
|
||||
ANDROID_SDK = 'ANDROID_SDK'
|
||||
|
@ -451,41 +451,41 @@ class SetEnvVar(object):
|
|||
print(" ->Add directory \"%s\" into PATH failed!\n" % add_dir)
|
||||
|
||||
def set_console_root(self):
|
||||
print("->Check environment variable %s" % COCOS_RE_CONSOLE_ROOT)
|
||||
cocos_consle_root = os.path.join(
|
||||
print("->Check environment variable %s" % ENGINEX_CONSOLE_ROOT)
|
||||
enginex_console_root = os.path.join(
|
||||
self.current_absolute_path, 'tools', 'cocos2d-console', 'bin')
|
||||
old_dir = self._find_environment_variable(COCOS_RE_CONSOLE_ROOT)
|
||||
old_dir = self._find_environment_variable(ENGINEX_CONSOLE_ROOT)
|
||||
if old_dir is None:
|
||||
# add environment variable
|
||||
if self._isWindows():
|
||||
self.set_windows_path(cocos_consle_root)
|
||||
self.set_windows_path(enginex_console_root)
|
||||
|
||||
self._set_environment_variable(
|
||||
COCOS_RE_CONSOLE_ROOT, cocos_consle_root)
|
||||
ENGINEX_CONSOLE_ROOT, enginex_console_root)
|
||||
else:
|
||||
if old_dir == cocos_consle_root:
|
||||
if old_dir == enginex_console_root:
|
||||
# is same with before, nothing to do
|
||||
return
|
||||
|
||||
# update the environment variable
|
||||
if self._isWindows():
|
||||
self.remove_dir_from_win_path(old_dir)
|
||||
self.set_windows_path(cocos_consle_root)
|
||||
self.set_windows_path(enginex_console_root)
|
||||
|
||||
self._force_update_env(COCOS_RE_CONSOLE_ROOT, cocos_consle_root)
|
||||
self._force_update_env(ENGINEX_CONSOLE_ROOT, enginex_console_root)
|
||||
|
||||
def set_cocos_re_root(self):
|
||||
print("->Check environment variable %s" % COCOS_RE_ROOT)
|
||||
cocos_re_root = self.current_absolute_path
|
||||
old_dir = self._find_environment_variable(COCOS_RE_ROOT)
|
||||
def set_enginex_root(self):
|
||||
print("->Check environment variable %s" % ENGINEX_ROOT)
|
||||
enginex_root = self.current_absolute_path
|
||||
old_dir = self._find_environment_variable(ENGINEX_ROOT)
|
||||
if old_dir is None:
|
||||
# add environment variable
|
||||
self._set_environment_variable(COCOS_RE_ROOT, cocos_re_root)
|
||||
self._set_environment_variable(ENGINEX_ROOT, enginex_root)
|
||||
else:
|
||||
if old_dir == cocos_re_root:
|
||||
if old_dir == enginex_root:
|
||||
# is same with before, nothing to do
|
||||
return
|
||||
self._force_update_env(COCOS_RE_ROOT, cocos_re_root)
|
||||
self._force_update_env(ENGINEX_ROOT, enginex_root)
|
||||
|
||||
def _force_update_unix_env(self, var_name, value):
|
||||
import re
|
||||
|
@ -642,10 +642,9 @@ class SetEnvVar(object):
|
|||
|
||||
self.file_used_for_setup = self._get_filepath_for_setup()
|
||||
|
||||
self.set_cocos_re_root()
|
||||
self.set_enginex_root()
|
||||
self.set_console_root()
|
||||
|
||||
|
||||
if self._isWindows():
|
||||
print(
|
||||
'->Configuration for Android platform only, you can also skip and manually edit your environment variables\n')
|
||||
|
|
|
@ -30,17 +30,17 @@ set(APP_NAME HelloCpp)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE) # to test HelloCpp into root project
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
set(COCOS2DX_ROOT_PATH "${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "${ENGINEX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
message(FATAL_ERROR "Please run setup.py add system env var 'COCOS_RE_ROOT' to specific the engine root")
|
||||
message(FATAL_ERROR "Please run setup.py add system env var 'ENGINEX_ROOT' to specific the engine root")
|
||||
endif()
|
||||
set(CMAKE_MODULE_PATH ${COCOS2DX_ROOT_PATH}/cmake/Modules/)
|
||||
|
||||
|
@ -135,7 +135,7 @@ else()
|
|||
config_android_shared_libs("org.cocos2dx.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME} ${COCOSRE_CORE_LIB})
|
||||
target_link_libraries(${APP_NAME} ${ENGINEX_CORE_LIB})
|
||||
target_include_directories(${APP_NAME}
|
||||
PRIVATE Classes
|
||||
PRIVATE ${COCOS2DX_ROOT_PATH}/cocos/audio/include/
|
||||
|
|
|
@ -27,17 +27,17 @@ set(APP_NAME HelloLua)
|
|||
|
||||
project(${APP_NAME})
|
||||
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
set(COCOS2DX_ROOT_PATH "${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "${ENGINEX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
message(FATAL_ERROR "Please run setup.py add system env var 'COCOS_RE_ROOT' to specific the engine root")
|
||||
message(FATAL_ERROR "Please run setup.py add system env var 'ENGINEX_ROOT' to specific the engine root")
|
||||
endif()
|
||||
|
||||
set(RUNTIME_SRC_ROOT ${CMAKE_CURRENT_SOURCE_DIR}/frameworks/runtime-src)
|
||||
|
|
|
@ -28,13 +28,13 @@ set(APP_NAME cpp-empty-test)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
|
@ -133,7 +133,7 @@ else()
|
|||
config_android_shared_libs("org.cocos2dx.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME} ${COCOSRE_CORE_LIB})
|
||||
target_link_libraries(${APP_NAME} ${ENGINEX_CORE_LIB})
|
||||
|
||||
target_include_directories(${APP_NAME} PRIVATE Classes)
|
||||
|
||||
|
|
|
@ -5,14 +5,14 @@ set(APP_NAME cpp-tests)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
set(COCOS2DX_ROOT_PATH "${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "${ENGINEX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
set(COCOS2DX_ROOT_PATH ${CMAKE_CURRENT_SOURCE_DIR}/../..)
|
||||
|
@ -400,7 +400,7 @@ else()
|
|||
config_android_shared_libs("org.cocos2dx.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME} ${COCOSRE_CORE_LIB})
|
||||
target_link_libraries(${APP_NAME} ${ENGINEX_CORE_LIB})
|
||||
|
||||
target_include_directories(${APP_NAME}
|
||||
PRIVATE Classes
|
||||
|
|
|
@ -28,13 +28,13 @@ set(APP_NAME fairygui-tests)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
|
@ -122,7 +122,7 @@ else()
|
|||
config_android_shared_libs("org.cocos2dx.lib" "${CMAKE_CURRENT_SOURCE_DIR}/proj.android/app/src")
|
||||
endif()
|
||||
|
||||
target_link_libraries(${APP_NAME} ${COCOSRE_CORE_LIB})
|
||||
target_link_libraries(${APP_NAME} ${ENGINEX_CORE_LIB})
|
||||
|
||||
target_include_directories(${APP_NAME} PRIVATE Classes)
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ set(APP_NAME lua-empty-test)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
|
|
|
@ -5,13 +5,13 @@ set(APP_NAME lua-tests)
|
|||
project(${APP_NAME})
|
||||
|
||||
if(NOT DEFINED BUILD_ENGINE_DONE)
|
||||
set(cocos_re_root "$ENV{COCOS_RE_ROOT}")
|
||||
if(cocos_re_root STREQUAL "")
|
||||
set(cocos_re_root "$ENV{COCOS2DX_ROOT}")
|
||||
set(ENGINEX_ROOT "$ENV{ENGINEX_ROOT}")
|
||||
if(ENGINEX_ROOT STREQUAL "")
|
||||
set(ENGINEX_ROOT "$ENV{COCOS2DX_ROOT}")
|
||||
endif()
|
||||
|
||||
if(NOT (cocos_re_root STREQUAL ""))
|
||||
message(STATUS "Using system env var COCOS_RE_ROOT=${cocos_re_root}")
|
||||
if(NOT (ENGINEX_ROOT STREQUAL ""))
|
||||
message(STATUS "Using system env var ENGINEX_ROOT=${ENGINEX_ROOT}")
|
||||
set(COCOS2DX_ROOT_PATH "$ENV{COCOS2DX_ROOT}")
|
||||
string(REPLACE "\\" "/" COCOS2DX_ROOT_PATH ${COCOS2DX_ROOT_PATH})
|
||||
else()
|
||||
|
|
Loading…
Reference in New Issue