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
85 stars 43 forks source link

Release and ReleaseS use same directory for builds, Debug and DebugS do too. #9

Closed blloyd75 closed 8 years ago

blloyd75 commented 8 years ago

For Visual Studio builds: Both Dynamic and Static builds go to the same directory (either Debug or Release).

Since different parameters are used during the build, this can cause issues if switching from DebugS to Debug and not doing a clean before another build. Also, the non-static builds do not create the libvpx.lib to allow usage of libvpx.dll that is created.

kspes commented 8 years ago

@borisblizzard what do you think?

borisblizzard commented 8 years ago

This is actually the correct behavior due to the way our build outputs are organized. When building a final EXE, usually one goes with either using only static or maximum dynamic linkage (some libraries don't have a dynamic option due to the way their code is organized, one example being libvpx), link input directories can easily be specified and it's easier to mix static and dynamic links if needed. The disadvantage is that after switching targets around it requires a cleanup sometimes.

blloyd75 commented 8 years ago

Then if Dynamic versions of libvpx are not valid, should that build always use it's DebugS and ReleaseS builds? It is capable of building a .dll, but the dynamic build for libvpx does not include the link library.

borisblizzard commented 8 years ago

Due to some preprocessors that propagate through all libraries and are used in headers, the Release and Debug are for linking with DLLs, vut they also put out static libs. Hm, I'll see if I can rethink the process. Since there actually problems with mixing DLLs and static libs.

borisblizzard commented 8 years ago

Alright, I changed some things regarding output directories. Now binary output are the same as the intermediate directories and then the files are manually copied into the lib/dll directory from before so linking is made simpler. Switching build configurations from dynamic to static and vice versa does not require any special cleanup anymore.

blloyd75 commented 8 years ago

Sorry for the delay, but after testing this from a clean build, I get the following two errors building for visual studio 2013. Basically, Release (.dll builds) fail with 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: The command "xcopy D:\code\theoraplayer_aprilandfriends\bin\Release\Win32\lib\libvpx\Release\libvpx.dll D:\code\theoraplayer_aprilandfriends\bin\Release\Win32\lib\libvpx\Release......\ /Y /V 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: xcopy D:\code\theoraplayer_aprilandfriends\bin\Release\Win32\lib\libvpx\Release\libvpx.lib D:\code\theoraplayer_aprilandfriends\bin\Release\Win32\lib\libvpx\Release......\ /Y /V 1>C:\Program Files (x86)\MSBuild\Microsoft.Cpp\v4.0\V120\Microsoft.CppCommon.targets(132,5): error MSB3073: :VCEnd" exited with code 4. 1>Done executing task "Exec" -- FAILED. (TaskId:80)

So seems libvpx is still causing the Release and Debug builds to not complete.

borisblizzard commented 8 years ago

Hm, I messed up with the config. These two should always compile as static, even for "dynamic build configurations". Anyway, it's fixed.