Cocos2D-x upgrade

Source: Internet
Author: User

There is no Upgrade script in the installation script of the cocos2d-x. If we add the parameter:-f force installation when the new version is installed, it does not completely solve the problem. When creating a project, you can see that the version is old. After searching, I found some information on the Internet, but the problem was not completely solved after the operation. But I finally solved the problem. The following describes how to solve the problem:
1: First open the terminal and display the hidden file. In fact, I have not verified whether the file can be displayed before the operation.
Command for displaying Mac hidden files: defaults write com. apple. finder AppleShowAllFiles-bool true
 
Command for hiding Mac hidden files: defaults write com. apple. finder AppleShowAllFiles-bool false
 
Or
 
Command for displaying hidden Mac files: defaults write com. apple. finder AppleShowAllFiles YES
 
Command for hiding Mac hidden files: defaults write com. apple. finder AppleShowAllFiles NO
 
After the operation, click the rotten apple icon in the upper left corner, select "Force exit", select "Finder", and click "restart"
Enter the following command in the terminal: cd/Users/codeo4 [your user name]/Library/Developer/Xcode/Templates
Then remove the cocos2d-x: rm-rf cocos2d-x press Enter. Then it has been deleted, open xcode does not see the relevant cocos2d-x options. Deleted
 
Next we will reload it back. Go back to the terminal and first enter the root user
Su root
Enter the password
Go to the directory of the new version of the cocco2d-x to execute the installation command:
Sh install-templates-xcode.sh-f
You can see that there will be a lot of output text. One operation will delete the old database and copy the new file. But when we look at/Users/codeo4 [your username]/Library/Developer/Xcode/Templates, we don't see the folder for the cocos2d-x. What should I do? Just copy it. Run the following command:
Cp-R/var/root/Library/Developer/Xcode/Templates/cocos2d-x.
Okay, now I 've seen the option of cocos2d-x when I went to xcode to create a new project. Create a new project to see if it is normal.
The project is verified to be normal. Go to the libs/cocos2dx/cocos2d. cpp file of the project and check whether the returned version number is the version you just installed.
Here the cocos2d-x upgrade is complete. I hope this article will help you.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.