install cocos2d for xcode4
I download cocos2d iphone 1.0.0 and cocos2d 1.0.0 beta template for xcode4 and i want use开发者_如何学运维 cocos2d in xcode4.
How to install it ?
Take your folder that you downloaded and go to:
Macintosh HD => Developer => Library => Xcode => Templates
Just drop the folder into this templates folder, restart xcode, and you should be good to go!
Hope this helped!
Download Cocos 2D from 1) download Cocos2D
2) unzip the file
3)Open a Terminal Window Application-> Utilities-> Terminal
4)Type cd drag and drop the cocos2D unzipped file.
5) Type sudo drag and drop 'install-templates.sh' file from the downloaded file.
6) Type your password
7) Restart the Xcode then You work with Cocos 2D
1-open cocos2d folder
2-open terminal window
3-type: sudo
4-and drag and drop file:install-templates.sh (cocos2d) folder and return
start xcode and new project
If still aries the same problem then following code remove into the script and put all things put into the following path and remove following code into the script.
Path where to put all stuffs
Macintosh HD => Developer => Library => Xcode => Templates
Remove those code into script
# Make sure root is not executed
if [[ "$(id -u)" != "0" ]]; then
echo ""
echo "Error: Do not run this script as root." 1>&2
echo ""
echo "'root' is no longer supported" 1>&2
echo ""
echo "RECOMMENDED WAY:" 1>&2
echo " $0 -f" 1>&2
echo ""
exit 1
Then save the install-templates.sh
and then follow following steps.
1)Open a Terminal Window Application-> Utilities-> Terminal
2)Type cd drag and drop the cocos2D unzipped file.
3) Type sudo drag and drop 'install-templates.sh' file from the downloaded file.
3) Type your password
4) Restart the Xcode then You work with Cocos 2D
it's funny but solve my problem.
I was having trouble with this and nothing above worked, I kept getting "No such file or directory"
.
What worked for me was to cd
into the cocos2d
folder that I had unzipped onto my desktop like this:
cd Desktop/cocos2d-iphone-2.0/
I then ran the install command shell script like so:
./install-templates.sh
Bingo! Its in! Hope this helps someone.
精彩评论