Cocos2d-x Installation tutorial for Mac (Xcode)

Source: Internet
Author: User

Cocos2d The v3.x version comes out, from the configuration installation to the creation of the project is the command line, the following simple to say.

1. http://cn.cocos2d-x.org/download/ (although not marked for Mac but pro-test can be tried, do not go to https://code.google.com/p/cocos2d-x/ Downloads Download, if want to go here to download, also can. ) (currently the latest version 3.6 331M or so)

2. After the download is complete, open the terminal and go to the corresponding folder.

For example, my:

cd/users/apple/desktop/colin/cocos2d-x/cocos2d-x-3.3/


Re-execute

./setup.py

As follows:

There will be several queries during the installation of the Android SDK path, not setting the Android direct enter skip

->please enter the path of Ndk_root (or press ENTER to skip):->please Enter the path of Android_sdk_root (or press Enter to skip):->please Enter the path of Ant_root (or press ENTER to skip):


After that OK, there will be a hint:

Please execute command: "Source/users/apple/.bash_profile" to make added system variables take effect

Just follow the input source/users/apple/.bash_profile.

3. Preparing to create a project

Enter the specified folder. For example, my:

cd/users/apple/desktop/colin/cocos2d-x/cocos2d-x-3.3/tools/cocos2d-console/bin/


If the first two steps are followed, enter the CD Tools/cocos2d-console/bin directly. (because it is currently in the cocos2d-x-3.3 directory)

You can then use the following command:

Cocos new project name-P package name-L language-D destination folder

For example, my:

./cocos new Helloworld-p com.history.helloworld-l cpp-d/users/apple/desktop/colin/cocos2d-x/workspace
The phrase is to create a new project because the project was created, and it was installed after Xcode was run.


As for the path problem: On version 3.6 is users/jerry/downloads/cocos2d-x-3.6/tools/cocos2d-console/bin/s/apple/desktop/colin/ Cocos2d-x/workspace/helloworld/proj.ios_mac/helloworld.xcodeproj

I make the red is Cocos2d-x's own relative path, the front plus your own extracted folder path can be.

The project is then created under the corresponding path.

After the run, it's OK.

Cocos2d-x Installation tutorial for Mac (Xcode)

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.