Environment
XCode Version 5.1
Cocos2d-x 3.0
MacOS 10.9
1. Unzip the cocos2d-x to the folder
> Unzip cocos2d-x-3.0.zip
2. Go to the cocos2d-x home directory
> Cd cocos2d-x-3.0
3. Run the installation script
> Sudo setup. py
4. After installation, the system will prompt "***** source *****", indicating that the environment variable to be automatically written will take effect immediately. Simply restart the terminal without worrying about it.
5. Go to generate a project template and run the following command:
> Cocos new DemoGame-p com. MyCompany. DemoGame-l cpp-d ~ /MyCompany
The following prompt appears:
Runing command: new
> Copy template into/Users/lixin/MyCompany/DemoGame
> Copying cocos2d-x files...
> Rename project name from 'hellocpp 'to 'demogame'
> Replace the project name from 'hellocpp 'to 'demogame'
> Replace the project package name from 'org. cocos2dx. hellocpp 'to 'com. MyCompany. DemoGame'
-P package name
-L language Programming language
-D dir is the directory of the project to be generated
After the template is installed, go to the specified project directory and open the project file to edit it.
Note:
You may not be able to edit the project template.
Solution:
Click to enter
Product-scheme-manage scheme
Click
Autocreate scheme now
Click
OK
The project you created will appear, and you can compile and run it.
How to Adapt Cocos2d to Android
Cocos2d basics and basic functions
Pomelo traps 1: Cocos2dx cannot connect to the server using libpomelo
New Milestone: Cocos2d-x v3.0 official version released!
This article permanently updates the link address: