MacBook Pro (Retina,13-inch,MID 2014)
2.6 GHz Intel Core i5
8 GB 1600 MHz DDR3
Xcode Version 6.3.2 (6D2105)
Python 2.7.9 (v2.7.9:648dcafa7e5f,Dec 10 2014,10:10:46)
[GCC 4.2.1 (Apple Inc. build 5666) (dot 3)] on darwin
下载最新cocos2d-x:
http://www.cocos2d-x.org/filedown/cocos2d-x-3.6.zip
解压到任意目录
用 Terminal 进入 /cocos2d-x-3.6/tools/cocos2d-console/bin 目录下,
CBD-MBP:bin baodong$ lsCBD-MBP:bin baodong$ pwd/Users/baodong/__TEST__/cocos2d-x-3.6/tools/cocos2d-console/binCBD-MBP:bin baodong$ ls -a. cocos.bat cocos2d.ini cocos_stat.py.. cocos.py cocos_project.py cocos_stat.pyccocos cocos.pyc cocos_project.pyc install.py
查看帮助文档
CBD-MBP:bin baodong$ python cocos.py new --helpusage: cocos new [-h] [-p PACKAGE_name] -l {cpp,lua,Js} [-d DIRECTORY] [-t TEMPLATE_name] [--ios-bundleID IOS_BUNDLEID] [--mac-bundleID MAC_BUNDLEID] [-e ENGINE_PATH] [--portrait] [--no-native] [PROJECT_name]Creates a new projectpositional arguments: PROJECT_name Set the project nameoptional arguments: -h,--help show this help message and exit -p PACKAGE_name,--package PACKAGE_name Set a package name for project -l {cpp,Js},--language {cpp,Js} Major programming language you want to use,should be [cpp | lua | Js] -d DIRECTORY,--directory DIRECTORY Set generate project directory for project -t TEMPLATE_name,--template TEMPLATE_name Set the template name you want create from --ios-bundleID IOS_BUNDLEID Set a bundle ID for ios project --mac-bundleID MAC_BUNDLEID Set a bundle ID for mac project -e ENGINE_PATH,--engine-path ENGINE_PATH Set the path of cocos2d-x/cocos2d-Js engine --portrait Set the project be portrait.lua/Js project arguments: --no-native No native support.正式创建项目:
python cocos.py new -p cf.icbd.www -l cpp -d /Users/baodong/__TEST__/Cocos_TEST HelloCC
参数解释:
-p 包名
-l 项目所用语言『Cpp/Lua/JavaScript』
-d 项目存放路径
最后跟新项目名称
进入 HelloCC/proj.ios_mac 目录
CBD-MBP:proj.ios_mac baodong$ ls -a. .DS_Store ios.. HelloCC.xcodeproj mac
用Xcode点击打开 HelloCC.xcodeproj
直接点击左上角运行即可。
速度比windows下速度快不少,几十秒内编译完成,自动启动模拟器。
以上是内存溢出为你收集整理的Cocos2d-x 3.6 新建项目全部内容,希望文章能够帮你解决Cocos2d-x 3.6 新建项目所遇到的程序开发问题。
如果觉得内存溢出网站内容还不错,欢迎将内存溢出网站推荐给程序员好友。
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)