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
- git(optional): msysgit "TortoistGit": http://code.google.com/p/tortoisegit/
Suppose them were all default installed.
Get engine code¶
- From github: git clone https://github.com/cocos2d-x/cocos2dx-win8
or
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!