diff --git a/DolbyIO/Source/Private/DolbyIOModule.cpp b/DolbyIO/Source/Private/DolbyIOModule.cpp index a75adda6..dcb214a7 100644 --- a/DolbyIO/Source/Private/DolbyIOModule.cpp +++ b/DolbyIO/Source/Private/DolbyIOModule.cpp @@ -3,6 +3,7 @@ #include "Utils/DolbyIOCppSdk.h" #include "Utils/DolbyIOLogging.h" +#include "Runtime/Launch/Resources/Version.h" #include "HAL/PlatformProcess.h" #include "Interfaces/IPluginManager.h" #include "Misc/Paths.h" @@ -24,7 +25,11 @@ class FDolbyIOModule final : public IModuleInterface [](std::size_t Count, std::size_t Al) { return ::operator new(Count, static_cast(Al)); }, ::operator delete, [](void* Ptr, std::size_t Al) { ::operator delete(Ptr, static_cast(Al)); }}; +#if ENGINE_MAJOR_VERSION == 5 + BaseDir = FPaths::Combine(BaseDir, "bin"); +#else BaseDir = FPaths::Combine(BaseDir, TEXT("bin")); +#endif LoadDll(BaseDir, "avutil-57.dll"); LoadDll(BaseDir, "avcodec-59.dll"); LoadDll(BaseDir, "dvclient.dll"); @@ -39,13 +44,21 @@ class FDolbyIOModule final : public IModuleInterface LoadDll(BaseDir, "video_processor.dll"); dolbyio::comms::plugin::video_processor::set_app_allocator(Allocator); #elif PLATFORM_MAC +#if ENGINE_MAJOR_VERSION == 5 + BaseDir = FPaths::Combine(BaseDir, "lib"); +#else BaseDir = FPaths::Combine(BaseDir, TEXT("lib")); +#endif LoadDll(BaseDir, "libdolbyio_comms_media.dylib"); LoadDll(BaseDir, "libdolbyio_comms_sdk.dylib"); LoadDll(BaseDir, "libvideo_processor.dylib"); #elif PLATFORM_LINUX BaseDir += "-ubuntu-20.04-clang10-libc++10"; +#if ENGINE_MAJOR_VERSION == 5 + BaseDir = FPaths::Combine(BaseDir, "lib"); +#else BaseDir = FPaths::Combine(BaseDir, TEXT("lib")); +#endif LoadDll(BaseDir, "libavutil.so.57"); LoadDll(BaseDir, "libavcodec.so.59"); LoadDll(BaseDir, "libavformat.so.59");