axmol/README_CN.md

116 lines
6.0 KiB
Markdown
Raw Normal View History

2021-05-19 08:14:17 +08:00
# adxe
2020-11-15 17:56:03 +08:00
[![dev](https://img.shields.io/github/v/release/adxeproject/adxe?include_prereleases&label=release)](https://github.com/adxeproject/adxe/releases)
2021-05-18 16:51:46 +08:00
[![LICENSE](https://img.shields.io/badge/license-MIT-blue.svg)](https://github.com/adxeproject/adxe/blob/master/LICENSE)
2021-12-28 21:50:41 +08:00
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/1c5628dea478449ea0c6e1b0e30c3be9)](https://app.codacy.com/gh/adxeproject/adxe?utm_source=github.com&utm_medium=referral&utm_content=adxeproject/adxe&utm_campaign=Badge_Grade_Settings)
2021-12-28 21:32:25 +08:00
[![PRs Welcome](https://img.shields.io/badge/PRs-welcome-blue.svg)](https://github.com/adxeproject/adxe/pulls)
2020-11-15 17:56:03 +08:00
2021-08-27 13:27:04 +08:00
[![Windows Build Status](https://github.com/adxeproject/adxe/actions/workflows/windows-ci.yml/badge.svg)](https://github.com/adxeproject/adxe/actions/workflows/windows-ci.yml)
2021-05-18 16:51:46 +08:00
[![Android Build Status](https://github.com/adxeproject/adxe/workflows/android/badge.svg)](https://github.com/adxeproject/adxe/actions?query=workflow%3Aandroid)
[![iOS Build Status](https://github.com/adxeproject/adxe/workflows/ios/badge.svg)](https://github.com/adxeproject/adxe/actions?query=workflow%3Aios)
[![Linux Build Status](https://github.com/adxeproject/adxe/workflows/linux/badge.svg)](https://github.com/adxeproject/adxe/actions?query=workflow%3Alinux)
[![macOS Build Status](https://github.com/adxeproject/adxe/workflows/osx/badge.svg)](https://github.com/adxeproject/adxe/actions?query=workflow%3Aosx)
2020-10-24 18:41:20 +08:00
2021-12-28 21:28:04 +08:00
**这是另外一个基于 *Cocos2d-x-4.0* 持续维护的分支, 全平台基于OpenAL, c++17...**
**[English](README.md)**
### 宗旨:
2021-12-28 21:32:25 +08:00
* C++17
2020-10-22 15:35:02 +08:00
* Focus on native game dev only
* Fix bugs ASAP
* Review PR ASAP
### 主要特性:
2022-02-26 15:24:20 +08:00
* 增强Windows下工作流支持链接引擎预编译库, 用法请查看: [windows workflow guide](https://github.com/adxeproject/adxe/issues/564)
* Windows 视频播放支持
2021-08-27 12:45:03 +08:00
* Windows x64编译支持
2021-06-26 17:13:05 +08:00
* 基于yasio重构HttpClient以支持并发Http请求不再需要sendImmidate接口
2020-08-15 18:17:03 +08:00
* 重构AudioEngine, 全平台OpenAL
2022-02-17 17:11:17 +08:00
* [openal-soft](https://github.com/kcat/openal-soft), pass -DAX_USE_ALSOFT=ON to cmake to force enable it
* [OpenAL.framework](https://opensource.apple.com/tarballs/OpenAL), if no and ```AX_USE_ALSOFT``` option specified, cmake script will choose it on osx/ios, even through it was mark as deprecated, but still avaiable.
* 重构UserDefault, 全平台基于内存映射文件 [mio](https://github.com/mandreyel/mio), 性能提升百倍
* 模块化所有引擎扩展库, 所有扩展库放到extensions目录下如cocostudio, spine
* AudioEngine实现wav所有 ```openal-soft``` 支持的封装格式, 例如MS-ADPCM, ADPCM等
* 使用现代化的GL加载器glad代替glew
* 增加google angle渲染后端支持
2021-12-28 21:28:04 +08:00
* C++最低标准要求: C++17
* 设置ios下最低目标平台为ios9.0
* 使用更快的xml解析库pugixml代替tinyxml2
2021-07-17 16:14:16 +08:00
* Downloader全平台统一实现均基于curl
* 全平台统一使用XML SAX解析plist文件, 移除Apple平台的实现
* Spine 3.8支持
* 新增FairyGUI支持
* 新增硬件压缩纹理格式ASTC 4x4/6x6/8x8支持支持软解
* 新增硬件压缩纹理格式ETC2 RGB/RGBA支持支持软解
2022-02-26 14:33:48 +08:00
* **ImGui集成非常方便写游戏内嵌小工具用法详见[ImGui](extensions/ImGui/README.md)**
* 完整改动列表,请查看[CHANGELOG](CHANGELOG)
### 快速开始
#### 必要工具 [python](https://www.python.org/downloads/)
* python-2.7.17+, python-3.7+都可以
#### 准备步骤
2021-05-18 16:51:46 +08:00
1. 进入引擎```adxe```根目录
2020-10-22 16:53:28 +08:00
3. 执行```python setup.py```后重启控制台
#### Windows
1. 安装CMake要求3.14以上
2020-12-01 12:17:09 +08:00
2. 确保 Visual Studio 2019 已正确安装
3. 执行下面的命令
```bat
2021-05-18 16:51:46 +08:00
cd adxe
cmake -S . -B build -G "Visual Studio 16 2019" -A Win32
```
2021-05-18 16:51:46 +08:00
4. 之后就可以用vs打开```adxe/build/adxe.sln```启动cpp-tests等测试工程了
#### Android
1. 安装 Android Studio 2021.1.1+
2020-08-06 15:45:59 +08:00
2. 第一次启动Android Studio, 会引导安装一些工具,默认安装即可,如果不需要模拟器可以把```Virutal Device```勾选去掉
2021-07-09 10:42:36 +08:00
2. 启动 Android Studio并打开adxe\tests\cpp-tests\proj.android
3. 通过 [Tools][SdkManagers] 打开sdk管理工具选择如下SDK Platforms和SDK Tools后 点击按钮 ```Apply``` 一路跟着引导安装即可:
* Android SDK Platform 29 r5 (在SDK Platforms页签)
* Android SDK Build-Tools 29.0.2
* NDK r23c+
* CMake 3.10+
2020-08-06 15:45:59 +08:00
5. 等待Gradle sync完成后Build APKs安装运行
2021-05-18 20:23:43 +08:00
6. 如果使用非sdk自动安装的CMake版本, 需要下载[ninja](https://github.com/ninja-build/ninja/releases) 并且拷贝```ninja.exe```到CMake的bin目录
#### iOS
1. 确保已安装xcode12+和[cmake3.21+](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```
2021-07-09 10:42:36 +08:00
3. 生成xcode工程, 进入adxe根目录执行如下命令之一:
- for arm64:
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=arm64```
- for armv7,arm64 combined:
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake "-DCMAKE_OSX_ARCHITECTURES=armv7;arm64"```
- for simulator x86_64:
```cmake -S . -B build -GXcode -DCMAKE_TOOLCHAIN_FILE=cmake/ios.mini.cmake -DCMAKE_OSX_ARCHITECTURES=x86_64```
2020-08-24 16:26:12 +08:00
4. 之后就可以用xcode打开, 选择cpp-tests编译运行
### 注意
* ThreadLocalStorage线程本地存储
2021-05-18 16:51:46 +08:00
- ios x86 simulator ios>=10 and adxe no longer provide x86 libraries
- ios x64 or devices(armv7,arm64) ios sdk>=9.0
- the openal-soft maintained by kcat use TLS
### QQ交流群
2021-05-18 20:24:21 +08:00
点击链接加入群聊【Adxe 交流群】https://jq.qq.com/?_wv=1027&k=nvNmzOIY
### 参考链接
2020-08-30 00:28:20 +08:00
* official v4: https://gitee.com/mirrors/cocos2d-x
2022-02-25 11:24:27 +08:00
* Git快速手册: https://github.com/adxeproject/adxe/discussions/411
2021-05-26 14:46:15 +08:00
2021-06-26 17:13:05 +08:00
### adxe项目的活跃贡献者
2021-05-26 14:46:15 +08:00
- @halx99
- @rh101
- @aismann
- @weiwest