How the cocos2d-x-3.2 creates a new project

Source: Internet
Author: User

How the cocos2d-x-3.2 creates a new project

1. Run python commands in cocos2d-x-3.2 \

Python setup. py

// It is used to add the following paths to your user environment variables. Of course, you can also not add

COCOS_CONSOLE_ROOT = 'cocos _ CONSOLE_ROOT'
NDK_ROOT = 'ndk _ root'
ANDROID_SDK_ROOT = 'android _ SDK_ROOT'
ANT_ROOT = 'Ant _ root'

// If you have added COCOS_CONSOLE_ROOT = "COCOS_CONSOLE_ROOT" to your environment variable, that is, you have run

Setup. py


2. Run the following command directly.

Cocos new MyGame-p com. MyCompany. MyGame-l cpp-d e:/MyCompany

MyGame: name of your project
-P com. MyCompany. MyGame: package name for android
-L cpp: programming language used for the project, valid value is cppand lua
-D e:/MyCompany: directory to hold your project

Cocos under cocos2d-x-3.2alpha0 \ tools \ cocos2d-console \ bin

Congratulations! You have created a new project! You will find that this project is very large and 0.98 GB after compilation, because it also copies the engine. I think its advantage is to simplify the project configuration environment, that is to say, no matter who gets the project, they can run it and do not need to re-modify the configuration of the project. However, there are also disadvantages: each time a project is created, you have to re-compile the cocos2d library, but after the compilation, you can directly copy the government and enterprise projects and change the project name and name.

3. Create a new project Tool

CreateProject. bat

@ Echo off echo ================ Cocos2D-x new project ================== set/p name = Input project name: echo Project name: % name % echo is creating a new project... set pack = com. richard. cocos new % name %-p % pack % name %-l cpp echo created successfully. pause

You only need to enter the name of your project.




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.