AprilAndFriends / theoraplayer

A multi-threaded C++ library that plays video files supporting multiple codecs across platforms. Easy to use, fast, responsive, abstract interface and minimal dependencies, you'll soon be wondering how you lived without it! ;) Audio and Video interfaces are completely abstracted so the library can be used anywhere, regardless of what you use to display video frames and play audio samples (eg. OpenGL / OpenAL, Direct3D / DirectSound?, SDL / SDL_mixer, X11 / alsa ...) The library can pre-cache video frames and decoded audio samples for maximum efficiency and smooth playback, even on single-cpu systems. Currently, the library supports Theora on Windows, Mac, iOS, Linux, Android, WinRT and Windows Phone. H.264 is supported on Mac and iOS.
BSD 3-Clause "New" or "Revised" License
84 stars 43 forks source link

VS 2015 Solution Modifications #24

Closed jleveque closed 7 years ago

jleveque commented 7 years ago
borisblizzard commented 7 years ago

Sorry, but we can't merge the usage of static MSVC redist. This would force each binary (including executables) to use the static MSVC redist instead of the dynamic one as mixing both the dynamic and static redists doesn't work. Sometimes people use theoraplayer as static lib while still maintaining dynamic libs and the usage of the dynamic MSVC redist in their project so this would introduce a lot of problems for a lot of people.

We don't support the static MSVC redist and have no plans to support it in the future.

borisblizzard commented 7 years ago

Hm, I just found something else. Using the platform toolset "v140" requires installing Windows SDK separately. Any idea how we could avoid this? When we used "v140_xp", it didn't require Windows SDK.

jleveque commented 7 years ago

Sorry, but we can't merge the usage of static MSVC redist. This would force each binary (including executables) to use the static MSVC redist instead of the dynamic one as mixing both the dynamic and static redists doesn't work. Sometimes people use theoraplayer as static lib while still maintaining dynamic libs and the usage of the dynamic MSVC redist in their project so this would introduce a lot of problems for a lot of people.

We don't support the static MSVC redist and have no plans to support it in the future.

Understood. However, we could easily support both by simply adding a separate build target that builds against the static redist. Would you be opposed to a solution like that?

Hm, I just found something else. Using the platform toolset "v140" requires installing Windows SDK separately. Any idea how we could avoid this? When we used "v140_xp", it didn't require Windows SDK.

That's bizarre. I need the Windows SDK installed for other development purposes, and from what you're saying it seems to completely change the behavior of Visual Studio!?

With the Windows 10 SDK installed (but without "Windows XP Support for C++") I encountered the following issues with your VS project:

It sounds like you're claiming that if I had a fresh install of VS2015 without the Windows 10 SDK, your solution/project files would work fine as they are now?

borisblizzard commented 7 years ago

Understood. However, we could easily support both by simply adding a separate build target that builds against the static redist. Would you be opposed to a solution like that?

Sure, we can do that.

That's bizarre. I need the Windows SDK installed for other development purposes, and from what you're saying it seems to completely change the behavior of Visual Studio!?

Yeah, it really is bizarre.

With the Windows 10 SDK installed (but without "Windows XP Support for C++") I encountered the following issues with your VS project:

  • TargetPlatform = "10" caused errors. TargetPlatform must be an actual version of the Windows SDK (i.e., "10.0.10586.0")
  • PlatformToolset version = "v140_xp" caused errors, needed to be changed to "v140" (or I would need to install "Windows XP Support for C++" to use "v140_xp")

It sounds like you're claiming that if I had a fresh install of VS2015 without the Windows 10 SDK, your solution/project files would work fine as they are now?

Yes, we've been using this setup since VS2015 came out. Only today did we notice that some machines at our office didn't have the Windows SDK installed, because of the switch from "v140_xp" to "v140". It's really weird.

Either way, if this setup works fine for you, I want to merge it and streamline everything, because I think this is the way MS intended it to be used.

jleveque commented 7 years ago

This setup does work for me, and I also believe this is how it is intended to be used.

It appears you pushed some commits today that basically implement my changes in a slightly different way using the global props. I'm able to load and build the current solution fine with my setup.

Since we're nixing my other change the default static lib linking behavior, it seems like there's nothing else from this PR to merge. Do you want me to make any modifications to this, or should I just close it?

Also, as a side note, Microsoft recently released VS2017, and they have removed links to download VS2015, so it looks like you're gonna need a VS2017 solution soon. I may start testing the waters on some of my projects with VS2017 in the near future. If I happen to create a VS2017 solution for theoraplayer, I'll be sure to submit a PR.

borisblizzard commented 7 years ago

Yes, I pushed some changes on my end to test how your setup works. I think you can close this then and I'll add the static MS CRT support later to the master branch. But if you need it for something urgently, I can do it sooner. Or you can use use an override props file that will affect all theoraplayer projects that use the "props-generic" directory. You can view which paths are supported in any of the props-generic/Platform-PLATFORM.props files (e.g. I prefer to put the msvc/vs2015 directory on the same level as my theoraplayer working copy).

I was going to check VS2017 in a few weeks myself as soon as the gold master is out (I think it's still RC). I noticed that they merged everything into one IDE rather than having a "for Windows" and "for Desktop" version so I expect some problems until I can setup everything. I think we have 40+ projects per IDE to setup across all of the libraries we use so it will probably take a few days.

jleveque commented 7 years ago

Sounds good. Take your time with the static MS CRT target; I have a working override for the time being.