How to create a new project for windows8 metro

This is a tutorial on how to setup Cocos2dx-win8 for Windows 8 and create a HelloWorld project

Setup enviroment

  • OS: Windows 8 consumer preview (8250 build)
  • IDE: Visual Studio 2011 beta

Suppose them were all default installed.

Get engine code

Suppose we put it on the "d:\cocos2dx-win8"

Create HelloWorld project

Install VS project template

  • click "d:\cocos2dx-win8\Cocos2dx-win8-vs2011-Template.vsi" to install.

Create project

1. Open vs2011, Click menu: File->New->Project..
2. Choose Templates->Visual C++-> Windows Metro style, select the Cocos2d template to create project like followed snapshot:

Here,we create at "d:\Projects\"

3. You may see followed snapshot, just click OK and Close vs2011.

4. copy "d:\cocos2dx-win8\CreateProject.bat" to "d:\Projects\helloworld-cocos2d"

5. Edit CreateProject.bat,set appropriate variable

        set PROJECT_NAME=helloworld-cocos2d
        set COCOS2D_DIR=d:\cocos2dx-win8
        set PROJECT_DIR=d:\Projects\helloworld-cocos2d

6. Run CreateProject.bat

7. Open helloworld-cocos2d.sln and add "d:\Projects\helloworld-cocos2d\helloworld-cocos2d\helloworld-cocos2d.vcxproj" into.

8. Done!

add_project_into.png (42 kB) hex lee, 2012-05-18 05:58

op_OK.png (7.6 kB) hex lee, 2012-05-18 06:00

new.PNG (55.8 kB) hex lee, 2012-05-18 06:01

final.png (12 kB) hex lee, 2012-05-18 06:02