Win WIP Visual Studio 2012 project
#1
I've started this thread to get some input on decisions around moving to/adding vs 2012 project files.

Basics
XBMC compiles with minor modifications needed to source files with the recent update 1 for VS2012.
Needed to build is obviously vs2012 with update 1 and also the separate windows sdk download

Project can be found at https://github.com/Paxxi/xbmc/tree/vs2012 . I haven't made a PR because I feel it is too early because of the reasons below.

Now for the questions
  • Replace VS2010 project?
    It's my opinion that the VS2010 projects should be replaced/upgraded to 2012 to better prepare for using newer c++ features and libraries. This might cause problems if developers don't want to or can't switch to vs2012 yet?
  • Dependencies?
    XBMC does not build currently with the dependencies hosted by team xbmc. I've started to build the dependencies needed with vs2012, you can find the project at https://github.com/Paxxi/xbmc-deps
    I've also built the files needed and you can find them at http://dl.dropbox.com/u/55118895/builddep.7z . Drop them in XBMC_ROOT/project/BuildDependencies
  • Project build options
    I've made some changes to the build options, mainly to disable minimal rebuild and enable multiprocessor build which seems to speed up the builds quite a bit on my machine. These options are something I would strongly like feedback on since I'm a bit rusty on all the flags.
  • OpenGL build targets?
    Should the OpenGL build targets be kept and made sure to build? Are they used for anything currently on Windows?

I think that covers the changes made to the main project, I do have a few questions about the dependencies needed

Freetype is included in the main repo but it's still downloaded by the depency script. Should it be removed from the main repo? Should it be updated and used instead of downloading a prebuilt lib?

Same thing goes for microhttpd.

I think that's all for now, happy reviewing Big Grin


Reply
#2
1) why shall we switch now? What is better and how does XBMC benefit from it? As you already said not all devs want to change (yet) including me. Also we have a lot of other platform devs which helps us from time to time as we don't have much windows devs. Nobody of them want to do any more work on windows as necessary.

2) Dependencies. I don't get why they shouldn't work with vs2012. We had another forum user who was able to compile XBMC with vs2012 with a few modifications to our source. I can't remember the commit but its in master since month.

3) Unfortunately the build flags changes from while to while or get lost during a merge or whatever. We used the mp option afaik and it should be enabled but looking at the current source it seems to be again disabled as you said.

4) Good question. I was the opinion to remove it as we don't support it anymore. But since our DirectX devs are mia no progress is made there since month and I tend to consider switching back to OpenGL in the future to gain from the progress which is made there by the other devs.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#3
1) I could switch to VS2012 but I don't really see the benefit right now. Having two project files is certainly not the way to go but IMO there's no rush to switch to VS2012 right now.

3) IIRC we switched back to minimal rebuild because it was faster. I haven't tried in a while (more than a year ago and probably not on this machine with an i7) but last time I compared minimal rebuild was faster for me. I can give it a try someday and see how it goes.

4) Yeah we'll have to evaluate this. I don't really know much about these things. The biggest problem I can see with using OpenGL over DirectX is that we'd loose DXVA(2) support. Not sure about the impact but on my old HTPC (which has died a while ago) I wasn't able to play FullHD videos without DXVA2.

libmicrohttpd is in the sources for linux et. al. For Windows we download the pre-built deps because (last time I checked) it ccan only be built with MinGW. No clue about FreeType.
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#4
3) last entry I found:
26.06.2011 164960 * [WIN32] enabled /MP by disabling /GM. /MP is much faster on multi core systems than minimal build. Smile
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.
Reply
#5
1) I don't think that there's any immediate benefit to switch right now , the work is part for me to learn more about xbmc development and preparation for the future. With many new c++11 features and standard libraries I believe that it will give developers on all platforms greater freedom to start using these without being held back by vs2010

2 @WiSo) it is possible to build without rebuilding the libraries but it does require defines to ignore version mismatch, library mismatch and possibly integrator level mismatch. I'm not entirely sure how important this is and I am using these to avoid having separate debug builds of the libs.

3) I hnk it might be dependent on the work you do,mother minimal rebuild option is probably faster for edit,cmpile,edit loops. /MP wins when doing full build as in rebuild and nightly builds. It would certainly be possible to have different build targets to suit both things with fairly little work

5) @Montellese free type builds n vs2012 it's included in the deps project I linked. I will have to check if I can get some life in microhttpd.

As for the why now question. With the work on Frodo whining down and planning/preparations likely starting for v.next it seems like a good time to bring up the discussion even if it's voted down.

Another reason that I forgot to mention at the start. I want to make xbmc simple to build on windows, preferably by using only vs2012. I know this won't happen because of ffmpeg which seem to be a tough nut to crack.

