From 23ca9bea7df68dee47021ff83c6c45021557407f Mon Sep 17 00:00:00 2001 From: Ian Chen Date: Thu, 25 Jul 2024 18:06:25 +0000 Subject: [PATCH] remove use of deprecated env Signed-off-by: Ian Chen --- src/RenderEngineManager.cc | 24 +++--------------------- src/base/BaseScene.cc | 14 -------------- 2 files changed, 3 insertions(+), 35 deletions(-) diff --git a/src/RenderEngineManager.cc b/src/RenderEngineManager.cc index 505e1d90a..8e3a6f0f4 100644 --- a/src/RenderEngineManager.cc +++ b/src/RenderEngineManager.cc @@ -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"; @@ -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 diff --git a/src/base/BaseScene.cc b/src/base/BaseScene.cc index e4161a2aa..bdd997438 100644 --- a/src/base/BaseScene.cc +++ b/src/base/BaseScene.cc @@ -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();