转载自:http://www.cocoachina.com/gamedev/gameengine/2010/0413/1036.html
从 0.99.0 版本开始,Cocos2d-iPhone 的模板类要求苹果 SDK3.0,该版本的 SDK 需 要运行在 MacOS-10.5.7 版本上。请读者首先做好相关准备。
我们可以在 http://code.google.com/p/cocos2d-iphone/downloads/list 下载 Cocos2d-iPhone 的最新版,为了便亍我们在命令行工具(Terminal)中找到解压缩的路 径,我们将下载下来的压缩文件解压在 Documents 目录下。
打开 Terminal 工具(Application->Utilities->Terminal),通过“ls”命令列出当前目录,通过“cd documents”迚入 Documents,再迚入你下载的 Cocos2d-iPhone-0.99.0目录下,通过以下命令安装:(注意不要少了” ./”)./install_template.sh。
正常运行绋果如下图所示:
参考资料:http://www.cocos2d-iphone.org/forum/topic/5998
注意事项:
Hi,
I'm new to cocos2d and I can't seem to install the templates, I have the "cocos2d-iphone-0.99.2-rc" directory in my Library, but when I run "./install-templates.sh" in Terminal I get the error "This script must be run as root in order to copy templates to /Library/Application Support/Developer/Shared/Xcode"
Am I missing something?
Note: When sudo asks you for the password, youwon't actually see the password as you type it. It's for security purposes.
Just do:
sudo sh ./install-templates.sh
When it prompts you for the password (when Password: appears), just type it in and hit enter.
-robodude666
如果你给自己的 mac 设置了 admin 账户的话,
则需要将 -robodude666 改为自己 admin 账户的密码。