Window 7 (64-bit) configuring the cocos2d-x-3.6 environment

Source: Internet
Author: User

Label:

1, go to cocos2d-x official website Download 3.6 version of the compressed package, extracted to an English path.
2. Download and install the following software (specific software self-Baidu):

(1) Visual Studio2012 or 2013

(2) Install Java 1.6 or more

(3) Eclipse with Android ADT (adt-bundle-windows-x86_64-20140702)

(4) Python 2.7.5 (https://www.python.org/downloads/)

(5) ANT 1.9.4 (http://ant.apache.org/bindownload.cgi)

(6) NDK (this download is up-to-date, http://developer.android.com/tools/sdk/ndk/index.html)


3. Configure the environment variables as follows:

(1) Tool path for adding Android SDK to user environment variables (or system environment variables): Adt_root

than the author's path is: E:\adt-bundle-windows-x86_64-20140702\sdk\platform-tools

(2) Add environment variable: android_sdk_root, such as: E:\ADT-BUNDLE-WINDOWS-X86_64-20140702\SDK

(3) Add environment variable: ant_root, such as: D:\develop_software\apache-ant-1.9.4\bin

(4) Add Java environment variable: CLASSPATH, such as:.;

Add JAVA Environment variables: java_home, such as: C:\Program files\java\jdk1.7.0_60

(5) environment variable for adding NDK path: ndk_root, such as: D:\develop_software\android-ndk-r10d

(6) Add PYTHON's Environment path: Python_root, such as: D:\develop_software\Python27

(7) Add cocos2d-x Environment path: cocos_root, such as: D:\develop_software\cocos2d-x-3.6\tools\cocos2d-console\bin

(8) Finally, in the environment variable path, the above environment variables are all added, such as:

%java_home%\bin;%java_home%\jre\bin;%ant_root%;%cocos_root%;%adt_root%;%python_root%;%android_sdk_root%;%ndk_ root%;


4. Command line to create the Cocos2d-x 3.6 project:

(1) Create the syntax for the project:Cocos New<gamename>- P<packageidentifier>- L<language>- D<location >

The first one is: Game project name

The second one is: package name

The third one is: development language (can be: CPP, LUA, JS)

The fourth one is: the path of the project storage

Example: Open cmd, input: Cocos new helloworld-p com.test.helloworld-l cpp-d D:\cocos2dx_projects

5, running Win32 platform under the HelloWorld project

(1) Go to path: D:\cocos2dx_projects\HelloWorld\proj.win32

(2) Double-click Open:HelloWorld. sln to automatically open the visual Studio2013

6. Configuring and running the Android platform HelloWorld Project

(1) Open Eclipse and import the HelloWorld project created above, in the Proj.android directory of the project directory

(2) then copy the code under the Cocos2d-x installation path (the author's path is:D:\develop_software\cocos2d-x-3.6\cocos\platform\android\java\ SRC) into the project, such as:

The red circle in the figure is the code added to the project (note that the package name is consistent with this).

(3) If the Cocos2d-x installation path and the path created by the project are under the same partition, then there is no need to do a second step, since the project is already referenced by default for the Cocos2d Android project that was created.

(4) Open cmd, enter the HelloWorld project Proj.android directory, such as: CD D:\cocos2dx_projects\HelloWorld\proj.android.

Then enter: build_native.py to compile the C + + source files (each new project must be compiled once).

Finally, after the completion of the compilation, directly connected to the 2.3 system or more of the real machine test (if you want to test the simulator, the simulator system must be more than 4.03).

Here the effect is not affixed, the night turned off the lights, more mosquitoes, can not stand.




Window 7 (64-bit) configuring the cocos2d-x-3.6 environment

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

Tags Index: