Windows users need some love too so here is the fastest cocos2d-x setup guide yet.
Soon you will all be able to build for linux mac ios and android all from windows.
For now here is the initial support for the fastest windows build ever
Step 1. [download: msys2][1]
Step 2. Install git and mingw-cocos2d-x-git and qt-creator via pacman -S git mingw-w64-x86_64-cocos2d-x-git mingw-w64-x86_64-qt-creator mingw-w64-x86_64-cmake
Step 3 clone the template project I created git clone https://github.com/martell/cpp-template-default.git
Step 4 Run qtcreator and open the CMakeLists.txt start /mingw64/bin/qtcreator or via windows explorer directly
In order to have the same dev environment on all platforms with debugging capabilities, it would be great to be able to use Qt Creator with the same project file on Windows, Mac and Linux.
@zhangxm You don’t need Visual Studio to debug.
All the packages were built with mingw64 so gdb can debug them.
We would just use qt creator for this
Users will need visual studio for phone and RT though so we won’t retire visual studio just yet
@Chano you can infact do that. pacman has both qt-creator and gdb.
Just type pacman -S mingw-w64-x86_64-qtcreator and you are good to go
I will create a template today that works across all three platforms with that exact setup.
All debugging from qtcreator and usable from and of the three platforms
Thanks, but Windows already has loads of native development tools. But debugging with VS is usually easy as pie.
I was really hoping you’d be demonstrating how to join CocoStudio output to our eclipse projects…
Thats no problem I will be porting this to mac soon so you can join in the fun.
The msys2 team are still debating if pacman should be ported to mac also.
To streamline the process like on windows.
There is already the homebrew package manager for this so I could just use that also
Currently you have to install Qt Creator from the website on mac and of course xcode to get compilers.
So essentially you can build for ever platform from Qt creator.
You just need xcode and visual studio installed also to access the IOS WinRT and WP8 tools
Android just needs the NDK and Android SDK for this support.
I’m surprised that no project has ever made QtCreator it’s official Editor considering it really solves all cross platform requirements. Like why would anyone use Eclipse when we have this.
pacman is the package manager provided with msys2
you use it to install packages.
It is explained above but here is a more in dept guide.
pacman is run from the msys2 bash like in the screenshots above.
pacman -Syu updates installed packages and refreshes the list from the server pacman -S <packagename> installs a package pacman -Ss <partname> querys for a package
If you want a visual package manager we have the octopi package
You will have to install that with pacman. In future it may be provided by default.
It’s very alpha quality atm though.
So lets query go through how you find and install a package
Let update our system and package lists first with pacman -Syu
Then lets see if octopi actually exsists pacman -Ss octopi
That should then list two possible packages to install (one for x86 and one for x64)
Then use pacman -S <packagename> to install the one you want
Lets install the package (I picked the 64bit version) pacman -S mingw-w64-x86_64-octopi-git
Then after install I could simple type start /mingw64/bin/octopi
to start it
You can manage the installed packages with this gui tool.
Be warned it is very alpha quality and may be broken in parts
I recommend sticking with using pacman for now directly for now.
@zhangxm It’s live now if you want to test.
Currently qt-creator package is dependant on the qt5-sdk so it is a 500mb download
That will hopefully change in the next week or so making the full install from Zer0 to coco2d-x hero just under 200mb
If only, hero, lol. I really need to try and integrate cocostudio output into my C++ with cocos2dxv3.1.1. That would be RAD. But reading the cocos2d-x API and samples will take me weeks. Zero to DemoCowboy in one week
I’ll have a look at getting cocos2d-x help into the qt-creator help to help you speed along.
You do know that there is a test for every single feature. The cocostudio ones are here in extensions.
That should change that week into 10 minutes or at least only a few hours
when I create a new project and i compile that.
it has a compile error, always crush in here
E:\Workspace\Cocos2dx\pvz\cocos2d\cocos\base\CCPlatformConfig.h
// check user set platform #if ! CC_TARGET_PLATFORM #error “Cannot recognize the target platform; are you targeting an unsupported platform?” #endif
Hi, @kimspirit. I am very new to Cocos2D-X and I just followed this tutorial to install this development environment (everything went great…thanks a ton @Martell ), so I don’t know how much help this will be but maybe this will help you along a bit (sorry if this doesn’t help at all).
I am going to follow Sonar Systems YouTube tutorials using the project that Martell provides in this tutorial. Rather than trying to create a new project within QT Creator (there wasn’t a project type for Cocos2D-X) I just pulled Martell’s project a second time and edited the CMakeLists.txt file to change the app name from ‘MyGame’ to what I wanted it to be. In this case it is ‘FlappyBirds’ because that is the tutorial from Sonar Systems that I will be attempting to reproduce. Maybe you could do the same to get your project up and running. I hope this helps you.
Hi @kimspirit. It is just as @Rabidgoalie said you have to use the sample I created in my repo.
Otherwise you will get that undefined error.
I am currently doing a PR to fix more with this in cocos2d-x and after that point this package should be available on stable release versions and not just -git head
@Rabidgoalie I’m glad you like it I will make it even better soon