Cocos2d-x 3.0 official cmd create project and one-click Create Project

Source: Internet
Author: User

I have been studying the project for more than one hour.


First, you have to install vc2012 and download and unzip the cocos2d-x 3.0 official version, if not installed, please read my previous article.


Next we will download the android sdk and the ndk door: Click to open the link

Ant door: Click to open the link


After everything is ready, open setup. py in the cocos2d-x directory, enter the path as prompted, and restart your computer.


OK. Next, go to the topic


Enter cmd to open the console,


Enter cd your extract directory/cocos2d-x-3.0/tools/cocos2d-console/bin


Enter cocos new-p xxx. xxx. xxx-l cpp-d xxx

Explain
-P PACKAGE_NAME: package name
-L {cpp, lua, js} language
-D DIRECTORY Project SAVE path
-T TEMPLATE_NAME: Template Name

In this way, you can create your project under the saved path!


I wrote a bat to facilitate generation and share it with you.


1. Create a text file and paste the following content to it (you can write your own path name)


@ Echo off
D:
Cd D: cocos2d-x \ cocos2d-x-3.0 \ tools \ cocos2d-console \ bin
Set/p var1 = enter the project name (mygame ):
Set/p var2 = enter the package name (game. name. ver ):
Cocos new-p % var2 %-l cpp-d: \ cocos2d-x \ cocos2d-x-3.0 \ % var1 %
Pause


2. Save and change the txt suffix to bat.


OK!



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.