cocos2d-x 2.2后采用python 创建工程,废弃了模板
当前测试版本为cocos2d-2.0-x-2.0.4;
我们在源码中找到install-templates-xcode.sh这个shell(mac下的批处理)文件
进入终端一系列命令进入刚才的文件夹,然后使用下面的命令
sudo ./install-templates-xcode.sh
然后需要输入mac的密码
123deMacBook-Pro:cocos2d-2.0-x-2.0.4 a123$ sudo ./install-templates-xcode.sh
WARNING: Improper use of the sudo command could lead to data loss
or the deletion of important system files. Please double-check your
typing when using sudo. Type "man sudo" for more information.
To proceed, enter your password, or type Ctrl-C to abort.
Password:
cocos2d-x template installer
Installing Xcode 4 cocos2d-x iOS template
----------------------------------------------------
...creating destination directory: /Users/a123/Library/Developer/Xcode/Templates/cocos2d-x/
...copying cocos2d files
...copying CocosDenshion files
...copying extension files
...copying template files
done!
Installing Xcode 4 Chipmunk iOS template
----------------------------------------------------
...copying Chipmunk files
done!
Installing Xcode 4 Box2d iOS template
----------------------------------------------------
...copying Box2D files
done!
Installing Xcode 4 lua iOS template
----------------------------------------------------
...copying lua files
done!
Installing Xcode 4 JS iOS template
----------------------------------------------------
...copying js files
done!
...copying spidermonkey files
done!
done!
安装模板成功,之后你就只需要打开xcode创建工程就可以看到cocos2d-x的选项了