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)