python2.7
操作系统:UOS
查看python 版本
python -V
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
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"
官网
https://www.androiddevtools.cn/
https://dl.google.com/android/android-sdk_r24.4.1-linux.tgz
sudo tar -xvf android-sdk_r24.4.1-linux.tgz -C /usr/local/
sudo vim /etc/profile
# 内容如下:
export ANDROID_HOME="~/.android"
export ANDROID_SDK_ROOT=/usr/local/android-sdk-linux/
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
cd cocos2d-x
bash install-deps-linux.sh
sudo apt install cmake
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