Cocos2d-x with Cross-Studio Visual Studio 2015 Tools

How to configure Cocos2d-x (3.7) to work with the new Cross-Platform tools for Visual Studio 2015 for Android and iOS? This is relatively new, and documentation, in addition to the simplest project, is scarce. I have Cocos2d-x and several SDKBOX plugins, and I cannot create anything in Visual Studio.

Vote here for a sample. https://code.msdn.microsoft.com/site/requests/Cocos2d-x-e34be78c?ShowSubmitLinkForm=False

+5
source share
4 answers

This link seems to contain an explanation and some examples (i.e. links to other git repositories). I followed the instructions below and was able to run the x86 executable on my development system (64 bit did not work). I have not tested Android or iOS projects.

I quoted the start of the link, the rest of the page explains some details about the generated code.

Beginning of work

Make sure you have Windows 10 installed. If you cannot install it on your main machine, you can configure the virtual machine on Windows 10 to develop Cocos2d-x.

Download and install Microsoft Visual Studio. Make sure that Universal Application Development Tools for Windows is selected from the list of additional features that are required for UWP development. Cocos image 1

Install Python 2.7.x

Add c: \ Python27 to the path environment setup

I think I have the correct python installation with the visual studio 2015 community version, which is automatically added to the path.

Clone the Cocos2d-x repo [ https://github.com/cocos2d/cocos2d-x] and follow the steps described in the corresponding readme file (download-deps.py and git update the -init submodule)

Instead of cloning the git repository, I actually downloaded cocos2d-x-3.8.1.zip from the website, while this seems to work. I used the following commands in the folder where I was unpacking.

python download-deps.py python setup.py 

Like I said, I did not check the Android and / or iOS projects that were generated.

Open a command prompt and use the command:

 cocos new myWin10Game -l cpp -d projects 

NB: after this generation step, the query told me that I needed to change some things in Android and iOS projects.

Go to the proj.win10 folder and open the solution. In this example, it will be myWin10Game.sln.

+1
source
The Chinese guy did it. I tried, but donโ€™t know how to add the source code to VS 2015 (in fact, he mentioned the module โ€œproj.win10" ???). Here's the link: http://blog.csdn.net/emcodelin/article/details/47956919

Here is a section that interests you (from google translate).

Use Visual Studio 2015 debugger Android platform Cocos2d-x C ++ code

0
source

This question is a little old, but if someone gets into the search results, now there is a Visual Studio project for target Android devices with Cocos2d-x. It does not integrate with the cocos template system, so it must be currently updated in the coconut version. This is currently for VS 2015 Update 3 and Cocos 3.12.

https://blogs.msdn.microsoft.com/vcblog/2016/07/12/cocos2d-x-visual-studio-android-project/

I designed it, so feel free to ping any questions in my opinion.

0
source

Do you still need at least Mac access with Xcode?

Currently, the entire structure of the Cocos2d-x project is being configured around the Visual Studio solution for building windows / windows phone, the xcode project for building Mac and iOS, and the NDK script for Android.

Therefore, I would advise you to focus on working with supported assemblies, and as soon as you understand them, you can convert all MSVCs into the build process.

-3
source

All Articles