|
|
@ -41,13 +41,13 @@ namespace Misc
|
|
|
|
for (const auto& path : filepath)
|
|
|
|
for (const auto& path : filepath)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
#ifdef OSG_USE_UTF8_FILENAME
|
|
|
|
#ifdef OSG_USE_UTF8_FILENAME
|
|
|
|
std::filesystem::path osgPath {stringToU8String(path)};
|
|
|
|
std::filesystem::path osgPath{ stringToU8String(path) };
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
std::filesystem::path osgPath {path};
|
|
|
|
std::filesystem::path osgPath{ path };
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
if (!osgPath.has_filename())
|
|
|
|
if (!osgPath.has_filename())
|
|
|
|
osgPath = osgPath.parent_path();
|
|
|
|
osgPath = osgPath.parent_path();
|
|
|
|
|
|
|
|
|
|
|
|
if (osgPath.filename() == pluginDirectoryName)
|
|
|
|
if (osgPath.filename() == pluginDirectoryName)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
osgPath = osgPath.parent_path();
|
|
|
|
osgPath = osgPath.parent_path();
|
|
|
@ -64,14 +64,16 @@ namespace Misc
|
|
|
|
bool haveAllPlugins = true;
|
|
|
|
bool haveAllPlugins = true;
|
|
|
|
for (std::string_view plugin : USED_OSG_PLUGIN_FILENAMES)
|
|
|
|
for (std::string_view plugin : USED_OSG_PLUGIN_FILENAMES)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
if (std::find_if(availableOSGPlugins.begin(), availableOSGPlugins.end(), [&](std::string_view availablePlugin) {
|
|
|
|
if (std::find_if(availableOSGPlugins.begin(), availableOSGPlugins.end(),
|
|
|
|
|
|
|
|
[&](std::string_view availablePlugin) {
|
|
|
|
#ifdef OSG_USE_UTF8_FILENAME
|
|
|
|
#ifdef OSG_USE_UTF8_FILENAME
|
|
|
|
std::filesystem::path pluginPath {stringToU8String(availablePlugin)};
|
|
|
|
std::filesystem::path pluginPath{ stringToU8String(availablePlugin) };
|
|
|
|
#else
|
|
|
|
#else
|
|
|
|
std::filesystem::path pluginPath {availablePlugin};
|
|
|
|
std::filesystem::path pluginPath {availablePlugin};
|
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
return pluginPath.filename() == plugin;
|
|
|
|
return pluginPath.filename() == plugin;
|
|
|
|
}) == availableOSGPlugins.end())
|
|
|
|
})
|
|
|
|
|
|
|
|
== availableOSGPlugins.end())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
Log(Debug::Error) << "Missing OSG plugin: " << plugin;
|
|
|
|
Log(Debug::Error) << "Missing OSG plugin: " << plugin;
|
|
|
|
haveAllPlugins = false;
|
|
|
|
haveAllPlugins = false;
|
|
|
|