| 52 | } |
| 53 | |
| 54 | HRESULT Orc::ExtensionLibrary::LoadDependencies(std::optional<std::filesystem::path> tempDir) |
| 55 | { |
| 56 | for (const auto& dependency : m_Dependencies) |
| 57 | { |
| 58 | if( !dependency) |
| 59 | { |
| 60 | Log::Error(L"Failed to load dependency for library '{}'", m_strKeyword); |
| 61 | continue; |
| 62 | } |
| 63 | if (dependency->IsLoaded()) |
| 64 | continue; |
| 65 | if (auto hr = dependency->Load(tempDir); FAILED(hr)) |
| 66 | { |
| 67 | Log::Error(L"Failed to load dependency library '{}'", dependency->Keyword()); |
| 68 | return hr; |
| 69 | } |
| 70 | else |
| 71 | { |
| 72 | Log::Debug(L"Loaded dependency library '{}'", dependency->Keyword()); |
| 73 | } |
| 74 | } |
| 75 | return S_OK; |
| 76 | } |
| 77 | |
| 78 | HRESULT ExtensionLibrary::TryLoad(std::wstring strFileRef) |
| 79 | { |