First, you need to download three files:
Android-ndk
Android-sdk
Ant
Download location: Because 3.0rc2 Runs setup. py to automatically search for the three files
The cmd of win32 is as follows:
(1): cmd to find the cocos2d-x 3.0rc directory, run the setup. py file:
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ Users \ Administrator>:
C: \ Users \ Administrator> e:
E :\> cd E: \ cocos3.0rc \ cocos2d-x-3.0rc2
E: \ cocos3.0rc \ cocos2d-x-3.0rc2> setup. py
Setting up cocos2d-x...
-> Check environment variable COCOS_CONSOLE_ROOT
-> Find environment variable COCOS_CONSOLE_ROOT...
-> Cococos_console_root is found: E: \ cocos3.0cr \ cocos2d-x-3.0rc1 \ tools/cocos2d
-Console/bin
-> Remove directory "E: \ cocos3.0cr \ cocos2d-x-3.0rc1 \ tools \ cocos2d-console \ bin"
From PATH!
-> Add directory "E: \ cocos3.0rc \ cocos2d-x-3.0rc2 \ tools \ cocos2d-console \ bin" int
O PATH succeed!
-> Force update environment variable COCOS_CONSOLE_ROOT
-> Succeed: COCOS_CONSOLE_ROOT = E: \ cocos3.0rc \ cocos2d-x-3.0rc2 \ tools \ cocos2d-
Console \ bin
-> Check environment variable NDK_ROOT
-> Find environment variable NDK_ROOT...
-> NDK_ROOT is found: E: \ android_NDK \ android-ndk-r9c
-> Check environment variable ANDROID_SDK_ROOT
-> Find environment variable ANDROID_SDK_ROOT...
-> ANDROID_SDK_ROOT is found: E: \ SDK_Eclipse \ adt-bundle-windows-x86-20131030
\ Sdk
-> Check environment variable ANT_ROOT
-> Find environment variable ANT_ROOT...
-> ANT_ROOT is found: E: \ apache-ant-1.9.3 \ bin
Please restart the terminal or restart computer to make added system variables t
Ake effect
E: \ cocos3.0rc \ cocos2d-x-3.0rc2>
You can create a project as follows: Super convenient:
Run cocos new directly (you must disable cmd and restart cmd before running cocos new)
Microsoft Windows [version 6.1.7601]
Copyright (c) 2009 Microsoft Corporation. All rights reserved.
C: \ Users \ Administrator> e:
E :\> cd E: \ cocos3.0rc \ cocos2d-x-3.0rc2
E: \ cocos3.0rc \ cocos2d-x-3.0rc2> cocos new
E: \ cocos3.0rc \ cocos2d-x-3.0rc2> python E: \ cocos3.0rc \ cocos2d-x-3.0rc2 \ tools \ cocos
2d-console \ bin \/cocos. py new
Runing command: new
Usage: cocos new [-h] [-p PACKAGE_NAME]-l {cpp, lua, js} [-d DIRECTORY]
[-T TEMPLATE_NAME] [-- no-native]
[PROJECT_NAME]
Cocos new: error: argument-l/-- language is required
E: \ cocos3.0rc \ cocos2d-x-3.0rc2>
Create a helloworld
Cocos new HelloWorld-p com.cocos2d.org-l cpp-d ~ /Text/code/
E: \ cocos3.0rc \ cocos2d-x-3.0rc2> python E: \ cocos3.0rc \ cocos2d-x-3.0rc2 \ tools \ cocos
2d-console \ bin \/cocos. py new HelloWorld-p com.cocos2d.org-l cpp-d ~ /Text/cod
E
Runing command: new
> Copy template into E: \ cocos3.0rc \ cocos2d-x-3.0rc2 \~ \ Text \ code \ HelloWorld
> Copying cocos2d-x files...
> Rename project name from 'hellocpp 'to 'helloworld'
> Replace the project name from 'hellocpp 'to 'helloworld'
> Replace the project package name from 'org. cocos2dx. hellocpp 'to 'com. cocos2d.
Org'
E: \ cocos3.0rc \ cocos2d-x-3.0rc2>
Next we will package the package to each platform with one click:
For example, android:
E: \ cocos3.0rc \ cocos22d-x 3.0rc2> cd ~ /Text/code/HelloWorld/
Is it more user-friendly than before .....