cocos2d-x-2.2.4 Building Windows environment Software requirements
Windows systems (Windows7 or later systems);
cocos2d-x-2.2.4 compressed Package ;
Python installation package (2.7.3 version recommended);
Text editing tools (not recommended for use with text documents, notepad++ or UE, etc.);
Visual Studio 2010 or later
Start the Environment Build install Visual Studio (hereinafter referred to as VS) install run cocos2d-x-2.2.4 (hereinafter referred to as COCOS2DX)
Unzip the cocos2d-x-2.2.4 package to the specified disk directory (the directory path is best not to use Chinese , the folder name in the directory path is simple and straightforward ). The extracted files are as follows:
To run the engine's own project, select the SLn file corresponding to the VS version, as shown in:
You can see some sample projects and library artifacts from the engine that are available in the VS Solution Explorer, as shown in:
By default, Libbox2d is selected as the Startup project, where we set Hellocpp as the startup project. The steps are as follows:
Select "Hellocpp" à click the right mouse button à select "Set as Startup Project". As shown in the following:
Open the "Hellocpp" project folder, Structure:
To run the "Hellocpp" project:
Click on the "Local Windows Debugger" button and wait a moment to see the "Hellocpp" Project Running interface:
Here, the cocos2d-x-2.2.4 installation runs basically complete.
Create COCOS2DX Project
First, install Python to the specified disk directory. After the installation is complete, configure the Python environment variable in the environment variable of the computer.
Create a new system environment variable named Pythn_home (the name can be arbitrarily taken ), and the value is Python's installation disk directory. The python_home is then added to the path (added to the value of path ;%python_home%; Just fine).
After the installation is configured for Python, you can test the installation success in a command prompt window. Run the Command Prompt window, enter Python, and the output looks like this:
Indicates that Python has been installed successfully.
Go back to the COCOS2DX installation directory and go to the project-creator directory under tools . Create a text document using the text Editing tool in the directory, filled with "python create_project.py-project%~n0%-packagedemo.cocos2dx.game-language CPP, Save as a. bat file or a. cmd file. :
. Bat The name of the file is the name of the project that will be created, so creating the project only requires copying the changes . Bat the name of the file is just fine.
Double-clicking the. bat file will automatically create a projects folder in the cocos2dx root directory , where projects is the project folder you just created.
This will just double-click the project created by the. bat file:
The directory structure of the project is as follows:
At this point, you can create your own COCOS2DX project through the *.bat file.
It's good to choose different proj.xx folders for different platforms.
ccos2d-x-2.2.4 build Windows compilation run environment finished.
(1) cocos2d-x-2.2.4 Build Windows Development environment