Cocos2d-x Application Wizard for Visual Studio User Guide

Version 15 (WenSheng Yang, 2011-03-15 01:14) → Version 16/23 (WenSheng Yang, 2011-03-15 01:20)

h1. Cocos2d-x Application Wizard for Visual Studio User Guide

{{>toc}}

h2. 0、 Overview

* *Cocos2d-win32's* and *Cocos2d-wophone's* project can be generated by wizard.
* Wizard support *Visual Studio 2008, Visual Studio 2010(0.8.0 or later), Visual C++2008 Express(0.8.0 or later), Visual C++ 2010 Express(0.8.0 or later)* .

h2. 1、 Frist of all, get cocos2d-x source code from github

* Source archive here: *[[Download]]*
* Source code repository here: *https://github.com/cocos2d/cocos2d-x*

p=. !cc_repository.PNG!

h2. 2、 Build Cocos2d-x Solution

h3. Win32

* Run *Build-win32.bat* script, that adapt vc2008 or vc2010 automatically, to build solution.
* Or open cocos2d-win32 sln file and build solution in IDE.
** The *cocos2d-win32.vc2008.sln* is the vc2008 solution for win32.
** The *cocos2d-win32.vc2010.sln* is the vc2010 solution for win32.

p=. !cc_build_solution.PNG!

* Confirm the binary target.(example with win32)
*# Cocos2d-win32 binary in the folder named Debug.win32 or Release.win32;
*# Cocos2d-wohone binary in PRJ_TG3\LIB\Win32Lib.

p=. !cc_build_folder.PNG!

* Run HelloWorld and tests(example with win32)

p=. | !cc_helloworld_win32.PNG! | !cc_tests_win32.PNG! |

h3. wophone

* If you want build cocos2d-x for wophone, should *install wophone sdk first* and place Cocos2d-x source code to wophone project directory.
** For wophone emulator: open *cocos2d-wophone.sln* and build solution.
** For wophone device: run *build-wophone.sh* script.



h2. 3、Install cocos2d-x application wizard to Micro Soft Visual C++ develop environment

* Run *install-templates-msvc.bat* to install cocos2d-x application wizard automatically.
** The script files for each msvc IDE in the directory: *(cocos2d-x source root director)\template\msvc\* .
** The script whose name with the suffix "Express" is used to install wizard for virsual c++ express version.

p=. !cc_setup_js.PNG!

* Confirm the success notification.

p=. !cc_setup_js_success.PNG!


h2. 4、Add New Application Project

p=. | !cc_add_new_project.PNG! | !cc_new_project_location.PNG! |
p=. !cc_new_project_feature.PNG!
p=. !cc_new_project_source.PNG!

h2. 5、 Build and Run New Cocos2d-x Project

p=. | !cc_new_project_binary.PNG! | !cc_new_project_run.PNG! |