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.