"Cocos2d-x 3.0-js-mac Configuration Chapter"

Source: Internet
Author: User

First, Preparatory work

For the Windows configuration chapter, see

http://cn.cocos2d-x.org/tutorial/show?id=1396

1. Install Python

2. Download Android SDK Android

3. Download Android NDK

4. Download COCOS2D-JS 3.0 version, unzip, here Bo Master extracted to the Apache root directory (of course, you need to install the Apache configuration, here no longer say), this is because the people who used COCOS2D-HTML5 know that If you want to use the browser to see the effect, you need to put in the server root directory, if you do not want to view the browser, can be extracted anywhere,

Mac version comes with Apache

launch Apache

Open terminal (terminal), enter sudo apachectl-v, (you may need to enter the machine secret). The Apache version is shown below

You can try it yourself.

In the root directory, under/library/webserver/documents/, this is the default root directory of Apache.

Tool Download: "Cocos2d-x environment Configuration-mac Configuration" There are

Second, add environment variables

Open the terminal configuration environment variable and enter the following command:

Vim ~/.bash_profile
Export path= $PATH:/users/Yourmacname/adtformac/sdk/Tools?export PATH= $PATH:/users/Yourmacname/adtformac/sdk/platform-Tools?export PATH= $PATH:/users/Yourmacname/android-ndk-r9b/? Export Android_ndk_root=/users/Yourmacname/android-ndk-r9b/? Export Android_sdk_root=/users/Yourmacname/adtformac/Sdk?export Ndk_root=/users/Yourmacname/android-ndk-r9b/# ADD environment variable cocos_console_root for Cocos2d-xexport cocos_console_root=/library/webserver/documents /cocos2d-js-v3.0-rc2/tools/cocos2d-console/binexport path= $COCOS _console_root: $PATH # ADD environment variable ANT_ ROOT for Cocos2d-xexport Ant_root=/users/yourmacname/apache-ant-1.9.3/bin

Add changes such as the upper path; The red part must be highlighted! The first one is placed under Apache, and the second ant address must be added/bin.

If all is configured successfully, OK, finally can install;

Open the setup.py in the COCOSJS directory;

If the above configuration is not wrong, here is a flash, if there is a misconfiguration, it will be stuck;

Install through!

New Hello-l JS

Create a Project!

Successful creation will generate a project folder corresponding to "Hello" in the cocos2d-js-v3.0 root directory

Open Safari input corresponding path http://localhost/cocos2d-js-v3.0-rc2/hello/

You can see the following screen:

"Cocos2d-x 3.0-js-mac Configuration Chapter"

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.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.