Cocos2d-x v3.1 installation graphic tutorial (2)
If we need to run on the Android platform, we must install the android SDK. If we only want to run on the window, we only need to install Cocos2d-x. Of course, if you want to run it on apple, you must install its xcode, because it will not be used in future studies related to the Apple platform, so in future articles, we will not introduce apple-related things (no device ).
Package download
1. Download Cocos2d-x engine and related software (contains Cocos2d-Console)
Engine and cocostudio: http://cocos2d-x.org/download
2. Download Android-Related Development kits and development environments
ADT: http://developer.android.com/tools/sdk/eclipse-adt.html
Ndk: https://developer.android.com/tools/sdk/ndk/index.html
Ant: http://ant.apache.org/
3. Download Python
: Https://www.python.org/
All downloaded packages, such:
Installation Steps
1. Install Python first, which is the same as installing common software.
2. Unzip the Cocos2d-x, Adt, ndk, and ant to the specified directory (the local directory is in D: \ Cocos)
Decompressed directory structure, such:
3. Open the command line tool (CMD) and go to the Coco2d-x directory (local directory in D: \ Cocos \ cocos2d-x-3.1.1)
4. Enter setup. py. At this time, the Python script will go back and check the dependent 4 environment variables,
First environment variable: cocos_console_root. This environment variable is used to specify the directory of our Cocos-console tool set.
The second environment variable: ndk_root, androidndk Directory, which is the ndk directory we extracted above
The third environment variable: android_sdk_root, the Directory of androidsdk, that is, the SDK directory in the corresponding ADT.
Fourth environment variable: ant_root, ant directory, the ant directory extracted above
For example:
The four environment variables have been set on my computer.
If you have not set the directories we just extracted to the corresponding environment variables as prompted, as shown in:
Local Directory: D: \ Cocos \ android-ndk-r9d
The local directory is: D: \ Cocos \ adt-bundle-windows-x86 \ SDK
Local Directory: D: \ Cocos \ apache-ant-1.9.4 \ bin
We only need to set three environment variables, which will be automatically set by cocos_console_root.
PS: I don't know why I can't set it manually through setup. py. I suggest you finish setting it and check your environment variables.
Note: The current Cocos2d-x version is v3.1.1, cocostudio version is v1.4.0.1