Updated CMakeLists.txt and INSTALL.md to cover bundling of the required libVLC plugins for Windows.

This commit is contained in:
Leon Styhre 2020-07-16 20:34:02 +02:00
parent 4f2e4cbf5f
commit 6a0682b833
2 changed files with 22 additions and 0 deletions

View file

@ -343,6 +343,27 @@ The files from the MinGW installation must correspond to the version used to com
*So if the MinGW installation is upgraded to a newer version or so, make sure to copy the .dll files again, overwriting the old ones.*
In addition to these, you need to copy some libraries from the VLC `plugins` folder to be able to play video files. There is a subdirectory structure under the plugins folder and although there is no requirement to retain these as libVLC apparently looks recursively for the required .dll files, it still makes it a bit more tidy to keep the folder names for each type of plugin. The CMake install script will however copy all the contents of this plugins folder regardless of whether subdirectories are in use or not.
It's a bit tricky to know which libraries are really needed. But as the plugins directory is around 120 MB (as of VLC version 3.0.11), we definitely only want to copy the files we need.
The following files seem to be required to play most video and audio formats (place them in `emulationstation-de\plugins\`):
```
access\libfilesystem_plugin.dll
audio_filter\libaudio_format_plugin.dll
audio_filter\libtrivial_channel_mixer_plugin.dll
audio_output\libwaveout_plugin.dll
codec\libavcodec_plugin.dll
codec\libx264_plugin.dll
codec\libx265_plugin.dll
text_renderer\libfreetype_plugin.dll
video_chroma\libswscale_plugin.dll
video_output\libvmem_plugin.dll
```
The combined size of these files is around 24 MB which is more reasonable.
**Building the application:**
For a release build:

View file

@ -117,6 +117,7 @@ if(WIN32)
install(FILES ../FreeImage.dll ../libcrypto-1_1-x64.dll ../libcurl-x64.dll ../libfreetype.dll
../libgcc_s_seh-1.dll ../libpugixml.dll ../libssl-1_1-x64.dll ../libstdc++-6.dll
../libvlc.dll ../libvlccore.dll ../libwinpthread-1.dll ../SDL2.dll DESTINATION .)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/plugins DESTINATION .)
install(FILES ../LICENSE DESTINATION .)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/LICENSES DESTINATION .)
install(DIRECTORY ${CMAKE_SOURCE_DIR}/themes DESTINATION .)