First, you need to download three files: per room
Android-ndk
Android-sdk
Ant
Download the location can be arbitrary: because 3.0RC2 execution setup.py own actively search these three files
Win32cmd below:
(1): cmd find cocos2d-x 3.0rc folder, execute setup.py file:
Microsoft Windows [version number 6.1.7601]
Copyright (c) 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 ...
->cocos_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
Restart the terminal or restart computer to make added system variables t
Ake effect
E:\cocos3.0rc\cocos2d-x-3.0rc2>
Here's how to create Project: Super easy:
Execute Cocos New directly (you must close cmd before executing Cocos new and start cmd again)
Microsoft Windows [version number 6.1.7601]
Copyright (c) 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>
Below we will 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>
Here's a one-click package to each platform:
such as the Android platform:
E:\cocos3.0rc\cocos22d-x 3.0rc2> CD ~/text/code/helloworld/
is not more humane than once .....
Copyright notice: This article Bo Master original article. Blog, not reproduced without consent.
Cocos2d-x 3.0RC2 Important platform for each package execution (super convenient)