COCOS2D Learning Notes 2--cocos command-line directives use

Source: Internet
Author: User

After setting up the COCOS2DX environment, you can use the Cocos directive to create a new COCOS2DX project, compile and run the COCOS2DX project, etc.

    • Let's take a look at the cocos2dx-3.x version of the directory.

    • Under this directory, hold down the SHIFT key while you right-click, hold shift+ right mouse button, click here to open the Command window.

    • In the command window that opens, enter the COCOS-HELP directive to see all relevant instructions for cocos, such as compiling the directive compile, creating the project Directive new, and so on.
    • Enter Cocos Compile-help to see all parameters and Parameters used in the compilation instructions.
    • Other Cocos directives can use similar methods to view specific parameters that are available, such as using Cocos new-help to view all the parameters that are available for creating COCOS2DX projects.

    • Creating an item with the new command now, you need to put and in the COCOS2DX project directory first.
    • If you have already done this, you will not have to execute the 2 files.

Using Cocos new to create a project, you can refer to the usage in Cocos new-help. More parameters are used as follows:

-P is the package name
-L is a file format with CPP, LUA, JS
-D is the storage path for the new project
Basically, that's all we need.
Enter Cocos new project name –P package name –l cpp–d Path Enter is created successfully for example:

After successful, find this project

    • Use the Cocos Compile command to compile the generated hellomytest to build the APK. Note: The previous path is the path to the current project.

After success, you can see

    • You can also use the same Cocos compile directive to generate the APK for the test case that comes with the engine.

After success, look at the APK build path.

COCOS2D Learning Notes 2--cocos command-line directives use

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: 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.