码迷,mamicode.com
首页 > 系统相关 > 详细

[Cocos2d-x v3.x]Mac OX 创建新的Cocos2d-x 3.0 项目

时间:2017-05-27 13:34:33      阅读:238      评论:0      收藏:0      [点我收藏+]

标签:mat   12px   mux   format   pen   pad   start   company   use   

文章内容来自于: http://cocos2d-x.org/wiki/How_to_Start_A_New_Cocos2D-X_Game

Mac OS X 10.9


Software Requirements

  • Xcode 4.6 (for iOS or Mac)
  • gcc 4.7 for Linux or Android. For Android ndk-r9 or newer is required.
  • Visual Studio 2012 (for Windows)
  • Python 2.7.5

Create A New Project


$ cd cocos2d-x
$ ./setup.py
$ source ~/.bash_profile # may be ~/.bash_login or ~/.profile, depends on your environemnt
$ cocos new MyGame -p com.MyCompany.MyGame -l cpp -d ~/MyCompany
  • MyGame: name of your project
  • -p com.MyCompany.MyGame: package name for android
  • -l cpp: programming language used for the project, valid value is cppand lua
  • -d ~/MyCompany: directory to hold your project
技术分享


Folder structure of the generated project is as following:

技术分享

(Note: The directory may be different when the project type is lua.)


Build And Run New Project

$ cocos run -s ~/MyCompany/MyGame -p ios
  • -s: directory of the new project. This could be an absolute path or a relative path.
  • -p: which platform to run on. Options are ios,android,win32,mac and linux.

(Note: You are a tmux user, you should add reattach-to-user-namespace before the command cocos. For more information, please refer to this link for more information.)

You can run cocos run --help for more detail information.

技术分享




[Cocos2d-x v3.x]Mac OX 创建新的Cocos2d-x 3.0 项目

标签:mat   12px   mux   format   pen   pad   start   company   use   

原文地址:http://www.cnblogs.com/clnchanpin/p/6912351.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!