文章内容来自于: 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.

最新文章

  1. ACM/ICPC 之 拓扑排序+DFS(POJ1128(ZOJ1083)-POJ1270)
  2. JavaScript调Java
  3. LeetCode 6 ZigZag Conversion(规律)
  4. 分享git的常用命令
  5. form 转json,将form表单中的数据序列化数组后转换为Json
  6. BIP_开发案例03_将原有Report Builer报表全部转为XML Publisher形式(案例)
  7. linux ps命令(转载)
  8. ASP.NET Core中使用Razor视图引擎渲染视图为字符串
  9. JSF简单介绍
  10. 记录一个php强制下载文件函数
  11. JDK动态代理机制
  12. Unity3d/2d手机游戏开发第二版 (金玺曾) 随书资源
  13. C语言写单链表的创建、释放、追加(即总是在最后的位置增加节点)
  14. Eclipse配置tomcat程序发布到哪里去了?
  15. [bzoj4923]K小值查询
  16. python开发流程及项目目录规范
  17. github Permission denied (publickey). fatal: Could not read from remote repository.
  18. JDK线程池的拒绝策略
  19. Leetcode--136. Single Number(easy)
  20. 自动换行后缩进怎么做(CSS)?(可用于 Li y 元素的排版)

热门文章

  1. ACM_ZHANGZHANG喜欢手表
  2. ACM_滚动AC
  3. ACM_“打老虎”的背后(简单并查集)
  4. python--9、并发之多进程应用
  5. 移动web——媒体查询
  6. 六时出行 App iOS隐私政策
  7. THREE.js代码备份——webgl - scene animation(通过加载json文件来加载动画和模型)
  8. (转)分布式文件存储FastDFS(四)配置fastdfs-apache-module
  9. input按钮的事件处理大全
  10. git 缓存密码导致的不能和远程仓库交互unable to access... 403错误