-
Notifications
You must be signed in to change notification settings - Fork 7.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added QtCreator project for Linux and Windows (MinGW) #4399
Conversation
finished). Also: 1. Fixed install_glfw.sh script to avoid conflict with glfw2 installed with package manager. 2. Added MinGW compiler support.
@@ -35,14 +36,14 @@ | |||
wc.lpszMenuName = NULL; // We Don't Want A Menu | |||
wc.lpszClassName = WIN_CLASS_NAME; // Set The Class Name | |||
|
|||
if (! RegisterClass(&wc) | |||
if (! RegisterClassA(&wc) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why to use Ascii
function?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In fact CocosDenshion.vcxproj CharacterSet is NotSet, means that it is the Ansi version, external parameter is const char_, then do not want to convert to const wchar_, must also be Ansi version, but for Qt Creator MinGW version, identified as a version of Unicode, leading to MciPlayer is not working, so I suggest MciPlayer.cpp to Ansi version
Fixed coding style issues for previous MinGW tweaks.
# Default settings are fine, but some indie developers or teams may prefer to | ||
# change them. | ||
|
||
# By default we use Chipmunk physics engine since Box2D is unmaintained. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Box2D released 2.3 in Nov.3.
Why did you say it is unmaintained?
Any link for the information?
Thanks.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I'll remove this note from comment.
@sergey-shambir I found that you uploaded many static libs for win32 platform. Why should use static libs? If it has to use static libs, then i think we should delete other dynamic libraries on win32. |
@minggo because some external libraries is build by vc project, it can not be used on MinGW. |
Ok, got it, but i think it is confused to put them into |
And one more question: is MinGW needed for QTCreator on windows? |
It's shipped as part of QtSdk for windows, while Visual Studio should be downloaded separately and sometimes glitches (e.g. Visual Studio 2010 doesn't work with QtCreator without SP1 update). So MinGW is more reliable when need to build app with QtCreator. |
VS2012 is required to run cocos2d-x on windows. It makes things complicated to support MinGW, because we should ship and maintain so many libs. |
@minggo MinGW libraries maybe does not need add to github. Some people are interested in MinGW, then can build their own. More people, then consider adding. |
@akof1314 |
@minggo recommend add QtCreator project ,except the MinGW static libraries on win32. @sergey-shambir |
Now MinGW can support audio
Ok, I'will remove MinGW static libraries and prepare project for MSVC 2012 as target compiler. |
We would support Mingw64 because it can come with clang which would then work with emscripten. |
@sergey-shambir @akof1314 @martell |
I understand where you are coming from. We should have windows, mac, and linux running via cmake to make the development more streamlined. I will then add in Android and IOS to cmake once you guys are happy with it |
@martell And some one suggests to use premake. It seems Thanks. |
@minggo In my PR I have simplified generating Visual Studio 2010, 2012 and 2013 to a simple bat file My favourite part of CMake is that it generates Sublime Text Projects. :D |
@martell |
@minggo $ cmake -G Xcode ... I haven't tried it myself, but apparently it works OK. We need to do some tests, though. If we can unify everything on CMake, it would be great. |
@minggo @ricardoquesada I have cmake implemented for project generation in cocos2d-x 2.2 for most platforms |
@ricardoquesada @martell |
@martell |
@martell |
@minggo The packages will be part of msys2 which uses pacman (like arch linux) They don't even need to be in the cocos2d-x project. just It also has python tcl /tk etc so we don't need cygwin to run plugin-x or project-creator.py We should treat Mingw64 and Msys2 like linux and not windows when used together. Check it out |
@martell My question are
|
The Real work is in cmake. |
Why should we use gcc or clang on windows? Most developers are used to using VS for developing on windows. And now we don't need cygwin any more. As you see, we use python to build android projects. As for emscripten, i am not sure if it is valuable to support MinGW to support emscripten target on windows. But it is great to hear that you will maintain it.
Did you mean we can test MinGW on linux? |
@minggo Did you mean we can test MinGW on linux?" Yes we can build the Windows exe from Linux (in travis ci case ubuntu specifically) We then can also build for Linux from Windows EDIT: We can build for IOS from Windows and Linux Desktops also ;) "This is true cross platform development" How do you do quotes on github by the way :P |
It sounds good to build all all in one platform. But we will add auto-testing, so we have to run samples on different environments. You can use quotes like this >> the contests to be quoted
Add comment here. |
Initially for MingW we could just use Wine http://www.winehq.org/ |
Yep, i have heard wine. But will it become too much complex? And we should test all compilers that developer can use. For example, developers will use VS for developing, then we should test VS. |
So, i think we should remove the static libs now. @sergey-shambir |
@minggo This should be very relevant here and the mingw static libs could be removed from this commit |
It would be good. As we used dpkg on ubuntu. |
Just had a look through the code of this pull request. @sergey-shambir Also the newer r4 headers with mingw match visual studio headers much better now so half of the mingw specific changes aren't needed any more :) |
Could anyone update this PR since it could not be automatically merged? |
Ok, I'll update it in next few days. |
@sergey-shambir |
@sergey-shambir , could you use |
I personally would love to see this happen, since I've been play with Qt and MinGW these days. |
Hey @dumganhar, It should be already possible to load the project into QTCreator via Cmake. Kind Regards |
Dear sergey-shambir: |
…age. Former-commit-id: dcd07982aabe631a36052af2208049b9b70b5999
Tested on
There're no Qt5 port yet, but I'm going to add it later. Current progress is in [1], TODOs are in that commit message. Probably I should make refactoring on SimpleAudioEngine before publishing Qt5 port, because in Qt5 audio can be decoded only asynchroniously so it's better to move whole SimpleAudioEngine into separate thread for all platforms.
P.S. In game published to GooglePlay we have rare fatal Java exceptions due to non thread-safe SimpleAudioEngine in cocos2dx 2.1.4, so probably refactoring SimpleAudioEngine will be useful for Android too.
[1] sergey-shambir@be7beb8