当前位置:网站首页>统信UOS下配置安装cocos2dx开发环境
统信UOS下配置安装cocos2dx开发环境
2022-07-25 19:44:00 【三雷科技】
linux下配置安装cocos2dx
环境说明
python2.7
操作系统:UOS
查看python 版本
python -V
一、 JAVA环境安装
- 下载安装软件
wget https://repo.huaweicloud.com/java/jdk/8u151-b12/jdk-8u151-linux-x64.tar.gz
- 解压缩包
sudo tar -zxvf jdk-8u151-linux-x64.tar.gz -C /usr/local/
- 文件重命名
sudo mv /usr/local/jdk1.8.0_151 /usr/local/jdk1.8
- 配置环境变量
sudo vim /etc/profile
配置内容如下:
export JAVA_HOME=/usr/local/jdk1.8
export PATH=$JAVA_HOME/bin:$PATH
export CLASSPATH=.:$JAVA_HOME/lib/dt.jar:$JAVA_HOME/lib/tools.jar
- 刷新环境变量
source /etc/profile
- 测试安装结果
java -version
javac -version
二、NDK下载路径
https://developer.android.com/ndk/downloads
https://dl.google.com/android/repository/android-ndk-r25-linux.zip
unzip android-ndk-r25-linux.zip
sudo mv android-ndk-r25 /usr/local/
配置环境变量
export ANDROID_NDK_ROOT=/usr/local/android-ndk-r25
export NDK_ROOT="$ANDROID_NDK_ROOT"
三、 Android SDK 下载与配置
官网
https://www.androiddevtools.cn/
- 下载
https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
- 解压
tar -xvf android-sdk_r24.4.1-linux.tar -C /usr/local/
- 配置
vim /etr/profile
# 内容如下:
export ANDROID_HOME="~/.android"
export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux/
四、 编译cocos2dx
- 下载源码
git clone https://github.com/cocos2d/cocos2d-x.git
cd cocos2d-x
python download-deps.py
- 同步子模块
如果出现失败,那么就自己同步吧
git submodule update --init
cocos2d-console子模块
cd tools
git clone [email protected]:cocos2d/cocos2d-console.git
cd tools
git clone [email protected]:cocos2d/bindings-generator.git
cd tests/cpp-tests/Resources/
git clone [email protected]:dumganhar/ccs-res.git
- 编译cocos2dx
- 下载依赖
cd cocos2d-x
bash install-deps-linux.sh
- 编译
cd cocos2d-x
mkdir build
cd build
cmake ..
make -j16
五、构建新项目
- 新建项目。
该项目是直接复制模板项目然后进行更名的。
cd tools/cocos2d-console
./cocos new TurnGoldCoin -l cpp -p org.arv000.turngoldcoin -d TurnGoldCoin
- 编译项目
cd TurnGoldCoin/TurnGoldCoin
mkdir build
cd build
cmake ..
make -j16
边栏推荐
- Solve the problem that the win10 account has no administrator rights
- 网络数据包多层传输演示
- [artifact] screenshot + mapping tool snipaste
- Bash does not add single quotes to your string
- 一元函数积分学_分部积分法
- YOLOv7论文部分解读【含自己的理解】
- Global configuration and page configuration of wechat applet development
- Wxss template style and WXS scripting language for wechat applet development
- GBASE 8s UDR内存管理_03_mi_realloc
- Empire CMS whole station | mobile number /qq lianghao mall source code | suitable for mobile terminal
猜你喜欢

YOLOv7论文部分解读【含自己的理解】
![[server data recovery] a data recovery case of a brand ProLiant server raid paralysis, database file loss, and database file backup damage](/img/89/92ace2f76beefd258d00d26cd921c9.png)
[server data recovery] a data recovery case of a brand ProLiant server raid paralysis, database file loss, and database file backup damage

Creative drop-down multi choice JS plug-in download

Add a subtitle of 3D effect to the container

Research and application of servo driver in robot

919. Complete binary tree inserter

Skiing mobile H5 game source code download

The JS paging plug-in supports tables, lists, text, and images

【神器】截图+贴图工具 Snipaste

打印数据库返回的查询数据是null,或者是默认值。与数据库返回的值不相符
随机推荐
Why learn service grid istio
Website construction of information exchange platform for China Africa South South cooperation based on PHP
Univariate function integration_ Partial integral method
连接数据库警告 Establishing SSL connection without server‘s identity verification is not recommended.
Bash does not add single quotes to your string
Wxss template style and WXS scripting language for wechat applet development
what is qml in qt
VMware virtual machine download, installation and use tutorial
How to get started quickly in software testing
[wp]ctfshow-web入门-爆破
The JS paging plug-in supports tables, lists, text, and images
[CSAPP Practice Problem 2.32] tsub_ OK (int x, int y) judge whether complement subtraction overflows
Wechat applet 10 - wechat template
sentinel简单限流和降级demo问题记录
滑雪手机端H5小游戏源码下载
tiktok手机网络环境怎么设置?tiktok怎么破播放量?
KCon 2022 亮点及议程大揭秘!
Grid layout frequently asked interview questions
高数_第3章重积分 学习体会与总结
Is there a "fingerprint" in the structure of AAAI 2022 | Gan? Generating network structure from forged image traceability