Skip to content

Commit

Permalink
remove use of deprecated env
Browse files Browse the repository at this point in the history
Signed-off-by: Ian Chen <[email protected]>
  • Loading branch information
iche033 committed Jul 25, 2024
1 parent 042c7ae commit 23ca9be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 35 deletions.
24 changes: 3 additions & 21 deletions src/RenderEngineManager.cc
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,6 @@ class gz::rendering::RenderEngineManagerPrivate
/// \brief Plugin loader for managing render engine plugin libraries.
public: gz::plugin::Loader pluginLoader;

/// \brief Deprecated environment variable which holds paths to look for
/// plugins
public: std::string pluginPathEnvDeprecated = "IGN_RENDERING_PLUGIN_PATH";

/// \brief Environment variable which holds paths to look for plugins
public: std::string pluginPathEnv = "GZ_RENDERING_PLUGIN_PATH";

Expand Down Expand Up @@ -475,23 +471,9 @@ bool RenderEngineManagerPrivate::LoadEnginePlugin(
auto pathToLib = systemPaths.FindSharedLibrary(_filename);
if (pathToLib.empty())
{
// Try deprecated environment variable
common::SystemPaths systemPathsDep;
systemPathsDep.SetPluginPathEnv(this->pluginPathEnvDeprecated);
pathToLib = systemPathsDep.FindSharedLibrary(_filename);
if (pathToLib.empty())
{
gzerr << "Failed to load plugin [" << _filename <<
"] : couldn't find shared library." << std::endl;
return false;
}
else
{
gzwarn << "Found plugin [" << _filename
<< "] using deprecated environment variable ["
<< this->pluginPathEnvDeprecated << "]. Please use ["
<< this->pluginPathEnv << "] instead." << std::endl;
}
gzerr << "Failed to load plugin [" << _filename <<
"] : couldn't find shared library." << std::endl;
return false;
}

// Load plugin
Expand Down
14 changes: 0 additions & 14 deletions src/base/BaseScene.cc
Original file line number Diff line number Diff line change
Expand Up @@ -1655,20 +1655,6 @@ void BaseScene::CreateMaterials()
material->SetLightingEnabled(true);

const char *env = std::getenv("GZ_RENDERING_RESOURCE_PATH");

// TODO(CH3): Deprecated. Remove on tock.
if (!env)
{
env = std::getenv("IGN_RENDERING_RESOURCE_PATH");

if (env)
{
gzwarn << "Using deprecated environment variable "
<< "[IGN_RENDERING_RESOURCE_PATH]. Please use "
<< "[GZ_RENDERING_RESOURCE_PATH] instead." << std::endl;
}
}

std::string resourcePath = (env) ? std::string(env) :
gz::rendering::getResourcePath();

Expand Down

0 comments on commit 23ca9be

Please sign in to comment.