Sorry if I ramble on, a bit tired typing on the ipad
Reply
#6
DXVA2 is kinda must have on windows and was (AFAIK) the only reason why XBMC has been ported to directX at all. So switching back to OpenGL can/should only be done if there is a reliable and widely supported replacement/API in OpenGL for Win for HW decoding.
Reply
#7
Note that it's unlikely we'll switch to widespread use of c++11 as there's other platforms we need to build on that may not have compiler support. It would have to offer a major benefit in order for us to consider it.

As for VS2012, it doesn't work on XP, so that would mean I'd not be able to do win32 development. This could be considered a plus or a minus depending on your perspective :p

Cheers,
Jonathan
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#8
(2013-01-07, 21:26)WiSo Wrote: 2) Dependencies. I don't get why they shouldn't work with vs2012. We had another forum user who was able to compile XBMC with vs2012 with a few modifications to our source. I can't remember the commit but its in master since month.

I think this is the commit WiSo talkes about: [win32] Make source code compatible with VS2012

Reply
#9
(2013-01-09, 10:53)jmarshall Wrote: Note that it's unlikely we'll switch to widespread use of c++11 as there's other platforms we need to build on that may not have compiler support. It would have to offer a major benefit in order for us to consider it.
I can't argue reliably for other platforms but isn't gcc and clang a lot better than vs when it comes to standard features? Maybe not for some of the small arm platforms?

(2013-01-09, 10:53)jmarshall Wrote: As for VS2012, it doesn't work on XP, so that would mean I'd not be able to do win32 development. This could be considered a plus or a minus depending on your perspective :p
with update 1 for vs2012 Microsoft added XP targeting to build stuff the old fashioned way so this part should be a non-issue

Reply
#10
(2013-01-09, 13:47)Trem Wrote: I can't argue reliably for other platforms but isn't gcc and clang a lot better than vs when it comes to standard features? Maybe not for some of the small arm platforms?
The problem will most likely be with cross-platform builds etc.

(2013-01-09, 13:47)Trem Wrote: with update 1 for vs2012 Microsoft added XP targeting to build stuff the old fashioned way so this part should be a non-issue
That's only for compiling applications to also run on Windows XP, not for actually running VS2012 on XP, that's still a no-go (same for Vista).
Always read the online manual (wiki), FAQ (wiki) and search the forum before posting.
Do not e-mail Team Kodi members directly asking for support. Read/follow the forum rules (wiki).
Please read the pages on troubleshooting (wiki) and bug reporting (wiki) before reporting issues.
Reply
#11
Ohh right, I misunderstood the point he wa trying to make. Yeah that could possibly be an issue, hopefully not many people who are interested in development run XP these days but I guess it's not really the xbmc way to exclude people /platforms without a very strong reason for doing so.
Reply
#12
IMO anything that restricts people from developing on win32 should be avoided. Win32 is the platform for which we have the least developers - we don't want to make that pool smaller for no reason.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#13
I must admit I have not yet pass too much time trying to compile on VS 2012 but at the moment following the things I read quickly I ended with some errors in EPG:

Erreur 71 error C2664: 'std::pair<_Ty1,_Ty2> std::_Tree<_Traits>::insert(std::pair<const _Kty,_Ty> &&)' : impossible de convertir le paramètre 1 de 'std::pair<_Ty1,_Ty2>' en 'std::pair<_Ty1,_Ty2> &&' c:\_android\gitrepos\xbmc.off\xbmc\epg\epg.cpp 99 1 XBMC

Erreur 72 error C2664: 'std::make_pair' : impossible de convertir le paramètre 2 de 'EPG::CEpgInfoTagPtr' en 'EPG::CEpgInfoTagPtr &&' c:\_android\gitrepos\xbmc.off\xbmc\epg\epg.cpp 357 1 XBMC


The more users will migrate to Windows 8 the more users will use Visual Studio 2012 Smile
Reply
#14
Tolrik those epg errors you're seeing should be fixed in my repo that I linked.
Reply
#15
Just a note in case no one has noticed: Even if the project files were not moved into VS12, it should be consider getting rid of the D3DX (DirectX extensions) sometime in distant future as Microsoft considers them as deprecated and they're removed from future DirectX SDKs: http://msdn.microsoft.com/en-us/library/...63275.aspx. It should be replaced with newer libraries such as DirectXMath. The newest SDK is included in VS12 and is available as a separate download for VS10: http://msdn.microsoft.com/en-us/windows/...p/hh852363.
Reply

Logout Mark Read Team Forum Stats Members Help
WIP Visual Studio 2012 project0